# OLX Poland Locations API Documentation

<p><strong>OLX Poland Locations API</strong> finds cities and districts by name and returns their ids with the region. No match returns an empty list, which is a valid billed answer.</p>

- **Documentation:** [https://scrappa.co/docs/olx-pl-api/olx_pl_locations](https://scrappa.co/docs/olx-pl-api/olx_pl_locations)
- **API group:** OLX Poland API
- **Endpoint:** `GET https://scrappa.co/api/olx-pl/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 |
| --- | --- | --- | --- |
| `query` | string | Yes | Place name, at least 2 characters. Example: Krak. |

## Example response

```json
{
    "data": {
        "results": [
            {
                "city": "Krak\u00f3w",
                "region": "Ma\u0142opolskie",
                "city_id": 8959,
                "region_id": 4
            },
            {
                "city": "Krakuszowice",
                "region": "Ma\u0142opolskie",
                "city_id": 30397,
                "region_id": 4
            },
            {
                "city": "Krakowiany",
                "region": "Dolno\u015bl\u0105skie",
                "city_id": 47985,
                "region_id": 3
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "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)
