Locations API
API Endpoint
https://api.skypicker.comImportant notice
This website does not contain documentation of the newest features.
If you are a new user of the Kiwi.com
APIs, we highly recommend using
tequila.kiwi.com.
To access Tequila documentation, create an account.
If you have any questions, use the Tequila support page.
‘Locations’ is a simple API used to search, suggest and resolve locations in various situations.
Resource Group ¶
Locations Collection ¶
Locale setting
Every search in this collection accepts locale
GET argument which sets output locale to your specified locale.
This is optional and defaults to locale ‘en’.
Available locales:
ar-AE | cs-CZ | da-DK | de-DE | el-GR | en-US |
es-ES | fi-FI | fr-FR | hu-HU | is-IS | it-IT |
iw-IL | ja-JP | ko-KR | lt-LT | ms-MY | nl-NL |
no-NO | pl-PL | pt-BR | pt-PT | ro-RO | ru-RU |
sk-SK | sr-RS | sv-SE | th-TH | tr-TR | uk-UA |
zh-CN | zh-TW |
Output location types
Every search in this collection accepts location_types
list, which is optional and decides
what types of locations will be on the output. If not specified the output will contain all types, such as
airport
, station
, city
, subdivision
, autonomous_territory
, country
, region
and continent
.
You are able to specify one or more location types by appending more &location_types=
to your query string.
Limiting the output
Every search request has a limit
parameter to set maximum number of results. The default is 20.
Sorting the output
All requests type except id and slug requests can have the output sorted according
to specified sort
parameters.
Multiple types of sortings are supported:
-
name
- localized according to specified locale. -
rank
- importance/popularity of location (locale dependent) -
_type
- type of the location, e.g.airport
The default sorting order is set to ‘ascending’. Descending order can be set by adding a minus sign in front of the parameter, eg. -rank
.
Multiple sorting parameters can be set. The order of their appearance in url determines priority in sorting.
Please note
-
Only active parameters have been described in this document. Parameters that are not described are deprecated.
-
All URLs must be encoded (for example use
%3B
instead of;
) -
The responses are G-zipped and need to be unpacked (response header Content-Encoding: gzip).
-
These characters should not be found in IDs:
:.?!*\'\"„"ʻ()+&@#%~|
-
In case of using dump requests and query with a flag
active_only = false
, consider splitting the request to several smaller requests (e.g. by location types).
Otherwise, you would not receive all the locations.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Search by queryGET/locations?term={term}&locale={locale}&location_types={location_types}&limit={limit}&active_only={active_only}&sort={sort}
Type of request used mainly for suggestions (based on incomplete names)
- term
string
(required) Example: PRGsearched term (for suggestions). This parameter expects a full IATA code. If IATA code is not given, the search will go through other available fields: ‘name’ or ‘code’ of the location. It also depends on the ‘location_types’ specified eg. airport, city, country. The search that is used behind the scenes is elasticsearch. It returns data based on relevancy and many other factors.
- locale
string
(optional) Example: en-USdesired locale output - this is the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- location_types
list
(optional) Example: airportdesired location output, accepted values:
station
,airport
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. To use more than onelocation_types
, use multiple&location_types=
- limit
integer
(optional) Example: 10default value = 10. Desired number of results in the output.
- active_only
string
(optional) Example: truedefault value = true. It displays all active locations.
- sort
string
(optional) Example: nameFor A->Z use ‘sort=name’, for Z->A use ‘sort=-name’.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing requests parameters, invalid parameter values
Location specified by term
(id or slug) does not exist
Search by radiusGET/locations?type=radius&term={term}&lat={lat}&lon={lon}&radius={radius}&locale={locale}&location_types={location_types}&limit={limit}&sort={sort}&active_only={active_only}
This type of request supports either specification of location by coordinates (lat
, lon
) or by identifier (slug or id of location - term
)
Radius range
You can use radius_from
and radius_to
instead of radius
parameter. If you set radius_from
to 50 km and radius_to
to 250 km, the response will show locations from 50 to 250 km.
- lat
float
(optional) Example: 40.730610latitude of the centre point of the search.
40.7
is also acceptable.- lon
float
(optional) Example: -73.935242longitude of the centre point of the search.
-73.9
is also acceptable.- term
string
(optional) Example: london_gbidentifier of the location - slug or id. You cannot specify coordinates & term in the same request.
- radius
float
(optional)the radius defaults to 250 km but can be changed
- locale
string
(optional) Example: en-USdesired locale output - this is the the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- location_types
list
(optional) Example: airportdesired location output, accepted values:
station
,airport
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. To use more than onelocation_types
, use multiple&location_types=
- limit
integer
(optional) Example: 20default value = 20. Desired number of results in the output.
- sort
string
(optional) Example: name- active_only
string
(optional) Example: truedefault value = true. It displays all active locations.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Search by boxGET/locations?type=box&low_lat={low_lat}&low_lon={low_lon}&high_lat={high_lat}&high_lon={high_lon}&locale={locale}&location_types={location_types}&limit={limit}&sort={sort}&active_only={active_only}
Get all locations within the specified box.
- low_lat
float
(required) Example: 40.200610latitude of southwest corner of geo box search;
40.2
is also acceptable.- low_lon
float
(required) Example: -74.624328longitude of southwest corner of geo box search;
-74.6
is also acceptable.- high_lat
float
(required) Example: 44.763212latitude of northeast corner of geo box search;
44.7
is also acceptable.- high_lon
float
(required) Example: -73.376543longitude of northeast corner of geo box search;
-73.3
is also acceptable.- locale
string
(optional) Example: en-USdesired locale output - this is the the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- location_types
list
(optional) Example: airportdesired location output, accepted values:
station
,airport
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. To use more than onelocation_types
, use multiple&location_types=
- limit
integer
(optional) Example: 20default value = 20. Desired number of results in the output.
- sort
string
(optional) Example: namedesired order of the output. For A->Z use ‘sort=name’, for Z->A use ‘sort=-name’.
- active_only
string
(optional) Example: truedefault value = true. It displayes all active locations.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Location specified by term
(id) does not exist
Get by subentityGET/locations?type=subentity&term={term}&locale={locale}&active_only={active_only}&location_types={location_types}&limit={limit}&sort={sort}
Get all locations that are below (in hierarchy) the one specified by id - e.g. for ?type=subentity&term=london_gb
all locations in London are returned (as London is city
, airports
, stations
and bus_stations
are returned).
- term
string
(required) Example: ZWthis is the exact IATA airport or ISO3166 location code - station, airport, bus_station, city, autonomous_territory, subdivision, country
- locale
string
(optional) Example: en-USdesired locale output - this is the the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- location_types
list
(optional) Example: airportdesired location output, accepted values:
station
,airport
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. To use more than onelocation_types
, use multiple&location_types=
- limit
integer
(optional) Example: 20default value = 20. Desired number of results in the output.
- sort
string
(optional) Example: namedesired order of the output. For A->Z use ‘sort=name’, for Z->A use ‘sort=-name’.
- active_only
string
(optional) Example: truedefault value = true. It displayes all active locations.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Get by idGET/locations?type=id&id={id}&locale={locale}&active_only={active_only}
Get location specified by its id.
- id
string
(required) Example: ZWthis is the exact IATA airport or ISO3166 location code -
station
,airport
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. Multiple ids can be specified by appending&id={id}
.- locale
string
(optional) Example: en-USdesired locale output - this is the the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- active_only
string
(optional) Example: truedefault value = true. It displayes all active locations.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Get by anythingGET/locations?type=general&key={key}&value={value}
Get locations specified by any of the following fields for example: id, int_id, code, icao, slug.
- key
string
(required) Example: int_idkey is the field in response. To be used in conjunction with the ‘value’ field.
- value
string
(required) Example: 1555value of the field selected in key. To be used in conjunctions with the ‘key’ field. It returns locations that match the specified conditions.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Get dumpGET/locations?type=dump&locale={locale}&location_types={location_types}&limit={limit}&sort={sort}&active_only={active_only}
Get dump of locations data in specified language.
When retrieving large amounts of locations (using type=dump), it is more efficient to use paginated response.
This can be done using parameter search_after
.
In addition, when retrieving paginated data, it is advised to use sort=id
, so the returned results are consistent.
The usage
- locale
string
(optional) Example: en-USdesired locale output - this is the the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- location_types
list
(optional) Example: airportdesired location output, accepted values:
station
,airport
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
. To use more than onelocation_types
, use multiple&location_types=
- limit
integer
(optional) Example: 20default value = 20. Desired number of results in the output.
- sort
string
(optional) Example: namedesired order of the output. For A->Z use ‘sort=name’, for Z->A use ‘sort=-name’.
- active_only
string
(optional) Example: truedefault value = true. It displayes all active locations.
- search_after
string
(required)default value = none. To get more locations than is set limit for locations API use this parameter as follows: For the first request
search_after
is not required. Once the response to the first request is received, it contains property (list)search_after
, e.g. ->"search_after":["0qh","station#0b000000000010000101000010111101"]
. For the next request (second page), use parameter in formsearch_after=0qh&search_after=station#0b000000000010000101000010111101
.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Location specified does not exist
Search top destinationsGET/locations?type=top_destinations&term={term}&locale={locale}&limit={limit}&sort={sort}&active_only={active_only}&source_popularity={source_popularity}&fallback_popularity={fallback_popularity}
This type of request returns a list of destinations most searched / clicked on / booked from the starting point term
. The limit
is used to limit the range of results.
- term
string
(required) Example: london_gbidentifier of the start point - slug or id (
airport
,station
,bus_station
,city
,subdivision
,autonomous_territory
,country
) More than one is possible.- locale
string
(optional) Example: en-USdesired locale output - this is the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- limit
integer
(optional) Example: 100default value = 100. Desired number of results in the output.
- sort
string
(optional) Example: sort=name- active_only
string
(optional) Example: truedefault value = true. It displays all active locations.
- source_popularity
string
(optional) Example: searchesbased on
searches
(default),bookings
orclicks
- fallback_popularity
string
(optional) Example: bookingsbased on
searches
,bookings
orclicks
. Can be left blank. Used if not enough results is returned bysource_popularity
.
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Location specified does not exist
Search by hashtagsGET/locations?type=hashtag&hashtag={hashtag}&term={term}&month={month}&locale={locale}&limit={limit}&sort={sort}&active_only={active_only}
This type of request returns a list of destinations most searched / clicked on / booked from the starting point term
. The limit
is used to limit the range of results.
- hashtag
string
(required) Example: beachhashtag that the returned location have to be tagged with.
- term
string
(optional) Example: london_gbidentifier of the location the returned locations should be part of - id (
airport
,station
,bus_station
,city
,subdivision
,autonomous_territory
,country
).- month
integer
(optional) Example: 1the month in which the hashtag should be valid. Multiple values are allowed.
- locale
string
(optional) Example: en-USdesired locale output - this is the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- limit
integer
(optional) Example: 100default value = 100. Desired number of results in the output.
- sort
string
(optional) Example: name- active_only
string
(optional) Example: truedefault value = true. It displays all active locations.
Headers
Content-Type: application/json
Body
{
"hashtags": [
"Hello, world!"
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"hashtags": {
"type": "array",
"description": "array of top hashtags for destinations"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Location specified does not exist
Top destinations` hashtags lookupGET/locations?type=top_hashtags&term={term}&limit={limit}&source_popularity={source_popularity}&fallback_popularity={fallback_popularity}
This type of request returns a list of destinations’ hashtags most searched / clicked on / booked from the starting point term
. In other words it can be understood as following: What are the most popular activies at the places that customers tend to search for / click / book when flying from term
?
The limit
is used to limit the range of results.
- term
string
(required) Example: london_gbidentifier of the start point - id (
airport
,station
,bus_station
,city
,subdivision
,autonomous_territory
,country
) More than one is possible.- limit
integer
(optional) Example: 100default value = 100. Desired number of results in the output.
- source_popularity
string
(optional) Example: searchesbased on
searches
(default),bookings
orclicks
- fallback_popularity
string
(optional) Example: bookingsbased on
searches
,bookings
orclicks
. Can be left blank. Used if not enough results is returned bysource_popularity
Slugs Collection ¶
Headers
Content-Type: application/json
Body
{
"locations": [
{
"id": "LCY",
"int_id": "9625",
"active": true,
"code": "LCY",
"name": "London City Airport",
"slug": "london-city-airport",
"alternative_names": [],
"rank": 0,
"timezone": "Europe/London",
"city": {
"id": "london_gb",
"name": "London",
"code": "LON",
"slug": "london",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lon": 0.054167,
"lat": 51.505
},
"alternative_departure_points": {
"id": "LHR",
"distance": 35.8,
"duration": 1.4
},
"type": "airport"
},
{
"id": "XAK",
"active": true,
"code": "XAK",
"name": "Herning Railway Station",
"slug": "erning-railway-station-herning-denmark",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Copenhagen",
"city": {
"id": "herning_dk",
"name": "Herning",
"code": "ZRY",
"slug": "herning-denmark",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "DK",
"code": "DK",
"name": "Denmark",
"slug": "denmark"
},
"region": {
"id": "nothern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "56.132625",
"lon": "8.977992"
},
"alternative_departure_points": {
"id": "KRP",
"distance": 0.461157,
"duration": 0.82
},
"type": "station"
},
{
"id": "PFL",
"active": true,
"code": "PFL",
"name": "Florenc",
"slug": "florenc-prague-czech-republic",
"alternative_names": [],
"rank": "127",
"timezone": "Europe/Prague",
"city": {
"id": "prague_cz",
"name": "Prague",
"code": "PRG",
"slug": "prague-czechia",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "CZ",
"code": "CZ",
"name": "Czechia",
"slug": "czechia"
},
"region": {
"id": "central",
"name": "Central Europe",
"slug": "central-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
}
},
"location": {
"lat": "50.132625",
"lon": "14.977992"
},
"alternative_departure_points": {
"id": "BRQ",
"distance": 200,
"duration": 2.5
},
"type": "bus_station"
},
{
"id": "london_gb",
"active": true,
"name": "London",
"slug": "london-united-kingdom",
"code": "LON",
"alternative_names": [],
"rank": "0",
"timezone": "Europe/London",
"population": "7556900",
"airports": "6",
"stations": "0",
"subdivision": "null",
"autonomous_territory": "null",
"country": {
"id": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"code": "GB"
},
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"name": "Europe",
"slug": "europe",
"code": "EU"
},
"location": {
"lat": "51.507351",
"lon": "-0.127758"
},
"type": "city"
},
{
"name": "California",
"id": "CA_US",
"active": true,
"slug": "california-united-states",
"code": "CA",
"alternative_names": [
"Kalifornie"
],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "northern",
"name": "Northern America",
"slug": "northern-america"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "38.555605",
"lon": "-121.468926"
},
"type": "subdivision"
},
{
"id": "PR",
"active": true,
"name": "Puerto Rico",
"slug": "puerto-rico-united-states",
"code": "PR",
"alternative_names": [],
"rank": "0",
"country": {
"id": "US",
"code": "US",
"name": "United States",
"slug": "united-states"
},
"region": {
"id": "caribbean",
"name": "Caribbean",
"slug": "caribbean"
},
"continent": {
"id": "north",
"code": "NA",
"name": "North America",
"slug": "north-america"
},
"location": {
"lat": "18.45",
"lon": "-66.1"
},
"type": "autonomous_territory"
},
{
"id": "GB",
"active": true,
"code": "GB",
"name": "United Kingdom",
"slug": "united-kingdom",
"alternative_names": [
"Velká Británie\""
],
"rank": "9",
"neighbours": [
"IE"
],
"organizations": [
"EU"
],
"region": {
"id": "northern",
"name": "Northern Europe",
"slug": "northern-europe"
},
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"location": {
"lat": "51.5",
"lon": "-0.083333"
},
"type": "country"
},
{
"id": "central_europe",
"active": true,
"name": "Central Europe",
"slug": "central-europe",
"alternative_names": [
"[]"
],
"rank": "127",
"continent": {
"id": "europe",
"code": "EU",
"name": "Europe",
"slug": "europe"
},
"type": "region"
},
{
"id": "europe",
"active": true,
"code": "EU",
"name": "Europe",
"slug": "europe",
"alternative_names": [
"[]"
],
"rank": "127",
"type": "continent"
}
],
"meta": {
"locale": {
"code": "en-US",
"status": "OK"
}
}
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"locations": {
"type": "array"
},
"meta": {
"type": "object",
"properties": {
"locale": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "locale used"
},
"status": {
"type": "string",
"description": "information if the locale has been found and used"
}
}
}
}
}
}
}
Bad request format, missing request’s params, invalid params’ values
Location specified by term
(slug) does not exist
Search by seo urlGET/locations?type=slug&term={term}&locale={locale}&active_only={active_only}
- term
string
(required) Example: albany-new-york-united-statesthis field expects the exact slug code of the
airport
,station
,bus_station
,city
,autonomous_territory
,subdivision
,country
,region
,continent
.- locale
string
(optional) Example: en-USdesired locale output - this is the language of the results. Should any other locale be used other than the specified locales, en-US is used.
- active_only
string
(optional) Example: truedefault value = true. It displayes all active locations.
Generated by aglio on 22 Feb 2022