Request parameters
Look up a specific airport, find airports by location, or export the directory with these query parameters.
| Parameter | Required | Default | Description |
apikey |
Yes | None | Your assigned API key. Get a free test API key. |
iata |
Conditional | None | Three-letter IATA airport code, such as LHR. |
icao |
Conditional | None | Four-letter ICAO airport code, such as EGLL. |
city_code |
Conditional | None | Three-letter IATA city code, such as LON, to find airports associated with a city. |
country_code |
Conditional | None | Two-letter ISO country code, such as GB, to find airports in a country. |
name |
Conditional | None | Airport name or partial name, such as Heathrow. |
dump |
Conditional | 0 | Set to 1 to export the database. Overrides the other lookup parameters; coverage filters still apply. |
show_disabled |
No | 0 | Set to 1 to include inactive or disabled records. By default, only active records are returned. |
response_type |
No | JSON | Response format: JSON, XML or CSV. CSV triggers a file download. |
major_only |
No | 0 | Set to 1 to include only airports with commercial flights. |
Provide at least one of iata, icao, city_code, country_code, name, or dump=1. Setting dump=1 overrides the other lookup parameters.
View all request parameters →
Common implementation tasks
Download an ICAO airport code directory
Export the active airport directory as CSV and build a local index from records with a populated icao field. Keep iata where available to support matching with booking data. Add major_only=1 if your product needs only airports with commercial flights.
curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
--data-urlencode 'apikey=YOUR_API_KEY' \
--data-urlencode 'dump=1' \
--data-urlencode 'response_type=CSV' \
--output airports.csv
Find an ICAO code from an IATA code
Pass LHR in iata and read icao from the response. This lets your application match a booking supplier’s airport identifier to a source that uses ICAO codes, using both codes from the same airport record.
curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
--data-urlencode 'apikey=YOUR_API_KEY' \
--data-urlencode 'iata=LHR'
Find an ICAO code from an airport name
Search with name and inspect the returned icao field. Partial names may return several matches, so compare the airport name, country and other identifiers before selecting a record.
curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
--data-urlencode 'apikey=YOUR_API_KEY' \
--data-urlencode 'name=Heathrow'
Frequently asked questions
What is the difference between ICAO and IATA airport codes?
ICAO airport identifiers have four letters, such as EGLL for London Heathrow. IATA airport codes have three letters, such as LHR. Use icao or iata according to the code system supplied by your source; the response provides both fields where available.
Can I map ICAO airport codes to IATA codes?
Yes. Look up the airport with icao and read the returned iata field. You can also look up an IATA code with iata and read icao. Check that the destination field is populated before creating a mapping; do not assume every record has both identifiers.
Can I use a city code as an ICAO airport code?
No. A city code such as LON is a separate destination identifier. Use city_code to find airports associated with a city, then use the icao value from the relevant airport record. A city can be served by multiple airports.
Which airports are included by default?
The default request returns active records and does not restrict results to airports with commercial flights. Set major_only=1 for that restriction. The broader dataset can include other location types; check icao before adding records to an ICAO lookup, and use major_airport and sub_type from the full response to distinguish facilities.
Can I include inactive airports for historical records?
Set show_disabled=1 to include inactive or disabled records, and inspect active in the response. Keep that status available when resolving historical data so an old airport reference is not automatically offered as an active booking destination.
Can I store the ICAO airport directory locally?
Yes, with an appropriate GEO Essentials license. Use dump=1 to export JSON, XML or CSV, and choose major_only and show_disabled for the coverage you need. Index populated icao values for local lookups while retaining airhex_id as the permanent record identifier.
How should I maintain mappings and handle missing matches?
Retain airhex_id and updated from the full response and refresh your local directory periodically. Check for populated code fields before creating mappings. If a lookup cannot resolve a source code, preserve the original value for review rather than guessing a match from a similar airport name.
Does an ICAO lookup provide live airport or flight operations data?
No. This endpoint provides airport reference data for identifying and matching locations. Obtain live flight status, runway availability and operational notices from the appropriate operational data provider. The active field describes the airport record’s operational status, not current flight conditions.