Airports Database and Codes API
NOTE: This endpoint provides detailed geographic and operational data on airports, matched with official IATA and ICAO codes. View all available API endpoints.
Don't have an API key for airports database API but want a try?
Get StartedAPI 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 Address
GET https://content.airhex.com/api/v3.7.9/airports
Example Request
https://content.airhex.com/api/v3.7.9/airports?apikey=WcPi7fGFMTihmwdNxkn4XYwZtdhKuykg&iata=LHR
*Note: At least one query parameter (iata, icao, city_code, country_code, name, or dump) is required.
Request ParametersParameter | Required | Value | Type | Default | Description |
---|---|---|---|---|---|
apikey | Required | Any | String | none | Your assigned API key. Request a key if needed |
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 query parameters) |
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
Field | Example | Description |
---|---|---|
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 |
Example Response (JSON)
[
{
"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
}
]
Example Response (XML)
<?xml version="1.0" encoding="UTF-8"?>
<airports>
<airport>
<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>