

# How to use Get Place
<a name="get-place-how-to"></a>

This section contains a variety of how to guides and examples for how to use Get Place APIs.

**Topics**
+ [How to get results for a PlaceId](how-to-get-place-by-id.md)
+ [How to get contacts for a PlaceId](how-to-get-contacts-by-place-id.md)
+ [How to get the time zone for a PlaceId](how-to-get-timezone-by-place-id.md)
+ [How to get the details for PlaceId in a specific language](how-to-get-place-details-language-place-id.md)
+ [How to get secondary addresses of a Place ID](how-to-get-secondary-addresses-placeid.md)

# How to get results for a PlaceId
<a name="how-to-get-place-by-id"></a>

The GetPlace API retrieves detailed information about a place using its unique PlaceId, allowing applications to access comprehensive details about specified locations.

## Potential use cases
<a name="potential-use"></a>
+ **Retrieve store locations:** Use PlaceId to obtain details about various store locations for improved user experience and efficient resource management.
+ **Access related place details:** Fetch details of places that were identified using other PlaceIds returned by previous queries.

## Examples
<a name="get-place-examples"></a>

### Get place with a PlaceId
<a name="get-place-by-id"></a>

------
#### [ Sample request ]

```
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?key=Your_Key
```

------
#### [ Sample response ]

```
{
    "PlaceId": "<Redacted>",
    "PlaceType": "PointOfInterest",
    "Title": "London Eye",
    "Address": {
        "Label": "London Eye, County Hall, Westminster Bridge Road, London, SE1 7, United Kingdom",
        "Country": {
            "Code2": "GB",
            "Code3": "GBR",
            "Name": "United Kingdom"
        },
        "Region": {
            "Name": "England"
        },
        "SubRegion": {
            "Code": "LDN",
            "Name": "London"
        },
        "Locality": "London",
        "District": "Waterloo",
        "PostalCode": "SE1 7",
        "Street": "County Hall, Westminster Bridge Road",
        "StreetComponents": [
            {
                "BaseName": "County Hall, Westminster Bridge Road",
                "Language": "en-GB"
            }
        ]
    },
    "Position": [
        -0.11953,
        51.50336
    ],
    "Categories": [
        {
            "Id": "tourist_attraction",
            "Name": "Tourist Attraction",
            "LocalizedName": "Tourist Attraction",
            "Primary": true
        },
        {
            "Id": "landmark-attraction",
            "Name": "Landmark-Attraction",
            "LocalizedName": "Landmark-Attraction",
            "Primary": false
        },
        {
            "Id": "residential_area-building",
            "Name": "Residential Area-Building",
            "LocalizedName": "Residential Area/Building",
            "Primary": false
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request GET \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?key=Your_Key&language=en'
```

------
#### [ AWS CLI ]

```
export PLACEID=AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIs
aws geo-places get-place --key ${YourKey} --place-id ${PLACEID}
```

------

# How to get contacts for a PlaceId
<a name="how-to-get-contacts-by-place-id"></a>

