Skip to content

List Airports

List Airports API returns a paginated list of all recorded airports, including for each the IATA code identifier and corresponding geospatial data.

Request

Endpoint

GET /v4/{billing_plan}/account/{account_id}/flights/airports

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

Header Parameters

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 airport in ISO 3166-1 alpha-2 standard format (in lower case). string us
cn
ca
type Filter by transportation hub type of the corresponding IATA code. string airport
rail
bus
heliport
ferry
metro
unknown
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?page_size=2' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Response

Status

Status Description
200 List Airports data has been successfully returned.

Body

Airports

Field Description Type
*results Paginated list of airports. array[Airport]
paging Response pagination. Paging
Airport
Field Description Type Examples
*iata_code Unique identifier of the airport in IATA code standard format (in lower case). string jfk
led
cdg
*latitude Airport position latitude expressed in the range [-90, 90]. decimal 43.7730912
*longitude Airport position longitude expressed in the range [-180, 180]. decimal 11.2554649
*name Full name of the airport. string malpensa international airport
*type Code indicating main nature of the corresponding IATA code.
Other transportation hubs than airports are included as junctions within air trips.
string airport
rail
bus
heliport
ferry
metro
unknown
region World region to which the airport belongs. string caribbean
north america
africa
south america
pacific
europe
asia
middle east
central america
country Full country name to which the airport belongs. string united states
china
canada
*iso_country Country to which the airport belongs in ISO 3166-1 alpha-2 standard format (in lower case). string us
cn
ca
city Description of the city to which the airport belongs. string london
paris
melbourne
city_code IATA code of the city to which the airport belongs. string lon
par
mel
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": [
        {
            "iata_code": "aaa",
            "latitude": -17.3526,
            "longitude": -145.509995,
            "name": "anaa airport",
            "type": "medium_airport",
            "region": "pacific",
            "country": "french polynesia",
            "iso_country": "pf",
            "city": "anaa"
        },
        {
            "iata_code": "aae",
            "latitude": 36.826781,
            "longitude": 7.81334,
            "name": "rabah bitat airport",
            "type": "medium_airport",
            "region": "africa",
            "country": "algeria",
            "iso_country": "dz",
            "city": "annaba"
        }
    ],
    "paging": {
        "last": "/airports?page=2029&page_size=2",
        "first": "/airports?page=1&page_size=2",
        "prev": null,
        "next": "/airports?page=2&page_size=2",
        "current": "/airports?page=1&page_size=2",
        "pages": [
            {
                "number": 1,
                "uri": "/airports?page=1&page_size=2"
            },
            {
                "number": 2,
                "uri": "/airports?page=2&page_size=2"
            },
            {
                "number": 3,
                "uri": "/airports?page=3&page_size=2"
            },
            {
                "number": 4,
                "uri": "/airports?page=4&page_size=2"
            },
            {
                "number": 5,
                "uri": "/airports?page=5&page_size=2"
            }
        ],
        "elements": [
            1,
            2
        ],
        "total": 4057,
        "size": 2
    }
}