Places

A Place is a city or airport that can serve as an origin or destination.

airports
list
nullable

The airports associated to a city. This will only be provided where the type is city.

city
object
nullable

The metropolitan area where the airport is located. Only present for airports which are registered with IATA as belonging to a metropolitan area.

city_name
string
nullable

The name of the city (or cities separated by a /) where the airport is located

Example: "London"
iata_city_code
string
nullable

The 3-letter IATA code for the city where the place is located. Only present for airports which are registered with IATA as belonging to a metropolitan area.

Example: "LON"
iata_code
string

The 3-letter IATA code for the place

Example: "LHR"
iata_country_code
string

The ISO 3166-1 alpha-2 code for the country where the city is located

Example: "GB"
icao_code
string
nullable

The four-character ICAO code for the airport

Example: "EGLL"
id
string

Duffel's unique identifier for the place

Example: "arp_lhr_gb"
latitude
number
nullable

The latitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -90° and 90°

Example: 64.068865
longitude
number
nullable

The longitude position of the airport represented in Decimal degrees with 6 decimal points with a range between -180° and 180°

Example: -141.951519
name
string

The name of the place

Example: "Heathrow"
time_zone
string
nullable

The time zone of the airport, specified by name from the tz database

Example: "Europe/London"
type
enum

The type of the place

Possible values: "airport" or "city"

Retrieves a list of Places whose airport/city/country name or IATA code match the provided query.

Query parameters

query
string

A search string for finding matching Places.

Example: "heathr"

Endpoint

GET https://api.duffel.com/places/suggestions

Request

curl -X GET --compressed "https://api.duffel.com/places/suggestions?query=heathr" \
-H "Accept-Encoding: gzip" \
-H "Accept: application/json" \
-H "Duffel-Version: v1" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"

Response

{
"data": [
{
"type": "airport",
"time_zone": "Europe/London",
"name": "Heathrow",
"longitude": -141.951519,
"latitude": 64.068865,
"id": "arp_lhr_gb",
"icao_code": "EGLL",
"iata_country_code": "GB",
"iata_code": "LHR",
"iata_city_code": "LON",
"city_name": "London",
"city": {
"name": "London",
"id": "cit_lon_gb",
"iata_country_code": "GB",
"iata_code": "LON"
},
"airports": [
{
"time_zone": "Europe/London",
"name": "Heathrow",
"longitude": -141.951519,
"latitude": 64.068865,
"id": "arp_lhr_gb",
"icao_code": "EGLL",
"iata_country_code": "GB",
"iata_code": "LHR",
"iata_city_code": "LON",
"city_name": "London",
"city": {
"name": "London",
"id": "cit_lon_gb",
"iata_country_code": "GB",
"iata_code": "LON"
}
}
]
}
]
}