Skip to content
FX-Port/Docs
GuidesAPI referenceChangelog
Get API keys
  • Introduction
  • Quickstart
  • Security
  • Authentication
  • Environments and Postman
  • Sandbox
  • Conventions and naming
  • Legacy names and twins
  • Errors
  • Rate limits and fair use
  • Streaming search results

Concepts

  • Overview
  • Booking flows
  • Passengers and ages
  • Pricing
  • Post-booking operations

Search and price

  • Airport autocomplete
  • Search flights
  • Basic routes
  • Passengers and cabins
  • Filters
  • Supplier selection
  • Open-jaw and multi-city
  • Flexible dates
  • Price an offer

Book, pay and cancel

  • Book
  • Quote a held booking
  • Pay a held booking
  • Cancel a held booking
  • Quote a cancellation
  • Confirm a cancellation

After booking

  • Get a booking
  • Get the ticket PDF
  • Get the ticket number
  • ACD passport uploads
  • Use these docs with AI

Flights · Search and price

Airport autocomplete

Airport autocomplete for origin and destination inputs. No authentication required. Supports 30+ language locales.

GET/api/v1/flights/airports

Airport autocomplete for origin and destination inputs. Accepts an IATA code, a city name or an airport name and returns matching airports and cities from a global database. No authentication is required.

Permission: Public (no API key). The two endpoints of this page are not counted by the key rate limits, but they are limited per IP address: debounce your typeahead.

Built for a debounced typeahead: wait about 300 ms after the last keystroke and cancel the request that is in flight. The answer is a flat array, not an object, and it has no environment key. It carries Cache-Control: public, max-age=60, s-maxage=300: a browser can reuse an answer for a minute and a CDN for five.

Search airports

GET /api/v1/flights/airports

Query parameters

ParameterTypeRequiredDescription
querystringYesAn IATA code (ALG), a city (Paris) or an airport name: 1 to 64 characters once cleaned (control characters are removed and runs of spaces become one). One letter is valid (a prefix of a code).
localestringNoThe language of the names. Default en. Written ll or ll-RR; case and _ or - are normalised (FR is fr, es_ar is es-AR) and anything else is read as 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, French names
curl "https://api.fx-port.com/api/v1/flights/airports?query=Paris&locale=fr"

# Arabic names
curl "https://api.fx-port.com/api/v1/flights/airports?query=ALG&locale=ar"

Response example

The response is a flat array of records. A real record has about 40 keys (it is the answer of an airport search service, forwarded as it is); only the ones below are meant for your use. This is the answer for query=ALG:

[
  {
    "ap": "ALG",
    "airportname": "Houari Boumediene",
    "cityname": "Algiers, Algeria",
    "cc": "DZ",
    "country": "Algeria",
    "timezone": "Africa/Algiers",
    "utc": "+01:00",
    "lat": 36.6985,
    "lng": 3.20672,
    "displayname": "Houari Boumediene, Algiers, Algeria, (ALG)",
    "shortdisplayname": "Algiers, Algeria (ALG)",
    "loctype": "ap",
    "cityonly": "Algiers",
    "isMetroOnly": false
  },
  {
    "ap": "AHO",
    "airportname": "Alghero-Fertilia",
    "cityname": "Alghero, Sardinia, Italy",
    "cc": "IT",
    "country": "Italy",
    "timezone": "Europe/Rome",
    "utc": "+02:00",
    "displayname": "Alghero-Fertilia, Alghero, Sardinia, Italy, (AHO)",
    "shortdisplayname": "Alghero, Sardinia, Italy (AHO)"
  }
]

Key fields

FieldDescription
apThe IATA code: use it as origin or destination in a search.
airportnameThe airport name in the requested locale.
citynameCity and country in the requested locale.
cityonlyThe city alone.
ccISO 3166-1 alpha-2 country code.
countryThe country name.
timezoneThe IANA time zone, for example Europe/Paris.
utcThe UTC offset at the time of the query.
lat, lngCoordinates.
displaynameA full label for a result list.
shortdisplaynameA short label for the selected value.
isMetroOnlytrue for a city code that stands for all the airports of a city (PAR, "All airports"): it is valid as an origin or destination.

A query for PAR returns the city entry (ap: "PAR", isMetroOnly: true) first, then CDG, ORY, BVA, LBG and other airports near Paris.

The other keys (identifiers, bounding boxes, images, search-form strings, display types ...) are raw data of the lookup service, mixed in lower case, camelCase and snake_case. They are not part of the API and can change: use only the fields above.

Errors

StatusCodeWhen
422invalid_queryquery is blank, or longer than 64 characters once cleaned. errors[0].field is query.
422validation_errorquery is missing (errors[0].field is query) or empty.
429rate_limit_exceededToo many lookups from one IP address. Wait for the seconds in Retry-After.
502 / 504The lookup service failed (502) or timed out (504). Retry once after a moment.

When the lookup service is down, the endpoint can answer 200 with up to 10 airports from a local list instead of an error.

Top airports

GET /api/v1/flights/top-airports returns the most searched airports, for the first suggestions of an empty search box. No key is needed.

ParameterTypeRequiredDescription
airport_typestringNofrom (default) for departure airports or to for arrival airports.
localestringNoThe language of the names, read as for search airports. Default en.
limitintegerNoHow many airports, 1 to 10. Default 5.
market_regionstringNoA country or region code, to rank airports for one market.
curl "https://api.fx-port.com/api/v1/flights/top-airports?airport_type=to&locale=fr&limit=2"

The answer is { "environment": "live", "airports": [...], "context": { "locale", "airport_type", "agency_id", "market_region" } }. context echoes what the ranking used: locale and market_region (upper case; null when you sent none), and agency_id, an internal ranking scope of FX-Port's own apps that is null in your answers. Without a key environment is always live. Each airport has the fields of the table above plus payload_locale, popularity_score, popularity_scopes (locale and global scores), recent_score and last_seen_day. An invalid airport_type or a limit outside 1 to 10 is answered with 422.

Supported locales

Pass locale=XX in the query string.

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)

The locale changes the names of airports and cities. The IATA code (ap) and the country code (cc) are always the same. A well-formed value that is not in the list (xx) is not rejected: it is passed on to the lookup service, and in our tests the names came back in English.

Related

  • Search flights: the next step, with the ap code.
PreviousPost-booking operationsNext Search flights

On this page

  • Search airports
  • Query parameters
  • Request examples
  • Response example
  • Key fields
  • Errors
  • Top airports
  • Supported locales
  • Related

© 2026 FX-Port

TermsPrivacy[email protected]