# Housing.com Cities API Documentation

<p><strong>Housing.com Cities API</strong> 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.</p>

- **Documentation:** [https://scrappa.co/docs/housing-com-api/housing_com_cities](https://scrappa.co/docs/housing-com-api/housing_com_cities)
- **API group:** Housing.com API
- **Endpoint:** `GET https://scrappa.co/api/housing-com/cities`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `service` | string | No | buy or rent. Default buy. |
| `query` | string | No | Part of a city name, e.g. mum. |

## Example response

```json
{
    "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

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or invalid. This response is not billable. |
| 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. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
