List Cities
List Cities API returns a paginated list of all recorded airports cities, including for each the IATA code identifier and corresponding geospatial data.
Request
Endpoint
GET
/v4/{billing_plan}/account/{account_id}/flights/airports/cities
Path Parameters
Name |
Description |
Type |
Examples |
*{billing_plan} |
Billing plan to be applied to the call. |
string |
ondemand |
*{account_id} |
Provided identifier of the account. |
string |
|
Name |
Description |
Type |
Examples |
*x-api-key |
Provided API key {x_api_key} that allows authentication. |
string |
|
*Authorization |
Provided token {jwt_bearer} that allows authorization. |
string |
Bearer {jwt_bearer} |
Query Parameters
Name |
Description |
Type |
Examples |
Default |
iso_country |
Filter by country of the city in ISO 3166-1 alpha-2 standard format (in lower case). |
string |
uscnca |
|
type |
Filter by transportation hub type of the corresponding IATA code. |
string |
airportrailbusheliportferrymetrounknown |
|
page |
Requested page number for paginated results. |
int |
|
1 |
page_size |
Requested page size for paginated results in the range [1, 1000]. |
int |
|
25 |
Supported values for type
- airport
- rail
- bus
- heliport
- ferry
- metro
- unknown
Example
curl -X GET 'https://api.datappeal.io/v4/{billing_plan}/account/{account_id}/flights/airports/cities?page_size=2' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \
Response
Status
Status |
Description |
200 |
List Cities data has been successfully returned. |
Body
Airports
Field |
Description |
Type |
*results |
Paginated list of airports cities. |
array[City] |
paging |
Response pagination. |
Paging |
City
Field |
Description |
Type |
Examples |
*city_code |
IATA code of the city to which the airport belongs. |
string |
lonparmel |
*city |
Description of the city to which the airport belongs. |
string |
londonparismelbourne |
*iso_country |
Country to which the airport belongs in ISO 3166-1 alpha-2 standard format (in lower case). |
string |
uscnca |
*country |
Full country name to which the airport belongs. |
string |
united stateschinacanada |
*region |
World region to which the airport belongs. |
string |
caribbeannorth americaafricasouth americapacificeuropeasiamiddle eastcentral america |
*type |
Code indicating main nature of the corresponding IATA code.Other transportation hubs than airports are included as junctions within air trips. |
string |
airportrailbusheliportferrymetrounknown |
Paging
Field |
Description |
Type |
last |
A relative URI to the last page. |
string |
first |
A relative URI to the first page. |
string |
prev |
A relative URI to the previous page. |
string |
next |
A relative URI to the next page. |
string |
current |
A relative URI to the current page. |
string |
pages |
A set of relative URIs calculated around the current page. |
Page |
elements |
All indexes shown on the current page. |
array[int] |
total |
The number of all elements that API can retrieve. |
int |
size |
The selected page size. |
int |
Page
Field |
Description |
Type |
number |
Number of the page. |
int |
uri |
URI of the page. |
string |
Example
{
"results": [
{
"city_code": "aal",
"city": "aalborg",
"iso_country": "dk",
"country": "denmark",
"region": "europe",
"type": "airport"
},
{
"city_code": "lcg",
"city": "a coruna",
"iso_country": "es",
"country": "spain",
"region": "europe",
"type": "airport"
}
],
"paging": {
"last": "/airports/cities?page=5724&page_size=2",
"first": "/airports/cities?page=1&page_size=2",
"prev": null,
"next": "/airports/cities?page=2&page_size=2",
"current": "/airports/cities?page=1&page_size=2",
"pages": [
{
"number": 1,
"uri": "/airports/cities?page=1&page_size=2"
},
{
"number": 2,
"uri": "/airports/cities?page=2&page_size=2"
},
{
"number": 3,
"uri": "/airports/cities?page=3&page_size=2"
},
{
"number": 4,
"uri": "/airports/cities?page=4&page_size=2"
},
{
"number": 5,
"uri": "/airports/cities?page=5&page_size=2"
}
],
"elements": [
1,
2
],
"total": 11447,
"size": 2
}
}