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.8/airports
Example Request
https://content.airhex.com/api/v3.7.8/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 airport type: 1 for commercial airports; 0 for minor or non-commercial facilities (helipads, military bases, 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 | 17441 | Average weekly departure count (including codeshare flights) |
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 |
working_hours | Monday: Open 24 hours Tuesday: Open 24 hours Wednesday: Open 24 hours Thursday: Open 24 hours Friday: Open 24 hours Saturday: Open 24 hours Sunday: Open 24 hours | Operating hours (stored as plain text with line breaks) |
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",
"postcovid_flights_count": "2200",
"avg_weekly_flights": "17441",
"major_airport": 1,
"address": "Longford TW6, UK",
"phone_local": "0844 335 1801",
"phone_intl": "+44 844 335 1801",
"working_hours": "Monday: Open 24 hours\nTuesday: Open 24 hours\nWednesday: Open 24 hours\nThursday: Open 24 hours\nFriday: Open 24 hours\nSaturday: Open 24 hours\nSunday: Open 24 hours",
"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>
<postcovid_flights_count>2200</postcovid_flights_count>
<avg_weekly_flights>17441</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>
<working_hours>Monday: Open 24 hours
Tuesday: Open 24 hours
Wednesday: Open 24 hours
Thursday: Open 24 hours
Friday: Open 24 hours
Saturday: Open 24 hours
Sunday: Open 24 hours</working_hours>
<website>https://www.heathrow.com</website>
<sub_type></sub_type>
</airport>
</airports>