# Skyscanner Airport and City Autocomplete API Documentation

Look up airports and cities on Skyscanner by name or IATA code. Each place returns a place_id (use it as origin or destination for the calendar endpoint), an entity_id (use it as origin_id or destination_id for flight search), the place type (city or airport), city, country, region and coordinates. A query without matches is a successful empty response.

- **Documentation:** [https://scrappa.co/docs/skyscanner-api/skyscanner_autocomplete](https://scrappa.co/docs/skyscanner-api/skyscanner_autocomplete)
- **API group:** Skyscanner API
- **Endpoint:** `GET https://scrappa.co/api/skyscanner/autocomplete`

## 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 or code, 1 to 100 characters: letters, numbers, spaces and . ' - only. Example: jfk. |
| `is_destination` | boolean | No | Rank results for a destination (true) or an origin (false). Defaults to true. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/skyscanner/autocomplete?query=jfk"
```

## Example response

```json
{
    "success": true,
    "data": {
        "query": "jfk",
        "places": [
            {
                "place_id": "NYCA",
                "entity_id": "27537542",
                "name": "New York",
                "type": "city",
                "iata_code": "NYC",
                "city_id": "NYCA",
                "city_name": "New York",
                "country_id": "US",
                "country_name": "United States",
                "region_id": "NY",
                "latitude": 40.6940959901,
                "longitude": -73.9282670243,
                "url": "https://www.skyscanner.net/transport/flights/nyca/"
            },
            {
                "place_id": "JFK",
                "entity_id": "95565058",
                "name": "New York John F. Kennedy",
                "type": "airport",
                "city_id": "NYCA",
                "city_name": "New York",
                "country_id": "US",
                "country_name": "United States",
                "region_id": "NY",
                "latitude": 40.6412215,
                "longitude": -73.7781176,
                "url": "https://www.skyscanner.net/transport/flights/jfk/"
            }
        ]
    },
    "meta": {
        "endpoint_family": "autocomplete",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required query parameter is missing or invalid. This response is not billable. |
| 404 | Place or Route Not Found | Skyscanner does not know the place code or entity id. This response is not billable. |
| 503 | Upstream Blocked | The upstream service is temporarily unavailable. Please retry shortly. |
| 503 | Service Unavailable | Skyscanner did not answer, answered too slowly or returned an unexpected response. Retry shortly. 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)
