Airports API Reference
Airports Database API — IATA and ICAO codes of 16,448 airports. Complete reference for the airports endpoint — query airports with nested city and country data.
On this page
API Reference
Authentication
All API requests require a valid API key. Pass it as a Bearer token in the Authorization header, or via the X-API-Key header. Keys are delivered immediately after subscribing.
Don't have an API key yet? Get started — you'll have a key in minutes.
# Bearer token (recommended)
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=JFK"
# Alternative: X-API-Key header
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=JFK"
https://api.airhex.com/v1
/airports
Query airport data. Returns a JSON object with a `data` array of matching airports (each enriched with nested city and country objects), a `total` count, and a `truncated` flag. At least one filter parameter is required on Starter plans. Sandbox and Starter plans return a limited number of results per filter query (3 and 10 respectively).
Parameters
| Name | In | Required | Description |
|---|---|---|---|
iata |
query | Optional | IATA 3-letter airport code (e.g. LHR). Comma-separated for multiple codes (e.g. LHR,CDG,JFK — max 100). Returns all airports matching each code, deduplicated. Multi-code requires Growth or Enterprise. |
icao |
query | Optional | ICAO 4-letter airport code (e.g. EGLL). Comma-separated for multiple codes (e.g. EGLL,LFPG,KJFK — max 100). Multi-code requires Growth or Enterprise. |
name |
query | Optional | Case-insensitive substring search on airport name. Minimum 2 characters. |
city_name |
query | Optional | Case-insensitive substring search on city name (e.g. "London"). Returns all airports in matching cities sorted by traffic volume. |
city_code |
query | Optional | IATA city code (e.g. LON). Returns all airports serving that city. |
country_code |
query | Optional | ISO 3166-1 alpha-2 country code (e.g. GB). Returns all airports in that country. |
major_only |
query | Optional | Set to 1 to include only major commercial airports. Growth & Enterprise only — Starter plans receive 403. |
city and country objects. Fields within those objects are also filtered by plan tier.
total (full match count) and truncated: true when results are capped. Growth and Enterprise return all results.
notice field. Sandbox data is for evaluation and integration testing only — it may not be used in production or commercial products.
Response Fields
Airport object
| Field | Type | Plan | Description |
|---|---|---|---|
iata |
string | All | IATA 3-letter airport code (e.g. "LHR") |
icao |
string | All | ICAO 4-letter airport code (e.g. "EGLL") |
name |
string | All | Airport name (e.g. "London Heathrow Airport") |
city_code |
string | All | IATA city code (e.g. "LON") |
country_code |
string | All | ISO 3166-1 alpha-2 country code (e.g. "GB") |
active |
boolean | All | Active flag: true = operational, false = closed |
sub_type |
string | All | Classification: "Airport", "Train Station", "Bus Station", "Heliport", etc. |
latitude |
string | Growth Enterprise | Decimal latitude (e.g. "51.4706") |
longitude |
string | Growth Enterprise | Decimal longitude (e.g. "-0.4619") |
timezone |
string | Growth Enterprise | IANA timezone identifier (e.g. "Europe/London") |
utc |
string | Growth Enterprise | UTC offset (e.g. "+0", "+5.5") |
avg_weekly_flights |
string | Growth Enterprise | Average weekly departures — traffic indicator (e.g. "6542") |
major_airport |
boolean | Growth Enterprise | Major airport flag: true = major commercial hub, false = other |
website |
string | Growth Enterprise | Airport website URL |
phone_local |
string | Growth Enterprise | Local phone number |
phone_intl |
string | Growth Enterprise | International phone number with country code |
address |
string | Growth Enterprise | Physical address |
Nested city object
| Field | Type | Plan | Description |
|---|---|---|---|
code |
string | All | IATA city code (e.g. "LON") |
name |
string | All | City name (e.g. "London") |
country_code |
string | All | ISO 3166-1 alpha-2 country code |
state_short |
string | All | State or province abbreviation (e.g. "ENG") |
state_full |
string | All | State or province full name (e.g. "England") |
latitude |
string | Growth Enterprise | City center decimal latitude |
longitude |
string | Growth Enterprise | City center decimal longitude |
timezone |
string | Growth Enterprise | IANA timezone identifier |
gmt |
string | Growth Enterprise | GMT offset (e.g. "0", "5.5") |
population |
string | Growth Enterprise | City population |
popularity |
string | Growth Enterprise | Traffic-based popularity score |
city_photo |
string | Growth Enterprise | City photo URL |
Nested country object
| Field | Type | Plan | Description |
|---|---|---|---|
code2 |
string | All | ISO 3166-1 alpha-2 code (e.g. "GB") |
code3 |
string | All | ISO 3166-1 alpha-3 code (e.g. "GBR") |
name |
string | All | Country name (e.g. "United Kingdom") |
iso |
string | Growth Enterprise | ISO 3166-1 numeric code (e.g. "826") |
capital_code |
string | Growth Enterprise | IATA code of the capital city (e.g. "LON") |
currency_code |
string | Growth Enterprise | ISO 4217 currency code (e.g. "GBP") |
region |
string | Growth Enterprise | Geographic region (e.g. "Europe") |
continent_code |
string | Growth Enterprise | Continent code (e.g. "EU") |
population |
string | Growth Enterprise | Country population |
phone_code |
string | Growth Enterprise | International dialing code (e.g. "44") |
Response Example
{
"data": [
{
"iata": "LHR",
"icao": "EGLL",
"name": "London Heathrow Airport",
"city_code": "LON",
"country_code": "GB",
"active": true, // Starter+
"sub_type": null, // Starter+
"latitude": "51.469603", // Growth+
"longitude": "-0.453566", // Growth+
"timezone": "Europe/London", // Growth+
"utc": "1", // Growth+
"avg_weekly_flights": "1587", // Growth+
"major_airport": true, // Growth+
"website": "https://www.heathrow.com", // Growth+
"phone_local": "0844 335 1801", // Growth+
"phone_intl": "+44 844 335 1801", // Growth+
"address": "Longford TW6, UK", // Growth+
"city": {
"code": "LON",
"name": "London",
"country_code": "GB",
"state_short": null, // Starter+
"state_full": null, // Starter+
"latitude": "51.5073509", // Growth+
"longitude": "-0.1277583", // Growth+
"timezone": "Europe/London", // Growth+
"gmt": "1", // Growth+
"population": "9648110", // Growth+
"popularity": "34038532", // Growth+
"city_photo": "https://content.airhex.com/content/city_photos/4241.jpg" // Growth+
},
"country": {
"code2": "GB",
"code3": "GBR", // Starter+
"name": "United Kingdom",
"iso": "826", // Growth+
"capital_code": "LON", // Growth+
"currency_code": "GBP", // Growth+
"region": "Europe", // Growth+
"continent_code": "EU", // Growth+
"population": "62348447", // Growth+
"phone_code": "+44" // Growth+
}
}
],
"total": 1,
"truncated": false
}
Examples
Airport lookup by IATA code
Get London Heathrow with nested city and country data.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=LHR"
Search airports by city name
Find all airports serving cities matching "London" — returns Heathrow, Gatwick, Stansted, etc., sorted by traffic.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?city_name=London"
Major airports in a country (Growth & Enterprise)
List only major commercial airports in Germany.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?country_code=DE&major_only=1"
Multi-code airport lookup (Growth & Enterprise)
Retrieve multiple airports by comma-separated IATA codes in a single request.
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.airhex.com/v1/airports?iata=LHR,CDG,JFK,NRT,SIN"
Error Codes
| Code | Description |
|---|---|
400 | Bad request — invalid query parameters (e.g. name or city search under 2 characters) |
401 | Unauthorized — missing or invalid API key. Check your Authorization header. |
403 | Forbidden — your plan does not permit this operation (e.g. bulk listing on Starter, major_only filter on Starter, inactive API key) |
404 | Not found — no matching airport for the given code |
429 | Too many requests — per-second rate limit exceeded. Back off and retry. |
503 | Service temporarily unavailable. Retry after a few seconds. |
Rate Limits
All plans include unlimited monthly requests with fair-use rate limiting enforced per second. Standard rate headers (RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset) are included in every response. Responses also include Cache-Control headers — caching responses locally is recommended to stay well within limits.
https://content.airhex.com/api/v3.7.9/airports
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.
Example Request:
https://content.airhex.com/api/v3.7.9/airports?apikey=YOUR_API_KEY&iata=LHR
Request Parameters
| Name | Required | Range | Type | Default | Description |
|---|---|---|---|---|---|
apikey |
Yes | Any | String | none | Your assigned API key |
iata |
No | AAA-ZZZ | String | none | Three-letter IATA airport code |
icao |
No | AAAA-ZZZZ | String | none | Four-letter ICAO airport code |
city_code |
No | AAA-ZZZ | String | none | Three-letter IATA city code |
country_code |
No | AA-ZZ | String | none | Two-letter ISO 3166-1 Alpha-2 country code |
name |
No | Any | String | none | Airport name or partial match substring |
dump |
No | 0 or 1 | Integer | 0 | Set to 1 to export the complete database (ignores other parameters) |
response_type |
No | JSON, XML, CSV | String | JSON | Response format: JSON, XML, or CSV (CSV initiates file download) |
major_only |
No | 0 or 1 | Integer | 0 | Set to 1 to include only airports with commercial flights |
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 |
timezone |
Europe/London | Airport's time zone identifier |
utc |
1 | Airport's time offset from UTC |
latitude |
51.469603 | Geographic latitude |
longitude |
-0.453566 | Geographic longitude |
major_airport |
1 | Indicates if the airport has scheduled commercial flights (1 = yes, 0 = no) |
sub_type |
Facility subtype (e.g., Rail, Bus/Limo, Ferry/Port) if not an airport | |
active |
1 | Operational status: 1 active, 0 inactive |
avg_weekly_flights |
1587 | Average weekly scheduled flight count |
address |
Longford TW6, UK | Physical address |
phone_local |
0844 335 1801 | Local phone contact |
phone_intl |
+44 844 335 1801 | International phone contact |
website |
https://www.heathrow.com | Official airport website URL |
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",
"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
}
]
Ready to integrate airport data?
Get your API key and start querying airport data in minutes.
Get Started
Trusted by leading aviation & travel companies









