GET /api/v1/flights/airports
Airport autocomplete for origin/destination inputs. No authentication required. Supports 30+ language locales.
Airport autocomplete for origin/destination search inputs. Accepts an IATA code, city name, or airport name. Returns matching airports from a global database. No authentication required.
Permission: Public (no API key needed)
Designed for debounced typeahead — throttle requests to avoid overloading (recommended: 300 ms debounce). The response is a flat array of airport objects, not a wrapped object.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | Yes | IATA code (e.g. ALG), city name (e.g. Paris), or airport name |
locale | string | No | Language for airport and city names. Default en. See Supported locales. |
Request examples
# IATA code lookup
curl "https://api.fx-port.com/api/v1/flights/airports?query=CDG&locale=en"# City name search, French locale
curl "https://api.fx-port.com/api/v1/flights/airports?query=Paris&locale=fr"# Arabic locale (airport names in Arabic)
curl "https://api.fx-port.com/api/v1/flights/airports?query=ALG&locale=ar"Response example
The response is a flat array of airport objects (not a wrapped {results:[...]} object).
[
{
"ap": "CDG",
"airportname": "Charles de Gaulle",
"cityname": "Paris, France",
"cc": "FR",
"country": "France",
"timezone": "Europe/Paris",
"utc": "+02:00",
"lat": 49.01278,
"lng": 2.55,
"displayname": "Charles de Gaulle, Paris, France, (CDG)",
"shortdisplayname": "Paris, France (CDG)"
},
{
"ap": "ORY",
"airportname": "Orly",
"cityname": "Paris, France",
"cc": "FR",
"country": "France",
"timezone": "Europe/Paris",
"utc": "+02:00",
"displayname": "Orly, Paris, France, (ORY)",
"shortdisplayname": "Paris, France (ORY)"
}
]Key field reference
| Field | Description |
|---|---|
ap | IATA airport code — use as origin or destination in search requests |
airportname | Airport name in the requested locale |
cityname | City and country in the requested locale |
cc | ISO 3166-1 alpha-2 country code |
country | Country name |
timezone | IANA timezone (e.g. Europe/Paris) |
utc | UTC offset at query time |
displayname | Full display label — suitable for showing in a result list |
shortdisplayname | Short display label — suitable for showing selected value |
The response contains additional internal fields (coordinates, entity keys, popularity data) that are not listed here. Use only the fields documented above; internal fields may change.
Supported locales
Pass as locale=XX in the query string. Unrecognised values default to en.
locale | Language |
|---|---|
en | English (default) |
fr | French |
ar | Arabic |
de | German |
es | Spanish |
es-AR | Spanish (Argentina) |
it | Italian |
pt | Portuguese |
nl | Dutch |
nl-BE | Dutch (Belgium) |
pl | Polish |
cs | Czech |
ru | Russian |
uk | Ukrainian |
el | Greek |
ro | Romanian |
da | Danish |
no | Norwegian |
sv | Swedish |
fi | Finnish |
tr | Turkish |
he | Hebrew |
ko | Korean |
ja | Japanese |
zh-CN | Chinese (Simplified) |
zh-TW | Chinese (Traditional) |
th | Thai |
id | Indonesian |
ms | Malay |
vi | Vietnamese |
en-PH | English (Philippines) |
Locale affects airport and city name translations. IATA codes (ap, cc) are always in ASCII.