Airports GEO data and codes API
NOTE: This is the endpoint to fetch airports GEO data matched with IATA and ICAO codes. Full list of endpoints available here: https://airhex.com/api/
Don't have an API key for airports GEO data API but want a try?
Get StartedEndpoint description
This endpoint retrieves specific airport GEO details or dumps the entire airports database with output in JSON, XML or CSV file
HTTP Request
GET https://content.airhex.com/api/v3.7.8/airports
Request Example
https://content.airhex.com/api/v3.7.8/airports?apikey=WcPi7fGFMTihmwdNxkn4XYwZtdhKuykg&iata=LHR
*Note: At least one of these parameters is required: iata/icao/city_code/country_code/name/dump
Request ParametersParameter | Required | Value | Type | Default | Description |
---|---|---|---|---|---|
apikey | Required | Any | String | none | API key received from us. Contact us if you don't have one yet. |
iata | Required* (at least one parameter with asterisk required) | AAA-ZZZ | String | none | 3 char code for a specific airport (matched with IATA airport code) |
icao | Required* (at least one parameter with asterisk required) | AAAA-ZZZZ | String | none | 4 char code for a specific airport (matched with ICAO airport code) |
city_code | Required* (at least one parameter with asterisk required) | AAA-ZZZ | String | none | 3 char city code (matched with IATA city code) |
country_code | Required* (at least one parameter with asterisk required) | AA-ZZ | String | none | 2 char country code (ISO 3166-1 Alpha-2) |
name | Required* (at least one parameter with asterisk required) | Any | String | none | Name of a specific airport or multiple airports. Search will be performed for airports contains name provided with this parameter. |
dump | Required* (at least one parameter with asterisk required) | 0 or 1 | Integer | 0 | Set as "1" to get all entries from the database. Other required parameters will be ignored |
response_type | Optional | JSON or XML or CSV | String | JSON | Types of responses: JSON, XML or CSV (CSV downloads as a file) |
major_only | Optional | 0 or 1 | Integer | 0 | Set as "1" to exclude airports with no commercial flights. This also filtering out seaplane bases, helipads, and military/airforce bases. |
Response Fields
Field | Example | Description |
---|---|---|
iata | LHR | 3 char airport code (matched with IATA airport code) |
icao | EGLL | 4 char airport code (matched with ICAO airport code) |
name | London Heathrow Airport | Airport name |
city_code | LON | 3 char code of the city where airport is located (matched with IATA city code) |
country_code | GB | ISO 3166-1 Alpha-2, 2 char country code of a specific airport |
timezone | Europe/London | Timezone of the airport |
utc | 1 | Airport UTC time difference |
latitude | 51.469603 | Latitude of a airport location |
longitude | -0.453566 | Longitude of a airport location |
major_airport | 1 | 1 for major airports that excludes airports with no commercial flights. This also excludes seaplane bases, helipads, and military/airforce bases. 0 for all minor airports based on rules mentioned. |
sub_type | Sub-type if not an airport. Possible values - Rail, Bus/Limo, Ferry/Port, Border/Customs/Port of Entry | |
active | 1 | 1 for active airports and 0 for non-active airports |
avg_weekly_flights | 17441 | Average number of weekly departures from the airport (includes codeshare flights) |
address | Longford TW6, UK | Full airport address |
phone_local | 0844 335 1801 | Local airport phone number |
phone_intl | +44 844 335 1801 | Airport phone number with 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 | Working hours. Stored as a text with \n line break between days |
website | https://www.heathrow.com | Airport website |
Response Example (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
}
]
Response Example (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>