Airport Data API Reference
Everything you need to call the API: your key, the requests, every field of the answer, the limits and the errors.
Start in one minute
1. Get a free key on the Airport Data API page (50 calls a month).
2. Send it in the X-API-Key header.
3. Read the JSON answer.
curl -H "X-API-Key: YOUR_KEY" "https://closeflight.com/data-api/v1/airports/?code=DXB"
GETFind airports
https://closeflight.com/data-api/v1/airports/ — send one of these:
| Parameter | What it does | Example |
|---|---|---|
code | One airport by its 3-letter IATA or 4-letter ICAO code | code=LHR |
search | City, airport name or code, 2 to 80 characters. For a search box as people type. | search=heathrow |
country | The main airports of a country (2-letter ISO code) | country=GB |
limit | How many results, 1 to 20 | limit=5 |
GETNearby airports
https://closeflight.com/data-api/v1/airports/near/?lat=25.2&lon=55.3 — airports by distance from a point. Each result also has distance_km.
Fields of each airport
| Field | Meaning |
|---|---|
iata, icao | Airport codes. icao is null when we do not have it. |
name, city, country, country_code | Names in English and the 2-letter ISO country code. |
latitude, longitude | Airport location. |
elevation_ft | Height above sea level in feet, or null. |
timezone, utc_offset_now | Time zone name (for example Asia/Dubai) and its offset from UTC in hours right now, summer time included. |
size | large, medium or small. |
scheduled_service | true when the airport has scheduled flights, false when not, null when unknown. |
passenger_flights | Does the airport have passenger flights? yes: scheduled flights. no: no scheduled flights. closed: all passenger flights moved. not_for_passenger_flights: military or business-jet field. unknown. Closed and non-passenger airports are found only by their own code, never in a name or city search. |
flight_offer_seen_on_closeflight | The last day a flight offer for this airport showed up in searches on CloseFlight, or null. A different fact from the one above: null only means nobody searched it on our site yet, not that the airport has no flights. Example: CCE has scheduled flights (yes) and may still be null here. |
use_instead | For a closed or non-passenger airport: the airport travellers use instead. Otherwise null. |
seen_in_our_searches | What flight offers on CloseFlight showed for this airport, updated every Monday:destinations_from_here: destinations offered from it (up to 300).airlines_departing_or_arriving: airlines in offers to or from it (up to 150).tracking: active, not_started (before the first weekly update) or unavailable (lists cannot be read right now).An empty list means not seen yet, not that no flight exists. A pair not seen for 180 days is removed. |
data_status, uncertain_fields | no_open_issue, under_review (with the fields under review) or unknown. |
dataset_updated_at | When the whole airport table was last renewed (every week). |
matched_on, group, distance_km | Only in search and nearby answers. matched_on: why it matched (iata, icao, city_code, city, name, close_spelling: show "Did you mean...?"). group: main, or other_city_same_name for a city of the same name in another country (Paris, United States after Paris, France). distance_km: how far it is. |
Example answer
{
"data": [
{
"iata": "DXB",
"icao": "OMDB",
"name": "Dubai International Airport",
"city": "Dubai",
"country": "United Arab Emirates",
"country_code": "AE",
"latitude": 25.2498,
"longitude": 55.371,
"timezone": "Asia/Dubai",
"utc_offset_now": 4,
"size": "large",
"scheduled_service": true,
"elevation_ft": 62,
"passenger_flights": "yes",
"use_instead": null,
"flight_offer_seen_on_closeflight": "2026-11-22",
"data_status": "no_open_issue",
"uncertain_fields": [],
"seen_in_our_searches": {
"tracking": "active",
"airlines_departing_or_arriving": ["EK", "FZ"],
"destinations_from_here": ["LHR", "CAI"]
},
"dataset_updated_at": "2026-11-23T05:00:05+00:00"
}
],
"meta": { "count": 1, "demo": false },
"request_id": "req_1a2b3c4d5e6f"
}
Limits
| Try box (Airport Data API page) | Free key | |
|---|---|---|
| Calls | 3 a day; a search with no result does not count | 50 every 30 days for each agency |
| Results a call | 3 | 5 |
| Different airports a day | — | 2,000 (repeats do not count) |
Days reset at 00:00 UTC. The free key counts in 30-day periods that start when your agency got its first key; a new key keeps the same period and count. Every keyed answer shows meta.calls_left and meta.calls_reset_at. API only: there is no bulk download. Paid plans with higher limits are coming.
Errors
Every error has the same shape, with a sentence that says what to do:
{ "error": { "code": "daily_limit", "message": "...", "how_to_fix": "..." }, "request_id": "req_..." }
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_code, bad_search, bad_country, bad_location, missing_query | The request is not complete or not valid. |
| 401 | missing_key, invalid_key | No key, or the key is not valid. |
| 404 | not_found | No airport with this code. |
| 429 | monthly_limit, daily_limit, demo_limit, daily_records_limit, too_many_key_tries | A limit is reached. The Retry-After header says when to try again. |
| 500, 503 | server_error, service_unavailable | A problem on our side. Try again in a minute; send us the request_id if it continues. |
For developer tools: OpenAPI file.