GetPlace - Amazon Location Service

GetPlace

GetPlace finds a place by its unique ID. A PlaceId is returned by other place operations.

Request Syntax

GET /place/PlaceId?additional-features=AdditionalFeatures&intended-use=IntendedUse&key=Key&language=Language&political-view=PoliticalView HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

AdditionalFeatures

A list of optional additional parameters such as time zone that can be requested for each result.

Array Members: Minimum number of 1 item. Maximum number of 4 items.

Valid Values: TimeZone | Phonemes | Access | Contact

IntendedUse

Indicates if the results will be stored. Defaults to SingleUse, if left empty.

Note

Storing the response of an GetPlace query is required to comply with service terms, but charged at a higher cost per request. Please review the user agreement and service pricing structure to determine the correct setting for your use case.

Valid Values: SingleUse | Storage

Key

Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.

Length Constraints: Minimum length of 0. Maximum length of 1000.

Language

A list of BCP 47 compliant language codes for the results to be rendered in. If there is no data for the result in the requested language, data will be returned in the default language for the entry.

Length Constraints: Minimum length of 2. Maximum length of 35.

PlaceId

The PlaceId of the place you wish to receive the information for.

Length Constraints: Minimum length of 0. Maximum length of 200.

Required: Yes

PoliticalView

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

Length Constraints: Minimum length of 2. Maximum length of 3.

Pattern: ([A-Z]{2}|[A-Z]{3})

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 x-amz-geo-pricing-bucket: PricingBucket Content-type: application/json { "AccessPoints": [ { "Position": [ number ] } ], "AccessRestrictions": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Restricted": boolean } ], "Address": { "AddressNumber": "string", "Block": "string", "Building": "string", "Country": { "Code2": "string", "Code3": "string", "Name": "string" }, "District": "string", "Intersection": [ "string" ], "Label": "string", "Locality": "string", "PostalCode": "string", "Region": { "Code": "string", "Name": "string" }, "Street": "string", "StreetComponents": [ { "BaseName": "string", "Direction": "string", "Language": "string", "Prefix": "string", "Suffix": "string", "Type": "string", "TypePlacement": "string", "TypeSeparator": "string" } ], "SubBlock": "string", "SubDistrict": "string", "SubRegion": { "Code": "string", "Name": "string" } }, "AddressNumberCorrected": boolean, "BusinessChains": [ { "Id": "string", "Name": "string" } ], "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Contacts": { "Emails": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Label": "string", "Value": "string" } ], "Faxes": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Label": "string", "Value": "string" } ], "Phones": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Label": "string", "Value": "string" } ], "Websites": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Label": "string", "Value": "string" } ] }, "FoodTypes": [ { "Id": "string", "LocalizedName": "string", "Primary": boolean } ], "MapView": [ number ], "OpeningHours": [ { "Categories": [ { "Id": "string", "LocalizedName": "string", "Name": "string", "Primary": boolean } ], "Components": [ { "OpenDuration": "string", "OpenTime": "string", "Recurrence": "string" } ], "Display": [ "string" ], "OpenNow": boolean } ], "Phonemes": { "Address": { "Block": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "Country": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "District": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "Locality": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "Region": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "Street": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "SubBlock": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "SubDistrict": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ], "SubRegion": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ] }, "Title": [ { "Language": "string", "Preferred": boolean, "Value": "string" } ] }, "PlaceId": "string", "PlaceType": "string", "PoliticalView": "string", "Position": [ number ], "PostalCodeDetails": [ { "PostalAuthority": "string", "PostalCode": "string", "PostalCodeType": "string", "UspsZip": { "ZipClassificationCode": "string" }, "UspsZipPlus4": { "RecordTypeCode": "string" } } ], "TimeZone": { "Name": "string", "Offset": "string", "OffsetSeconds": number }, "Title": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The response returns the following HTTP headers.

PricingBucket

The pricing bucket for which the query is charged at.

For more information on pricing, please visit Amazon Location Service Pricing.

The following data is returned in JSON format by the service.

AccessPoints

Position of the access point in (lng,lat).

Type: Array of AccessPoint objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

AccessRestrictions

Indicates known access restrictions on a vehicle access point. The index correlates to an access point and indicates if access through this point has some form of restriction.

Type: Array of AccessRestriction objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Address

The place's address.

Type: Address object

AddressNumberCorrected

Boolean indicating if the address provided has been corrected.

Type: Boolean

BusinessChains

The Business Chains associated with the place.

Type: Array of BusinessChain objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Categories

Categories of results that results must belong to.

Type: Array of Category objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Contacts

List of potential contact methods for the result/place.

Type: Contacts object

FoodTypes

List of food types offered by this result.

Type: Array of FoodType objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

MapView

The bounding box enclosing the geometric shape (area or line) that an individual result covers.

The bounding box formed is defined as a set of four coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]

Type: Array of doubles

Array Members: Fixed number of 4 items.

OpeningHours

List of opening hours objects.

Type: Array of OpeningHours objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Phonemes

How the various components of the result's address are pronounced in various languages.

Type: PhonemeDetails object

PlaceId

The PlaceId of the place you wish to receive the information for.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 200.

PlaceType

A PlaceType is a category that the result place must belong to.

Type: String

Valid Values: Country | Region | SubRegion | Locality | District | SubDistrict | PostalCode | Block | SubBlock | Intersection | Street | PointOfInterest | PointAddress | InterpolatedAddress

PoliticalView

The alpha-2 or alpha-3 character code for the political view of a country. The political view applies to the results of the request to represent unresolved territorial claims through the point of view of the specified country.

Type: String

Length Constraints: Fixed length of 3.

Pattern: [A-Z]{3}

Position

The position, in longitude and latitude.

Type: Array of doubles

Array Members: Fixed number of 2 items.

PostalCodeDetails

Contains details about the postal code of the place/result.

Type: Array of PostalCodeDetails objects

Array Members: Minimum number of 0 items. Maximum number of 100 items.

TimeZone

The time zone in which the place is located.

Type: TimeZone object

Title

The localized display name of this result item based on request parameter language.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 200.

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have sufficient access to perform this action.

HTTP Status Code: 403

InternalServerException

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

ValidationException

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: