Get the most searched airports
The most searched airports, for the first suggestions of an empty search box before the user types anything.
/api/v1/flights/top-airportsNo key is needed. airport_type chooses the ranking: from for departure airports (the default) or to for arrival airports. Add market_region, a country code, to rank for one market. Each airport has the fields of the airport lookup plus popularity_score, popularity_scopes (the locale and global scores), recent_score and last_seen_day. Without a key environment is always live.
curl 'https://api.fx-port.com/api/v1/flights/top-airports?airport_type=to&locale=en&limit=1'{
"environment": "live",
"airports": [
{
"ap": "JED",
"airportname": "King Abdulaziz Intl",
"cityname": "Jeddah, Saudi Arabia",
"cityonly": "Jeddah",
"cc": "SA",
"country": "Saudi Arabia",
"timezone": "Asia/Riyadh",
"utc": "+03:00",
"lat": 21.66982,
"lng": 39.15052,
"displayname": "King Abdulaziz Intl, Jeddah, Saudi Arabia, (JED)",
"shortdisplayname": "Jeddah, Saudi Arabia (JED)",
"loctype": "ap",
"isMetroOnly": false,
"payload_locale": "en",
"popularity_score": 366.667,
"popularity_scopes": {
"locale": 25.54597518549043,
"global": 97.28943021306868
},
"recent_score": 242,
"last_seen_day": "2026-11-01"
}
],
"context": {
"locale": "en",
"airport_type": "to",
"agency_id": null,
"market_region": null
}
}Request
Query parameters
airport_typestringfrom for departure airports or to for arrival airports.
One of from, to. Default from.
localestringThe language of the names, read as for the airport lookup.
Default en.
limitintegerHow many airports, 1 to 10.
Between 1 and 10. Default 5.
market_regionstringA country or region code (DZ, FR): ranks the airports for one market first. Also accepted as market_country.
Response
200The airports and what the ranking used.
environmentstringThe environment of the key that made the call: sandbox for fxp_test_ keys, live for fxp_live_ keys. Present in every JSON body.
One of sandbox, live.
airportsarray of objectThe most searched airports, most searched first. Each record has the fields of an airport plus payload_locale, popularity_score, popularity_scopes (locale and global), recent_score and last_seen_day.
ShowHide 14 attributes
apstringThe IATA code: use it as origin or destination in a search.
airportnamestringThe airport name in the requested locale.
citynamestringCity and country in the requested locale.
cityonlystringThe city alone.
ccstringISO 3166-1 alpha-2 country code.
countrystringThe country name.
timezonestringThe IANA time zone.
utcstringThe UTC offset at the time of the query.
latnumberLatitude.
lngnumberLongitude.
displaynamestringA full label for a result list.
shortdisplaynamestringA short label for the selected value.
loctypestringap for an airport, city for a city.
isMetroOnlybooleantrue for a city code that stands for all the airports of a city (PAR): valid as an origin or destination.
contextobjectWhat the ranking used.
ShowHide 4 attributes
localestringThe language of the names, normalised.
airport_typestringWhich ranking was used.
One of from, to.
agency_idstringnullableAn internal ranking scope of FX-Port's own apps: null in your answers.
market_regionstringnullableThe market_region you sent, in upper case; null when you sent none.
Errors
| Status | Code | Example message |
|---|---|---|
| 422 | validation_error | Input should be 'from' or 'to' |
The shape of the error body depends on the endpoint. See Errors for every shape and code.