FX-Port API
Flights

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

ParameterTypeRequiredDescription
querystringYesIATA code (e.g. ALG), city name (e.g. Paris), or airport name
localestringNoLanguage 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

FieldDescription
apIATA airport code — use as origin or destination in search requests
airportnameAirport name in the requested locale
citynameCity and country in the requested locale
ccISO 3166-1 alpha-2 country code
countryCountry name
timezoneIANA timezone (e.g. Europe/Paris)
utcUTC offset at query time
displaynameFull display label — suitable for showing in a result list
shortdisplaynameShort 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.

localeLanguage
enEnglish (default)
frFrench
arArabic
deGerman
esSpanish
es-ARSpanish (Argentina)
itItalian
ptPortuguese
nlDutch
nl-BEDutch (Belgium)
plPolish
csCzech
ruRussian
ukUkrainian
elGreek
roRomanian
daDanish
noNorwegian
svSwedish
fiFinnish
trTurkish
heHebrew
koKorean
jaJapanese
zh-CNChinese (Simplified)
zh-TWChinese (Traditional)
thThai
idIndonesian
msMalay
viVietnamese
en-PHEnglish (Philippines)

Locale affects airport and city name translations. IATA codes (ap, cc) are always in ASCII.

On this page