Search airports

Search airports

GET/flights/airports

Origins and destinations on a flight search are airport or city codes, not names. This call turns a name or a code into the code you send as origin or destination.

Send X-API-Key the same way as on every other call. query is required. country and locale are optional and default to US and en.

Which code to send

Use airports[].code. When allAirports is true, the code covers every airport in that city: LON is London, NYC is New York. A false value is one airport, such as LHR or JFK.

A query that matches nothing returns 200 with an empty airports list. A missing query, a blank query, a bad locale, or an unsupported country returns 400. If the lookup itself fails, the response is 502 AIRPORTS_UNAVAILABLE.

Read more

Why an agent should ask when a name matches several cities: flights MCP. The lookup as the first step of a full search: flight search API.

Parameters

Query parameters.

querystringRequired

Airport name, city name, or code. 1 to 80 characters. A blank value is rejected.

countrystring

ISO 3166-1 alpha-2 market. Omit it for US. Any other value is rejected. Same set as on a flight search.

Possible values

USGBDEFRESITNLBEATCHIEPTGRPLCZROSENODKFITRAESAILINJPKRHKTWSGMYTHIDPHVNAUNZCAMXBRARCLCOPEUYPYBOECVECRPAGTHNNISVDOPRZAUA
localestring

2-letter language code. Omit it for en. Anything that is not two letters is rejected.

Returns

A successful response, captured live.

                        {
  "query": "london",
  "airports": [
    {
      "code": "LON",
      "name": "All airports",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": true
    },
    {
      "code": "LHR",
      "name": "Heathrow",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": false
    },
    {
      "code": "LGW",
      "name": "Gatwick",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": false
    },
    {
      "code": "LCY",
      "name": "London City",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": false
    },
    {
      "code": "LTN",
      "name": "Luton",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": false
    },
    {
      "code": "STN",
      "name": "Stansted",
      "city": "London",
      "region": "England",
      "country": "United Kingdom",
      "countryCode": "GB",
      "timezone": "Europe/London",
      "allAirports": false
    }
  ]
}