Skip to content
Scrappa Get API key
Housing.com API 1 credit/request

Housing.com Location Autocomplete API Documentation

GET https://scrappa.co/api/housing-com/autocomplete

Housing.com Location Autocomplete API Find places in one city by a search text. Each result has a name, a type (locality, sublocality, project, landmark and more) and a canonical path. A result with usable_in_search=true is a locality or a city: send its canonical as the canonical parameter of the search endpoint. Projects, landmarks and developers are listed for reference and cannot be searched as a place.

Housing.com Location Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/housing-com/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops city = example
Response preview
200 OK
{
    "data": {
        "city": "Mumbai",
        "query": "hiranandani",
        "results": [
            {
                "id": "88c9815b61cdc7711a33",
                "url": "https://housing.com/in/buy/thane/hiranandani-estate-gid/",
                "name": "Hiranandani Estate, Thane",
                "type": "locality",
                "canonical": "/in/buy/thane/hiranandani-estate-gid/",
                "unique_id": "buy-6912",
                "display_type": "Locality",
                "usable_in_search": true
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

2 required parameters needed before sending a request.

1 optional filter available.

query string Required

Search text, 2 to 100 characters. Example: powai.

Example value coffee shops
city string Required

City name or id from the cities endpoint, e.g. Mumbai.

Example value example
limit integer Optional

Rows to return, 1 to 10. Default 5.

Example value 10

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "data": {
        "city": "Mumbai",
        "query": "hiranandani",
        "results": [
            {
                "id": "88c9815b61cdc7711a33",
                "url": "https://housing.com/in/buy/thane/hiranandani-estate-gid/",
                "name": "Hiranandani Estate, Thane",
                "type": "locality",
                "canonical": "/in/buy/thane/hiranandani-estate-gid/",
                "unique_id": "buy-6912",
                "display_type": "Locality",
                "usable_in_search": true
            },
            {
                "id": "d01c3d3af7fef6df4f0c",
                "url": "https://housing.com/in/buy/mumbai/hiranandani-gardens-powai-gid/",
                "name": "Hiranandani Gardens, Powai, Mumbai",
                "type": "sublocality",
                "canonical": "/in/buy/mumbai/hiranandani-gardens-powai-gid/",
                "unique_id": "buy-7764",
                "display_type": "Locality",
                "usable_in_search": true
            },
            {
                "id": "9e8af4096997cf6eb6ba",
                "url": "https://housing.com/in/buy/thane/hiranandani-rodas-enclave-hiranandani-estate-gid/",
                "name": "Hiranandani Rodas Enclave, Hiranandani Estate, Thane",
                "type": "sublocality",
                "canonical": "/in/buy/thane/hiranandani-rodas-enclave-hiranandani-estate-gid/",
                "unique_id": "buy-25680",
                "display_type": "Locality",
                "usable_in_search": true
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}

Errors

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

A required parameter is missing or invalid. This response is not billable.

{
    "errors": {
        "city": [
            "A city is required, e.g. Mumbai. Use the cities endpoint for the list."
        ]
    },
    "message": "The request validation failed"
}
404

Not Found

The city is not in the Housing.com city list. This response is not billable.

{
    "meta": {
        "attempts": 1,
        "billable": false,
        "retryable": false
    },
    "error": {
        "message": "No Housing.com location matches this city and place. Check the city and use autocomplete for the place.",
        "failure_type": "location_not_found"
    },
    "success": false
}
503

Temporarily Unavailable

Housing.com did not answer or refused the request after several attempts. This response is not billable. Retry after a short pause.

{
    "meta": {
        "attempts": 3,
        "billable": false,
        "retryable": true
    },
    "error": {
        "message": "Housing.com data is temporarily unavailable. Please retry.",
        "failure_type": "upstream_timeout"
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.