Airports
Airports are used to identify origins and destinations in journey slices
On this page
Schema
The three-character IATA code for the airport
"LHR"
Duffel's unique identifier for the airport
"arp_lhr_gb"
The name of the airport
"Heathrow"
The ISO 3166-1 alpha-2 code for the country where the airport is located
"GB"
The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°
64.068865
The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°
-141.951519
The four-character ICAO code for the airport
"EGLL"
The time zone of the airport, specified by name from the tz database
"Europe/London"
The name of the city (or cities separated by a /
) where the airport is located
"London"
The metropolitan area where the airport is located. Only present for airports which are registered with IATA as belonging to a metropolitan area.
Get a single airport
Retrieves an airport by its ID
Endpoint
URL parameters
Duffel's unique identifier for the airport
"arp_lhr_gb"
Request example
curl -X GET --compressed "https://api.duffel.com/air/airports/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: beta" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response example
{"data": {"city": {"iata_country_code": "GB","name": "London","id": "cit_lon_gb","iata_code": "LON"},"city_name": "London","time_zone": "Europe/London","icao_code": "EGLL","longitude": -141.951519,"latitude": 64.068865,"iata_country_code": "GB","name": "Heathrow","id": "arp_lhr_gb","iata_code": "LHR"}}
List airports
Retrieves a paginated list of all airports. The results may be returned in any order.
Endpoint
Query Parameters
A cursor pointing to the previous page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
A cursor pointing to the next page of records. For more information on how to paginate through records, see the Pagination section.
"g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="
The maximum number of records to return per page. Defaults to 50
.
May be set to any integer between 1
and 200
. For more information on how to paginate through records, see the Pagination section.
1
Filters the returned airports by their iata_country_code
- see the iata_country_code
parameter in the Airport schema for details
"GB"
Request example
curl -X GET --compressed "https://api.duffel.com/air/airports" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: beta" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
Response example
{"meta": {"limit": 50,"after": "g2wAAAACbQAAABBBZXJvbWlzdC1LaGFya2l2bQAAAB="},"data": [{"city": {"iata_country_code": "GB","name": "London","id": "cit_lon_gb","iata_code": "LON"},"city_name": "London","time_zone": "Europe/London","icao_code": "EGLL","longitude": -141.951519,"latitude": 64.068865,"iata_country_code": "GB","name": "Heathrow","id": "arp_lhr_gb","iata_code": "LHR"}]}