# 591 Locations API Documentation

<p><strong>591 Locations API</strong> lists the cities and counties of 591 (22) with their 370 districts. Use the ids as <code>region_id</code> and <code>section_ids</code> in the search routes. Each place has an id, a name and a map position. The tables are static, so this route answers at once and always succeeds for a valid request. Unofficial: Scrappa is not affiliated with 591. Chinese text stays as 591 returns it; numeric fields are parsed next to it, and a value 591 does not give is null, never 0. Failed requests are not billable.</p>

- **Documentation:** [https://scrappa.co/docs/591-api/house591_locations](https://scrappa.co/docs/591-api/house591_locations)
- **API group:** 591 House API
- **Endpoint:** `GET https://scrappa.co/api/591/locations`

## 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 |
| --- | --- | --- | --- |
| `region_id` | integer | No | Only this city or county. Optional. |
| `q` | string | No | Text that a city or district name must contain. Optional. |

## Example response

```json
{
    "data": {
        "regions": [
            {
                "id": 1,
                "lat": 25.0329694,
                "lng": 121.5654177,
                "area": "\u5317\u90e8",
                "name": "\u53f0\u5317\u5e02",
                "sections": [
                    {
                        "id": 5,
                        "lat": 25.0249441,
                        "lng": 121.5433783,
                        "name": "\u5927\u5b89\u5340"
                    },
                    {
                        "id": 10,
                        "lat": 25.0935968,
                        "lng": 121.5940773,
                        "name": "\u5167\u6e56\u5340"
                    }
                ]
            }
        ],
        "total_regions": 1
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter is missing or a value or combination is not allowed. This response is not billable. |

## 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)
