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

Housing.com Cities API Documentation

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

Housing.com Cities API List the cities Housing.com serves in India (about 800). Each city has an id, a name and a url slug. Pass the name or the id as city to the other endpoints. Filter the list by service and by part of the name. The list is cached for a day.

Housing.com Cities API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/housing-com/cities
Auth header
x-api-key
Cost
1 credit/request
Response preview
200 OK
{
    "data": {
        "count": 2,
        "cities": [
            {
                "id": "a0fd32816f73961748cf",
                "name": "Mumbai",
                "slug": "mumbai"
            },
            {
                "id": "0db7e16e692dd960d6a5",
                "name": "Navi Mumbai",
                "slug": "navi-mumbai"
            }
...

Parameters

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

Runnable path

This endpoint has no required query parameters.

2 optional filters available.

service string Optional

buy or rent. Default buy.

Example value example
query string Optional

Part of a city name, e.g. mum.

Example value coffee shops

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": {
        "count": 2,
        "cities": [
            {
                "id": "a0fd32816f73961748cf",
                "name": "Mumbai",
                "slug": "mumbai"
            },
            {
                "id": "0db7e16e692dd960d6a5",
                "name": "Navi Mumbai",
                "slug": "navi-mumbai"
            }
        ],
        "service": "buy"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "cities"
    },
    "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"
}
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.