# Places

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

## Schema

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

**city**  
The metropolitan area where the airport is located. Only present for airports which are registered with IATA as belonging to a [metropolitan area](https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area).

**city_name**  
The name of the city (or cities separated by a `/`) where the airport is located  
Example: `"London"`

**iata_city_code**  
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](https://portal.iata.org/faq/articles/en_US/FAQ/How-do-I-create-a-new-Metropolitan-Area).

Example: `"LON"`

**iata_code**  
The 3-letter IATA code for the place  
Example: `"LHR"`

**iata_country_code**  
The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for the country where the city is located.

Example: `"GB"`

**icao_code**  
The four-character ICAO code for the airport.

Example: `"EGLL"`

**id**  
Duffel's unique identifier for the resource.

Example: `"arp_lhr_gb"`

**latitude**  
The latitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -90° and 90°.

Example: `64.068865`

**longitude**  
The longitude position of the airport represented in [Decimal degrees](https://en.wikipedia.org/wiki/Decimal_degrees) with 6 decimal points with a range between -180° and 180°.

Example: `-141.951519`

**name**  
The name of the place.

Example: `"Heathrow"`

**time_zone**  
The time zone of the airport, specified by name from the [tz database](https://en.wikipedia.org/wiki/Tz_database).

Example: `"Europe/London"`

**type**  
The type of the place  
Possible values: `"airport"` or `"city"`

## List Place Suggestions

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

### Query Parameters

**query**  
A search string for finding matching Places by name.

Example: `"heathr"`

**rad**  
The radius, in metres, to search within.

Example: `"10"`

**lat**  
The latitude to search by.

Example: `"40.735"`

**lng**  
The longitude to search by.

Example: `"-73.973717"`

### Endpoint

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

### Request

```bash

curl -X GET --compressed "https://api.duffel.com/places/suggestions?query=heathr&rad=10&lat=40.735&lng=-73.973717" \
  -H "Accept-Encoding: gzip" \
  -H "Accept: application/json" \
  -H "Duffel-Version: v2" \
  -H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
```

### Response

```json
{
  "warnings": [
    {
      "type": "deprecation",
      "title": "`name` field has been deprecated",
      "message": "Use the `query` field instead",
      "code": "deprecated_parameter"
    }
  ],
  "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"
          }
        ]
      },
      "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",
            "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"
              }
            ]
          }
        }
      ]
    }
  ]
}
```
