Airports Database and Codes API

Help travelers identify the right airport and understand where their journey begins and ends. Retrieve airport codes, names, locations and time zones, or download the directory for your own search and booking tools.

  • IATA and ICAO lookup
  • Coordinates and time zones
  • JSON, XML and CSV

Look up an airport by its code

Send iata=LHR to retrieve London Heathrow Airport and its reference data. Replace YOUR_API_KEY with your assigned key.

API Endpoint Description

This endpoint allows retrieval of geographic details for a specific airport or extraction of the complete airports database, with responses available in JSON, XML, or CSV formats.

Endpoint
GET https://content.airhex.com/api/v3.7.10/airports/

Request · cURL

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'iata=LHR'

Response · JSON

[
    {
        "airhex_id": "53779",
        "updated": "2025-09-03 13:16:53",
        "iata": "LHR",
        "icao": "EGLL",
        "name": "London Heathrow Airport",
        "city_code": "LON",
        "country_code": "GB",
        "timezone": "Europe\/London",
        "utc": "1",
        "latitude": "51.469603",
        "longitude": "-0.453566",
        "active": "1",
        "avg_weekly_flights": "1587",
        "major_airport": 1,
        "address": "Longford TW6, UK",
        "phone_local": "0844 335 1801",
        "phone_intl": "+44 844 335 1801",
        "website": "https:\/\/www.heathrow.com",
        "sub_type": null
    }
]

Full JSON response. Scroll within the panel to explore all fields. Expanded JSON and XML examples are available below.

Request parameters

Provide at least one of iata, icao, city_code, country_code, name, or dump=1. Setting dump=1 overrides the other lookup parameters; coverage filters still apply.

Parameter Required Value Type Default Description
apikey Required Any String none Your assigned API key. Get a free test API key.
iata Conditional AAA-ZZZ String none Three-letter IATA airport code
icao Conditional AAAA-ZZZZ String none Four-letter ICAO airport code
city_code Conditional AAA-ZZZ String none Three-letter IATA city code
country_code Conditional AA-ZZ String none Two-letter ISO 3166-1 Alpha-2 country code
name Conditional Any String none Airport name or partial match substring
dump Conditional 0 or 1 Integer 0 Set to 1 to export the complete database (ignores other conditional parameters above)
show_disabled Optional 0 or 1 Integer 0 Set to 1 to include inactive/disabled airports in the response. By default, only active airports are returned.
response_type Optional JSON or XML or CSV String JSON Response format: JSON, XML, or CSV (CSV initiates file download)
major_only Optional 0 or 1 Integer 0 Set to 1 to include only airports with commercial flights (excludes seaplane bases, helipads, military bases, etc)

Response fields

Retrieve airport identities, location details, operational status and contact information. Linked fields open focused guides with examples and integration advice.

Field Example Description
airhex_id 53779 Unique permanent record identifier
updated 2025-09-03 13:16:53 Date and time the record was last updated
iata LHR Airport's three-letter IATA code
icao EGLL Airport's four-letter ICAO code
name London Heathrow Airport Airport name
city_code LON Three-letter IATA city code of the airport's location
country_code GB ISO 3166-1 Alpha-2 country code of the airport location
timezone Europe/London Airport's time zone identifier
utc 1 Airport's time offset from UTC
latitude 51.469603 Geographic latitude of the airport
longitude -0.453566 Geographic longitude of the airport
major_airport 1 Indicates if the airport has scheduled commercial flights:
1 – Airport with scheduled flights
0 – Airport with no scheduled flights or other location types (rail/bus stations, helipads, etc.)
sub_type Facility subtype (if not an airport), e.g., Rail, Bus/Limo, Ferry/Port, or Border/Customs
active 1 Operational status: 1 active; 0 inactive
avg_weekly_flights 1587 Average weekly scheduled flight count
address Longford TW6, UK Physical address of the airport
phone_local 0844 335 1801 Local phone contact for the airport
phone_intl +44 844 335 1801 International phone contact including country code
website https://www.heathrow.com Official airport website URL

Full response examples

These examples show the complete London Heathrow Airport record in JSON and XML. Use response_type to select the output format.

Response · JSON