**Note**  
 For customers in `ap-southeast-1` and `ap-southeast-5`, this use case is not supported, as the `Contacts` field is not available. Refer to the [GetPlace API Reference](https://docs.aws.amazon.com/location/latest/APIReference/API_geoplaces_GetPlace.html) for details. 

The GetPlace API allows retrieval of contact information associated with a specific PlaceId, providing you with details such as phone numbers and website URLs.

## Potential use cases
<a name="potential-use"></a>
+ **Obtain additional contact information for a saved PlaceId:** Enhance stored place details by accessing contact data.
+ **Retrieve contact details for addresses from Autocomplete:** Use the PlaceId from the Autocomplete API to fetch specific contact details.

## Examples
<a name="get-contacts-examples"></a>

### Get contacts for a PlaceId
<a name="get-contacts-by-place-id"></a>

------
#### [ Sample request ]

```
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?additional-features=Contact&key=Your_Key
```

------
#### [ Sample response ]

```
{
    "PlaceId": "AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP",
    "PlaceType": "PointOfInterest",
    "Title": "London Eye",
    "Address": {
        "Label": "London Eye, County Hall, Westminster Bridge Road, London, SE1 7, United Kingdom",
        "Country": {
            "Code2": "GB",
            "Code3": "GBR",
            "Name": "United Kingdom"
        },
        "Region": {
            "Name": "England"
        },
        "SubRegion": {
            "Code": "LDN",
            "Name": "London"
        },
        "Locality": "London",
        "District": "Waterloo",
        "PostalCode": "SE1 7",
        "Street": "County Hall, Westminster Bridge Road",
        "StreetComponents": [
            {
                "BaseName": "County Hall, Westminster Bridge Road",
                "Language": "en-GB"
            }
        ]
    },
    "Position": [
        -0.11953,
        51.50336
    ],
    "Categories": [
        {
            "Id": "tourist_attraction",
            "Name": "Tourist Attraction",
            "LocalizedName": "Tourist Attraction",
            "Primary": true
        },
        {
            "Id": "landmark-attraction",
            "Name": "Landmark-Attraction",
            "LocalizedName": "Landmark-Attraction",
            "Primary": false
        },
        {
            "Id": "residential_area-building",
            "Name": "Residential Area-Building",
            "LocalizedName": "Residential Area/Building",
            "Primary": false
        }
    ],
    "Contacts": {
        "Phones": [
            {
                "Value": "+44870500600"
            },
            {
                "Value": "+448709908883"
            }
        ],
        "Websites": [
            {
                "Value": "http://www.londoneye.com"
            }
        ]
    }
}
```

------
#### [ cURL ]

```
curl --request GET \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?key=Your_Key&additional-features=Contact&language=en'
```

------
#### [ AWS CLI ]

```
export PLACEID=AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP
aws geo-places get-place --key ${YourKey} --place-id ${PLACEID} --additional-features "Contact" --language "en"
```

------

# How to get the time zone for a PlaceId
<a name="how-to-get-timezone-by-place-id"></a>

The GetPlace API allows retrieval of contact information associated with a specific PlaceId, providing you with details such as phone numbers, time zones, and website URLs.

## Potential use cases
<a name="potential-use"></a>
+ **Obtain additional time zone information for a saved PlaceId:** Create a world clock with store PlaceId.
+ **Retrieve time zone details for addresses from Autocomplete:** Track daylight savings time for a PlaceId.

## Examples
<a name="get-contacts-examples"></a>

### Get the time zone for a PlaceId
<a name="get-contacts-by-place-id"></a>

------
#### [ Sample request ]

```
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?additional-features=TimeZone&key=Your_Key
```

------
#### [ Sample response ]

```
{
    "PlaceId": "<Redacted>",
    "PlaceType": "PointOfInterest",
    "Title": "London Eye",
    "Address": {
        "Label": "London Eye, County Hall, Westminster Bridge Road, London, SE1 7, United Kingdom",
        "Country": {
            "Code2": "GB",
            "Code3": "GBR",
            "Name": "United Kingdom"
        },
        "Region": {
            "Name": "England"
        },
        "SubRegion": {
            "Code": "LDN",
            "Name": "London"
        },
        "Locality": "London",
        "District": "Waterloo",
        "PostalCode": "SE1 7",
        "Street": "County Hall, Westminster Bridge Road",
        "StreetComponents": [
            {
                "BaseName": "County Hall, Westminster Bridge Road",
                "Language": "en-GB"
            }
        ]
    },
    "Position": [
        -0.11953,
        51.50336
    ],
    "Categories": [
        {
            "Id": "tourist_attraction",
            "Name": "Tourist Attraction",
            "LocalizedName": "Tourist Attraction",
            "Primary": true
        },
        {
            "Id": "landmark-attraction",
            "Name": "Landmark-Attraction",
            "LocalizedName": "Landmark-Attraction",
            "Primary": false
        },
        {
            "Id": "residential_area-building",
            "Name": "Residential Area-Building",
            "LocalizedName": "Residential Area/Building",
            "Primary": false
        }
    ],
    "TimeZone": {
        "Name": "Europe/London",
        "Offset": "+01:00",
        "OffsetSeconds": 3600
    }
}
```

------
#### [ cURL ]

```
curl --request GET \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP?key=Your_Key&=TimeZone'
```

------
#### [ AWS CLI ]

```
export PLACEID=AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP

aws geo-places get-place --key ${YourKey} \
--place-id ${PLACEID} \
--additional-features "TimeZone"
```

------

# How to get the details for PlaceId in a specific language
<a name="how-to-get-place-details-language-place-id"></a>

The feature allows you to select a preferred response language from BCP47-compliant codes. It detects the query language based on name variants and uses the preferred language for unmatched tokens and ambiguous cases. If no requested language is stated, the Places API provides results in whatever language the country uses, but it prioritizes the regional language in regions where it differs. As a fallback, Places APIs return addresses in the default language when some address elements are unavailable in the requested language.

## Potential use cases
<a name="potential-use"></a>
+ **Add PlaceId details:** Add additional detail in a specified language for a stored place ID.
+ **Retrieve PlaceId details for addresses from Autocomplete:** Get additional detail in a specific language for a stored PlaceId.

## Examples
<a name="get-details-examples"></a>

### Get details for a PlaceId in a specific language
<a name="get-details-by-place-id"></a>

------
#### [ Sample request ]

```
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAY0R_4qfQ9LZ0j6lpOggbNLAQ31TRf-sESER_bKKjCar9FF6A3UA0HrYWa4yfeUN5V0qkk6NmdrI3y7fB7PZ4vfuo-Z8Wd-u-01an4KNvWaqfYmEh14s22yCV9Nb1yMXl4-HTfpX5D-jWQT14FEIBqoiuKwLq?language=EN&key=Your_Key
```

------
#### [ Sample response ]

```
{
    "PlaceId": "<Redacted>",
    "PlaceType": "PointOfInterest",
    "Title": "Parking Area",
    "Address": {
        "Label": "Parking Area, Al Nahda Sharjah, United Arab Emirates",
        "Country": {
            "Code2": "AE",
            "Code3": "ARE",
            "Name": "United Arab Emirates"
        },
        "SubRegion": {
            "Name": "Sharjah"
        },
        "Locality": "Sharjah",
        "District": "Al Nahda"
    },
    "Position": [
        55.3733,
        25.30388
    ],
    "Categories": [
        {
            "Id": "parking_lot",
            "Name": "Parking Lot",
            "LocalizedName": "Parking Lot",
            "Primary": true
        }
    ],
    "Contacts": {
        "Phones": [
            {
                "Value": "+971507766189"
            }
        ]
    },
    "AccessPoints": [
        {
            "Position": [
                55.37348,
                25.30398
            ]
        }
    ]
}
```

------
#### [ cURL ]

```
curl --request GET \
  --url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAFUAY0R_4qfQ9LZ0j6lpOggbNLAQ31TRf-sESER_bKKjCar9FF6A3UA0HrYWa4yfeUN5V0qkk6NmdrI3y7fB7PZ4vfuo-Z8Wd-u-01an4KNvWaqfYmEh14s22yCV9Nb1yMXl4-HTfpX5D-jWQT14FEIBqoiuKwLq?language=EN&key=Your_Key`
```

------
#### [ AWS CLI ]

```
export PLACEID=AQAAAFUAcrFHu947JATTY9gIGcfNlNVzD3UftkkI9ayJjtquaC7IquYz-_FFnJnzJSQ7JePd-sY0MSpA64V0w4aXLc-lB2fZLJKk6uoAMSgtwvwxzg1fvPxFM9zXsx77EaLXarl7F4gSPTyQ6fiEnj0b0ipOXpnOoIsP

aws geo-places get-place --key ${YourKey} \
--place-id ${PLACEID} \
--language "en"
```

------

# How to get secondary addresses of a Place ID
<a name="how-to-get-secondary-addresses-placeid"></a>

**Note**  
 For customers in `ap-southeast-1` and `ap-southeast-5`, this use case is not supported, as the `SecondaryAddresses` field is not available. Refer to the [GetPlace API Reference](https://docs.aws.amazon.com/location/latest/APIReference/API_geoplaces_GetPlace.html) for details. 

The `SecondaryAddresses` API command allows you to retrieve all secondary addresses that are under a main address. Geocode also returns secondary units, if any that are present within the `QueryText` parameter.

## Potential use cases
<a name="goecode-secondary-address-placeid-potential-use"></a>

**Retrieve all secondary addresses that are under a main address.** This can be used for address form completion use cases to select a more accurate secondary address which includes more accurate positional information as well.

## Get secondary addresses for a place ID
<a name="geocode-2nd-address-placeid-example"></a>

------
#### [ Sample request ]

```
https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAGAAY8Dw_tn6pyN_R5E9_mfwAP5h9Rd5E_xY2CyyRHpX2wolGeK8O3IY13k5xeHmF4To445fCLg0x3GPnTZnCuUWXbfg9SKpijUskj-xf6jNC_3CUSabHVKy-Or51xHTd3KNi6idTkrfeQOjZOkXZ5TaoXsg0GHGMWqs-sZhmr8npQc?additional-features=SecondaryAddresses&key=Your_Key
```

------
#### [ Sample response ]

```
{
    "PlaceId": "<Redacted>",
    "PlaceType": "PointAddress",
    "Title": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
    "Address": {
        "Label": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
        "Country": {
            "Code2": "CA",
            "Code3": "CAN",
            "Name": "Canada"
        },
        "Region": {
            "Code": "BC",
            "Name": "British Columbia"
        },
        "SubRegion": {
            "Name": "Metro Vancouver"
        },
        "Locality": "Vancouver",
        "District": "Downtown Vancouver",
        "PostalCode": "V6Z 2W7",
        "Street": "Beach Ave",
        "StreetComponents": [
            {
                "BaseName": "Beach",
                "Type": "Ave",
                "TypePlacement": "AfterBaseName",
                "TypeSeparator": " ",
                "Language": "en"
            }
        ],
        "AddressNumber": "910"
    },
    "Position": [
        -123.13325,
        49.27542
    ],
    "MapView": [
        -123.13377,
        49.2741,
        -123.13087,
        49.27599
    ],
    "SecondaryAddresses": [
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "SecondaryAddress",
            "Title": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
            "Address": {
                "Label": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
                "SecondaryAddressComponents": [
                    {
                        "Number": "101"
                    }
                ]
            },
            "Position": [
                -123.1334,
                49.27532
            ]
        },
        {
            "PlaceId": "<Redacted>",
            "PlaceType": "SecondaryAddress",
            "Title": "102-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
            "Address": {
                "Label": "102-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada",
                "SecondaryAddressComponents": [
                    {
                        "Number": "102"
                    }
                ]
            },
            "Position": [
                -123.1334,
                49.27532
            ]
        },
        ...
    ]
}
```

------
#### [ cURL ]

```
curl ‐‐request GET \
  ‐‐url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/AQAAAGAAY8Dw_tn6pyN_R5E9_mfwAP5h9Rd5E_xY2CyyRHpX2wolGeK8O3IY13k5xeHmF4To445fCLg0x3GPnTZnCuUWXbfg9SKpijUskj-xf6jNC_3CUSabHVKy-Or51xHTd3KNi6idTkrfeQOjZOkXZ5TaoXsg0GHGMWqs-sZhmr8npQc?key=Your_Key&additional-features=SecondaryAddresses'
```

------
#### [ AWS CLI ]

```
export PLACEID=AQAAAGAAY8Dw_tn6pyN_R5E9_mfwAP5h9Rd5E_xY2CyyRHpX2wolGeK8O3IY13k5xeHmF4To445fCLg0x3GPnTZnCuUWXbfg9SKpijUskj-xf6jNC_3CUSabHVKy-Or51xHTd3KNi6idTkrfeQOjZOkXZ5TaoXsg0GHGMWqs-sZhmr8npQc

aws geo-places get-place ‐‐key ${YourKey} \
‐‐place-id ${PLACEID} \
‐‐additional-features "SecondaryAddresses"
```

------