# OLX Poland Districts API Documentation

<p><strong>OLX Poland Districts API</strong> lists the districts of one city with their ids. Cities without districts return an empty list, which is a valid billed answer. Use the ids as district_id in search.</p>

- **Documentation:** [https://scrappa.co/docs/olx-pl-api/olx_pl_districts](https://scrappa.co/docs/olx-pl-api/olx_pl_districts)
- **API group:** OLX Poland API
- **Endpoint:** `GET https://scrappa.co/api/olx-pl/districts`

## 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 |
| --- | --- | --- | --- |
| `city_id` | integer | Yes | City id from the cities or locations endpoint. Example: 17871. |

## Example response

```json
{
    "data": {
        "results": [
            {
                "id": 367,
                "name": "Bemowo"
            },
            {
                "id": 365,
                "name": "Bia\u0142o\u0142\u0119ka"
            },
            {
                "id": 369,
                "name": "Bielany"
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "districts"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 500 | Parser Drift | OLX answered with a response shape this parser does not recognise. Never charged. |
| 503 | Upstream Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

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