[
    {
        "airhex_id": "53779",
        "updated": "2025-09-03 13:16:53",
        "iata": "LHR",
        "icao": "EGLL",
        "name": "London Heathrow Airport",
        "city_code": "LON",
        "country_code": "GB",
        "timezone": "Europe\/London",
        "utc": "1",
        "latitude": "51.469603",
        "longitude": "-0.453566",
        "active": "1",
        "avg_weekly_flights": "1587",
        "major_airport": 1,
        "address": "Longford TW6, UK",
        "phone_local": "0844 335 1801",
        "phone_intl": "+44 844 335 1801",
        "website": "https:\/\/www.heathrow.com",
        "sub_type": null
    }
]

Response · XML

<?xml version="1.0" encoding="UTF-8"?>
<airports>
 <airport>
  <airhex_id>53779</airhex_id>
  <updated>2025-09-03 13:16:53</updated>
  <iata>LHR</iata>
  <icao>EGLL</icao>
  <name>London Heathrow Airport</name>
  <city_code>LON</city_code>
  <country_code>GB</country_code>
  <timezone>Europe/London</timezone>
  <utc>1</utc>
  <latitude>51.469603</latitude>
  <longitude>-0.453566</longitude>
  <active>1</active>
  <avg_weekly_flights>1587</avg_weekly_flights>
  <major_airport>1</major_airport>
  <address>Longford TW6, UK</address>
  <phone_local>0844 335 1801</phone_local>
  <phone_intl>+44 844 335 1801</phone_intl>
  <website>https://www.heathrow.com</website>
  <sub_type></sub_type>
 </airport>
</airports>

Common implementation tasks

Download your airport directory

Export active airports with commercial flights for your local search index. Retain airhex_id and updated when importing records.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'dump=1' \
  --data-urlencode 'major_only=1' \
  --data-urlencode 'response_type=CSV' \
  --output airports.csv

Find airports associated with a city

Use the city code to retrieve associated airports, keeping each airport’s own code and name for individual choices.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'city_code=LON' \
  --data-urlencode 'major_only=1'

Look up an airport by ICAO code

Match an aviation identifier to the same airport record used by your booking tools.

curl --get 'https://content.airhex.com/api/v3.7.10/airports/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'icao=EGLL'

What you can build

Build clearer airport search

Help travelers distinguish airports using names, codes, cities and countries.

Make flight details understandable

Turn supplier airport codes into clear departure and arrival locations in results, confirmations and itineraries.

Add location and local-time context

Use coordinates for airport maps and time zone identifiers for local-time displays.

Frequently asked questions

Can I use this data to build airport autocomplete?

Yes. Download the airport directory and build a local search index from airport names, IATA and ICAO codes, city associations and countries. Your application controls matching and suggestion ordering. The endpoint provides reference data and name lookups, rather than a ready-made autocomplete interface.

How is airport information kept up to date?

Airhex aggregates and verifies geographic data from multiple sources and reviews it daily. Refresh your local directory periodically, retaining airhex_id and updated so changes can be applied to the same airport records.

How do city codes differ from airport codes?

Use iata for a specific airport, such as LHR, and city_code for airports associated with a city, such as LON. A city can have multiple airports. Confirm the location type supplied by your booking provider.

Which airports are included, and can I retrieve inactive records?

By default, only active records are returned, without restricting results to airports with commercial flights. Use major_only=1 for that restriction, and show_disabled=1 to include inactive or disabled records. Inspect active, major_airport and sub_type before offering records in a booking selector.

Can I store the airport directory locally?

Yes, with an appropriate GEO Essentials license. Export with dump=1 in JSON, XML or CSV. Retain airhex_id and updated and refresh your local directory periodically.

Can I use the UTC offset for every travel date?

Use timezone with the actual travel timestamp and a date-aware library. The utc field is an offset in the record; it does not describe every date’s daylight-saving rules.

Are coordinates terminal or pickup locations?

The coordinates describe the airport location. Do not treat them as terminal, gate or pickup coordinates. Use more specific location and routing data for ground-transfer directions.

Does this endpoint return live flights or fares?

No. It provides airport reference data. Use your flight supplier for schedules, availability, fares and live flight status.

Explore the Airport Time Zone API guide and Airport Coordinates API guide for implementation details.

Help travelers find and recognize the right airport

Bring clear airport choices, location details and local-time context into your booking experience, while Airhex maintains the airport reference data.