# Kiwi.com Locations API Documentation

<p><strong>Kiwi.com Locations API Documentation</strong> Look up airports, cities, regions, countries and landmarks by a search text. Each result has an id, a type, a name, an airport or city code, the country and coordinates. Use the id as origin or destination in the flight, calendar and explore endpoints. Page with next_cursor: send it as cursor to read the next page. An empty page ends the list. The has_more flag is true while a cursor is offered, so a last page can still be followed by one empty page.</p>

- **Documentation:** [https://scrappa.co/docs/kiwi-api/kiwi_locations](https://scrappa.co/docs/kiwi-api/kiwi_locations)
- **API group:** Kiwi.com API
- **Endpoint:** `GET https://scrappa.co/api/kiwi/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 | City or airport name, 2 to 100 characters. Example: berlin. |
| `limit` | integer | No | Places per page, 1 to 50. Defaults to 20. |
| `cursor` | string | No | The next_cursor of the previous page. |
| `locale` | string | No | Language of names, such as en or de. Defaults to en. |

## Example response

```json
{
    "data": {
        "limit": 20,
        "query": "Berlin",
        "cursor": null,
        "results": [
            {
                "id": "City:berlin_de",
                "city": "Berlin",
                "code": "BER",
                "name": "Berlin",
                "rank": 67,
                "slug": "berlin-germany",
                "type": "city",
                "country": "Germany",
                "latitude": 52.5200066,
                "legacy_id": "berlin_de",
                "longitude": 13.404954,
                "country_code": "DE"
            },
            {
                "id": "Subdivision:BE_DE",
                "city": null,
                "code": null,
                "name": "Berlin",
                "rank": 46,
                "slug": "berlin-germany-1",
                "type": "subdivision",
                "country": null,
                "latitude": 52.52,
                "legacy_id": "BE_DE",
                "longitude": 13.405,
                "country_code": null
            },
            {
                "id": "Station:airport:BER",
                "city": "Berlin",
                "code": "BER",
                "name": "Berlin Brandenburg",
                "rank": 40,
                "slug": "berlin-brandenburg-berlin-germany",
                "type": "airport",
                "country": "Germany",
                "latitude": 52.36,
                "legacy_id": "BER",
                "longitude": 13.5,
                "country_code": "DE"
            }
        ],
        "has_more": true,
        "next_cursor": "POI:berlin-wall_poi"
    },
    "meta": {
        "billable": true,
        "endpoint_family": "locations"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable. |
| 503 | Upstream Unavailable | Kiwi.com did not answer in time. Retry the request. This response is not billable. |
| 503 | Unexpected Upstream Answer | Kiwi.com answered in a form this API does not read. 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)
