2024/10/30 - Amazon Location Service Places V2 - 7 new api methods
Changes Release of Amazon Location Places API. Places enables you to quickly search, display, and filter places, businesses, and locations based on proximity, category, and name
Use the SearchText operation to search for geocode and place information. You can then complete a follow-up query suggested from the Suggest API via a query id.
See also: AWS API Documentation
Request Syntax
client.search_text( QueryText='string', QueryId='string', MaxResults=123, BiasPosition=[ 123.0, ], Filter={ 'BoundingBox': [ 123.0, ], 'Circle': { 'Center': [ 123.0, ], 'Radius': 123 }, 'IncludeCountries': [ 'string', ] }, AdditionalFeatures=[ 'TimeZone'|'Phonemes'|'Access'|'Contact', ], Language='string', PoliticalView='string', IntendedUse='SingleUse'|'Storage', NextToken='string', Key='string' )
string
The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.
string
The query Id.
integer
An optional limit for the number of results returned in a single call.
list
The position, in longitude and latitude, that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in [lng, lat] and in the WSG84 format.
Note
The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually exclusive.
(float) --
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
BoundingBox (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Circle (dict) --
The Circle that all results must be in.
Center (list) -- [REQUIRED]
The center position, in longitude and latitude, of the FilterCircle .
(float) --
Radius (integer) -- [REQUIRED]
The radius, in meters, of the FilterCircle .
IncludeCountries (list) --
A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.
(string) --
list
A list of optional additional parameters, such as time zone, that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'AddressNumberCorrected': True|False, 'Position': [ 123.0, ], 'Distance': 123, 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'BusinessChains': [ { 'Name': 'string', 'Id': 'string' }, ], 'Contacts': { 'Phones': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Faxes': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Websites': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Emails': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ] }, 'OpeningHours': [ { 'Display': [ 'string', ], 'OpenNow': True|False, 'Components': [ { 'OpenTime': 'string', 'OpenDuration': 'string', 'Recurrence': 'string' }, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'AccessRestrictions': [ { 'Restricted': True|False, 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string', 'Phonemes': { 'Title': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Address': { 'Country': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Region': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubRegion': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Locality': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'District': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubDistrict': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Block': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubBlock': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Street': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ] } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
The text search result.
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Title (string) --
The item's title.
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
AddressNumberCorrected (boolean) --
Boolean indicating if the address provided has been corrected.
Position (list) --
The position, in longitude and latitude.
(float) --
Distance (integer) --
The distance in meters from the QueryPosition.
MapView (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
BusinessChains (list) --
The Business Chains associated with the place.
(dict) --
A businesschain is a chain of businesses that belong to the same brand. For example 7-11 .
Name (string) --
The business chain name.
Id (string) --
The Business Chain Id.
Contacts (dict) --
List of potential contact methods for the result/place.
Phones (list) --
List of phone numbers for the results contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Faxes (list) --
List of fax addresses for the result contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Websites (list) --
List of website URLs that belong to the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Emails (list) --
List of emails for contacts of the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
OpeningHours (list) --
List of opening hours objects.
(dict) --
List of opening hours objects.
Display (list) --
List of opening hours in the format they are displayed in. This can vary by result and in most cases represents how the result uniquely formats their opening hours.
(string) --
OpenNow (boolean) --
Boolean which indicates if the result/place is currently open.
Components (list) --
Components of the opening hours object.
(dict) --
Components of the opening hours object.
OpenTime (string) --
String which represents the opening hours, such as "T070000" .
OpenDuration (string) --
String which represents the duration of the opening period, such as "PT12H00M" .
Recurrence (string) --
Days or periods when the provided opening hours are in affect.
Example: FREQ:DAILY;BYDAY:MO,TU,WE,TH,SU
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
AccessPoints (list) --
Position of the access point represent by longitude and latitude.
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
AccessRestrictions (list) --
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.
(dict) --
Indicates if the access location is restricted. Index correlates to that of an access point and indicates if access through this point has some form of restriction.
Restricted (boolean) --
The restriction.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.
Phonemes (dict) --
How the various components of the result's address are pronounced in various languages.
Title (list) --
List of PhonemeTranscription . See PhonemeTranscription for fields.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Address (dict) --
How to pronounce the address.
Country (list) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Region (list) --
How to pronounce the region or state results should be to be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubRegion (list) --
How to pronounce the sub-region or county for which results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Locality (list) --
How to pronounce the city or locality results should be present in.
Example: Vancouver .
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
District (list) --
How to pronounce the district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubDistrict (list) --
How to pronounce the sub-district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Block (list) --
How to pronounce the name of the block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubBlock (list) --
How to pronounce the name of the sub-block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Street (list) --
How to pronounce the name of the street results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
NextToken (string) --
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page.
The Suggest operation finds addresses or place candidates based on incomplete or misspelled queries. You then select the best query to submit based on the returned results.
See also: AWS API Documentation
Request Syntax
client.suggest( QueryText='string', MaxResults=123, MaxQueryRefinements=123, BiasPosition=[ 123.0, ], Filter={ 'BoundingBox': [ 123.0, ], 'Circle': { 'Center': [ 123.0, ], 'Radius': 123 }, 'IncludeCountries': [ 'string', ] }, AdditionalFeatures=[ 'Core'|'TimeZone'|'Phonemes'|'Access', ], Language='string', PoliticalView='string', IntendedUse='SingleUse', Key='string' )
string
[REQUIRED]
The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.
integer
An optional limit for the number of results returned in a single call.
integer
Maximum number of query terms to be returned for use with a search text query.
list
The position, in longitude and latitude, that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in [lng, lat] and in the WSG84 format.
Note
The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually exclusive.
(float) --
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
BoundingBox (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Circle (dict) --
The Circle that all results must be in.
Center (list) -- [REQUIRED]
The center position, in longitude and latitude, of the FilterCircle .
(float) --
Radius (integer) -- [REQUIRED]
The radius, in meters, of the FilterCircle .
IncludeCountries (list) --
A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.
(string) --
list
A list of optional additional parameters, such as time zone, that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'Title': 'string', 'SuggestResultItemType': 'Place'|'Query', 'Place': { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'Position': [ 123.0, ], 'Distance': 123, 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'BusinessChains': [ { 'Name': 'string', 'Id': 'string' }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'AccessRestrictions': [ { 'Restricted': True|False, 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string', 'Phonemes': { 'Title': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Address': { 'Country': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Region': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubRegion': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Locality': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'District': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubDistrict': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Block': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubBlock': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Street': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ] } } }, 'Query': { 'QueryId': 'string', 'QueryType': 'Category'|'BusinessChain' }, 'Highlights': { 'Title': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Address': { 'Label': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ] } } }, ], 'QueryRefinements': [ { 'RefinedTerm': 'string', 'OriginalTerm': 'string', 'StartIndex': 123, 'EndIndex': 123 }, ] }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
The resulting item from the suggested query.
Title (string) --
The display title that should be used when presenting this option to the end user.
SuggestResultItemType (string) --
The result type. Place results represent the final result for a point of interest, Query results represent a follow up query which can be completed through the SearchText operation.
Place (dict) --
The suggested place by its unique ID.
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
Position (list) --
The position, in longitude and latitude.
(float) --
Distance (integer) --
The distance in meters from the QueryPosition.
MapView (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
BusinessChains (list) --
The Business Chains associated with the place.
(dict) --
A businesschain is a chain of businesses that belong to the same brand. For example 7-11 .
Name (string) --
The business chain name.
Id (string) --
The Business Chain Id.
AccessPoints (list) --
Position of the access point represent by longitude and latitude.
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
AccessRestrictions (list) --
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.
(dict) --
Indicates if the access location is restricted. Index correlates to that of an access point and indicates if access through this point has some form of restriction.
Restricted (boolean) --
The restriction.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.
Phonemes (dict) --
How the various components of the result's address are pronounced in various languages.
Title (list) --
List of PhonemeTranscription . See PhonemeTranscription for fields.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Address (dict) --
How to pronounce the address.
Country (list) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Region (list) --
How to pronounce the region or state results should be to be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubRegion (list) --
How to pronounce the sub-region or county for which results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Locality (list) --
How to pronounce the city or locality results should be present in.
Example: Vancouver .
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
District (list) --
How to pronounce the district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubDistrict (list) --
How to pronounce the sub-district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Block (list) --
How to pronounce the name of the block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubBlock (list) --
How to pronounce the name of the sub-block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Street (list) --
How to pronounce the name of the street results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Query (dict) --
The suggested query results.
QueryId (string) --
QueryId can be used to complete a follow up query through the SearchText API. The QueryId retains context from the original Suggest request such as filters, political view and language. See the SearchText API documentation for more details SearchText API docs.
QueryType (string) --
The query type. Category qeuries will search for places which have an entry matching the given category, for example "doctor office". BusinessChain queries will search for instances of a given business.
Highlights (dict) --
Describes how the parts of the response element matched the input query by returning the sections of the response which matched to input query terms.
Title (list) --
Indicates the starting and ending index of the title in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Address (dict) --
The place's address.
Label (list) --
Indicates the starting and ending indexes of the places in the result which were identified to match the textQuery. This result is useful for providing emphasis to results where the user query directly matched to make selecting the correct result from a list easier for an end user.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
QueryRefinements (list) --
Maximum number of query terms to be returned for use with a search text query.
(dict) --
Suggestions for refining individual query terms. Suggestions are returned as objects which note the term, suggested replacement, and its index in the query.
RefinedTerm (string) --
The term that will be suggested to the user.
OriginalTerm (string) --
The sub-string of the original query that is replaced by this query term.
StartIndex (integer) --
Start index of the parsed component.
EndIndex (integer) --
End index of the parsed query.
Search nearby a specified location.
See also: AWS API Documentation
Request Syntax
client.search_nearby( QueryPosition=[ 123.0, ], QueryRadius=123, MaxResults=123, Filter={ 'BoundingBox': [ 123.0, ], 'IncludeCountries': [ 'string', ], 'IncludeCategories': [ 'string', ], 'ExcludeCategories': [ 'string', ], 'IncludeBusinessChains': [ 'string', ], 'ExcludeBusinessChains': [ 'string', ], 'IncludeFoodTypes': [ 'string', ], 'ExcludeFoodTypes': [ 'string', ] }, AdditionalFeatures=[ 'TimeZone'|'Phonemes'|'Access'|'Contact', ], Language='string', PoliticalView='string', IntendedUse='SingleUse'|'Storage', NextToken='string', Key='string' )
list
[REQUIRED]
The position, in [lng, lat] for which you are querying nearby resultsfor. Results closer to the position will be ranked higher then results further away from the position
(float) --
integer
The maximum distance in meters from the QueryPosition from which a result will be returned.
integer
An optional limit for the number of results returned in a single call.
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
BoundingBox (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
IncludeCountries (list) --
A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.
(string) --
IncludeCategories (list) --
Categories of results that results must belong too.
(string) --
ExcludeCategories (list) --
Categories of results that results are excluded from.
(string) --
IncludeBusinessChains (list) --
The Business Chains associated with the place.
(string) --
ExcludeBusinessChains (list) --
The Business Chains associated with the place.
(string) --
IncludeFoodTypes (list) --
Food types that results are included from.
(string) --
ExcludeFoodTypes (list) --
Food types that results are excluded from.
(string) --
list
A list of optional additional parameters, such as time zone, that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'AddressNumberCorrected': True|False, 'Position': [ 123.0, ], 'Distance': 123, 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'BusinessChains': [ { 'Name': 'string', 'Id': 'string' }, ], 'Contacts': { 'Phones': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Faxes': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Websites': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Emails': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ] }, 'OpeningHours': [ { 'Display': [ 'string', ], 'OpenNow': True|False, 'Components': [ { 'OpenTime': 'string', 'OpenDuration': 'string', 'Recurrence': 'string' }, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'AccessRestrictions': [ { 'Restricted': True|False, 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string', 'Phonemes': { 'Title': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Address': { 'Country': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Region': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubRegion': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Locality': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'District': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubDistrict': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Block': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubBlock': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Street': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ] } } }, ], 'NextToken': 'string' }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
The search results of nearby places.
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Title (string) --
The item's title.
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
AddressNumberCorrected (boolean) --
Boolean indicating if the address provided has been corrected.
Position (list) --
The position in longitude and latitude.
(float) --
Distance (integer) --
The distance in meters from the QueryPosition.
MapView (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
BusinessChains (list) --
The Business Chains associated with the place.
(dict) --
A businesschain is a chain of businesses that belong to the same brand. For example 7-11 .
Name (string) --
The business chain name.
Id (string) --
The Business Chain Id.
Contacts (dict) --
List of potential contact methods for the result/place.
Phones (list) --
List of phone numbers for the results contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Faxes (list) --
List of fax addresses for the result contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Websites (list) --
List of website URLs that belong to the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Emails (list) --
List of emails for contacts of the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
OpeningHours (list) --
List of opening hours objects.
(dict) --
List of opening hours objects.
Display (list) --
List of opening hours in the format they are displayed in. This can vary by result and in most cases represents how the result uniquely formats their opening hours.
(string) --
OpenNow (boolean) --
Boolean which indicates if the result/place is currently open.
Components (list) --
Components of the opening hours object.
(dict) --
Components of the opening hours object.
OpenTime (string) --
String which represents the opening hours, such as "T070000" .
OpenDuration (string) --
String which represents the duration of the opening period, such as "PT12H00M" .
Recurrence (string) --
Days or periods when the provided opening hours are in affect.
Example: FREQ:DAILY;BYDAY:MO,TU,WE,TH,SU
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
AccessPoints (list) --
Position of the access point represent by longitude and latitude.
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
AccessRestrictions (list) --
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.
(dict) --
Indicates if the access location is restricted. Index correlates to that of an access point and indicates if access through this point has some form of restriction.
Restricted (boolean) --
The restriction.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.
Phonemes (dict) --
How the various components of the result's address are pronounced in various languages.
Title (list) --
List of PhonemeTranscription . See PhonemeTranscription for fields.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Address (dict) --
How to pronounce the address.
Country (list) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Region (list) --
How to pronounce the region or state results should be to be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubRegion (list) --
How to pronounce the sub-region or county for which results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Locality (list) --
How to pronounce the city or locality results should be present in.
Example: Vancouver .
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
District (list) --
How to pronounce the district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubDistrict (list) --
How to pronounce the sub-district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Block (list) --
How to pronounce the name of the block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubBlock (list) --
How to pronounce the name of the sub-block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Street (list) --
How to pronounce the name of the street results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
NextToken (string) --
If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page.
The Geocode action allows you to obtain coordinates, addresses, and other information about places.
See also: AWS API Documentation
Request Syntax
client.geocode( QueryText='string', QueryComponents={ 'Country': 'string', 'Region': 'string', 'SubRegion': 'string', 'Locality': 'string', 'District': 'string', 'Street': 'string', 'AddressNumber': 'string', 'PostalCode': 'string' }, MaxResults=123, BiasPosition=[ 123.0, ], Filter={ 'IncludeCountries': [ 'string', ], 'IncludePlaceTypes': [ 'Locality'|'PostalCode'|'Intersection'|'Street'|'PointAddress'|'InterpolatedAddress', ] }, AdditionalFeatures=[ 'TimeZone'|'Access', ], Language='string', PoliticalView='string', IntendedUse='SingleUse'|'Storage', Key='string' )
string
The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.
dict
A structured free text query allows you to search for places by the name or text representation of specific properties of the place.
Country (string) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
Region (string) --
The region or state results should be to be present in.
Example: North Rhine-Westphalia .
SubRegion (string) --
The sub-region or county for which results should be present in.
Locality (string) --
City or locality results should be present in.
Example: Vancouver .
District (string) --
The district or division of a city the results should be present in.
Street (string) --
The name of the street results should be present in.
AddressNumber (string) --
The house number or address results should have.
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
integer
An optional limit for the number of results returned in a single call.
list
The position, in longitude and latitude, that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in [lng, lat] and in the WSG84 format.
Note
The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually exclusive.
(float) --
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
IncludeCountries (list) --
A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.
(string) --
IncludePlaceTypes (list) --
The included place types.
(string) --
list
A list of optional additional parameters, such as time zone, that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'AddressNumberCorrected': True|False, 'PostalCodeDetails': [ { 'PostalCode': 'string', 'PostalAuthority': 'Usps', 'PostalCodeType': 'UspsZip'|'UspsZipPlus4', 'UspsZip': { 'ZipClassificationCode': 'Military'|'PostOfficeBoxes'|'Unique' }, 'UspsZipPlus4': { 'RecordTypeCode': 'Firm'|'General'|'HighRise'|'PostOfficeBox'|'Rural'|'Street' } }, ], 'Position': [ 123.0, ], 'Distance': 123, 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string', 'MatchScores': { 'Overall': 123.0, 'Components': { 'Title': 123.0, 'Address': { 'Country': 123.0, 'Region': 123.0, 'SubRegion': 123.0, 'Locality': 123.0, 'District': 123.0, 'SubDistrict': 123.0, 'PostalCode': 123.0, 'Block': 123.0, 'SubBlock': 123.0, 'Intersection': [ 123.0, ], 'AddressNumber': 123.0, 'Building': 123.0 } } } }, ] }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
The Geocoded result.
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Title (string) --
The localized display name of this result item based on request parameter language .
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
AddressNumberCorrected (boolean) --
Boolean indicating if the address provided has been corrected.
PostalCodeDetails (list) --
Contains details about the postal code of the place/result.
(dict) --
Contains details about the postal code of the place or result.
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
PostalAuthority (string) --
The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.
PostalCodeType (string) --
The postal code type.
UspsZip (dict) --
The ZIP Classification Code, or in other words what type of postal code is it.
ZipClassificationCode (string) --
The ZIP Classification Code, or in other words what type of postal code is it.
UspsZipPlus4 (dict) --
The USPS ZIP+4 Record Type Code.
RecordTypeCode (string) --
The USPS ZIP+4 Record Type Code.
Position (list) --
The position in longitude and latitude.
(float) --
Distance (integer) --
The distance in meters from the QueryPosition.
MapView (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
AccessPoints (list) --
Position of the access point represent by longitude and latitude.
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.
MatchScores (dict) --
Indicates how well the entire input matches the returned. It is equal to 1 if all input tokens are recognized and matched.
Overall (float) --
Indicates how well the entire input matches the returned. It is equal to 1 if all input tokens are recognized and matched.
Components (dict) --
Indicates how well the component input matches the returned. It is equal to 1 if all input tokens are recognized and matched.
Title (float) --
Indicates the starting and ending index of the title in the text query that match the found title.
Address (dict) --
The place's address.
Country (float) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
Region (float) --
The region or state results should be to be present in.
Example: North Rhine-Westphalia .
SubRegion (float) --
The sub-region or county for which results should be present in.
Locality (float) --
The city or locality results should be present in.
Example: Vancouver .
District (float) --
The district or division of a city the results should be present in.
SubDistrict (float) --
A subdivision of a district.
Example: Minden-Lübbecke
PostalCode (float) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (float) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (float) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(float) --
AddressNumber (float) --
The house number or address results should have.
Building (float) --
The name of the building at the address.
Finds a place by its unique ID. A PlaceId is returned by other place operations.
See also: AWS API Documentation
Request Syntax
client.get_place( PlaceId='string', AdditionalFeatures=[ 'TimeZone'|'Phonemes'|'Access'|'Contact', ], Language='string', PoliticalView='string', IntendedUse='SingleUse'|'Storage', Key='string' )
string
[REQUIRED]
The PlaceId of the place you wish to receive the information for.
list
A list of optional additional parameters such as time zone that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'PricingBucket': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'AddressNumberCorrected': True|False, 'PostalCodeDetails': [ { 'PostalCode': 'string', 'PostalAuthority': 'Usps', 'PostalCodeType': 'UspsZip'|'UspsZipPlus4', 'UspsZip': { 'ZipClassificationCode': 'Military'|'PostOfficeBoxes'|'Unique' }, 'UspsZipPlus4': { 'RecordTypeCode': 'Firm'|'General'|'HighRise'|'PostOfficeBox'|'Rural'|'Street' } }, ], 'Position': [ 123.0, ], 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'BusinessChains': [ { 'Name': 'string', 'Id': 'string' }, ], 'Contacts': { 'Phones': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Faxes': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Websites': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'Emails': [ { 'Label': 'string', 'Value': 'string', 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ] }, 'OpeningHours': [ { 'Display': [ 'string', ], 'OpenNow': True|False, 'Components': [ { 'OpenTime': 'string', 'OpenDuration': 'string', 'Recurrence': 'string' }, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'AccessRestrictions': [ { 'Restricted': True|False, 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string', 'Phonemes': { 'Title': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Address': { 'Country': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Region': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubRegion': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Locality': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'District': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubDistrict': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Block': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'SubBlock': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ], 'Street': [ { 'Value': 'string', 'Language': 'string', 'Preferred': True|False }, ] } } }
Response Structure
(dict) --
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Title (string) --
The localized display name of this result item based on request parameter language .
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
AddressNumberCorrected (boolean) --
Boolean indicating if the address provided has been corrected.
PostalCodeDetails (list) --
Contains details about the postal code of the place/result.
(dict) --
Contains details about the postal code of the place or result.
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
PostalAuthority (string) --
The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.
PostalCodeType (string) --
The postal code type.
UspsZip (dict) --
The ZIP Classification Code, or in other words what type of postal code is it.
ZipClassificationCode (string) --
The ZIP Classification Code, or in other words what type of postal code is it.
UspsZipPlus4 (dict) --
The USPS ZIP+4 Record Type Code.
RecordTypeCode (string) --
The USPS ZIP+4 Record Type Code.
Position (list) --
The position, in longitude and latitude.
(float) --
MapView (list) --
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}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
BusinessChains (list) --
The Business Chains associated with the place.
(dict) --
A businesschain is a chain of businesses that belong to the same brand. For example 7-11 .
Name (string) --
The business chain name.
Id (string) --
The Business Chain Id.
Contacts (dict) --
List of potential contact methods for the result/place.
Phones (list) --
List of phone numbers for the results contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Faxes (list) --
List of fax addresses for the result contact.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Websites (list) --
List of website URLs that belong to the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
Emails (list) --
List of emails for contacts of the result.
(dict) --
Details related to contacts.
Label (string) --
The contact's label.
Value (string) --
The contact's value.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
OpeningHours (list) --
List of opening hours objects.
(dict) --
List of opening hours objects.
Display (list) --
List of opening hours in the format they are displayed in. This can vary by result and in most cases represents how the result uniquely formats their opening hours.
(string) --
OpenNow (boolean) --
Boolean which indicates if the result/place is currently open.
Components (list) --
Components of the opening hours object.
(dict) --
Components of the opening hours object.
OpenTime (string) --
String which represents the opening hours, such as "T070000" .
OpenDuration (string) --
String which represents the duration of the opening period, such as "PT12H00M" .
Recurrence (string) --
Days or periods when the provided opening hours are in affect.
Example: FREQ:DAILY;BYDAY:MO,TU,WE,TH,SU
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
AccessPoints (list) --
Position of the access point in (lng,lat) .
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
AccessRestrictions (list) --
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.
(dict) --
Indicates if the access location is restricted. Index correlates to that of an access point and indicates if access through this point has some form of restriction.
Restricted (boolean) --
The restriction.
Categories (list) --
Categories of results that results must belong too.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.
Phonemes (dict) --
How the various components of the result's address are pronounced in various languages.
Title (list) --
List of PhonemeTranscription . See PhonemeTranscription for fields.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Address (dict) --
How to pronounce the address.
Country (list) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Region (list) --
How to pronounce the region or state results should be to be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubRegion (list) --
How to pronounce the sub-region or county for which results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Locality (list) --
How to pronounce the city or locality results should be present in.
Example: Vancouver .
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
District (list) --
How to pronounce the district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubDistrict (list) --
How to pronounce the sub-district or division of a city results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Block (list) --
How to pronounce the name of the block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
SubBlock (list) --
How to pronounce the name of the sub-block.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
Street (list) --
How to pronounce the name of the street results should be present in.
(dict) --
How to pronounce the various components of the address or place.
Value (string) --
Value which indicates how to pronounce the value.
Language (string) --
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.
Preferred (boolean) --
Boolean which indicates if it the preferred pronunciation.
The autocomplete operation speeds up and increases the accuracy of entering addresses by providing a list of address candidates matching a partially entered address. Results are sorted from most to least matching. Filtering and biasing can be used to increase the relevance of the results if additional search context is known
See also: AWS API Documentation
Request Syntax
client.autocomplete( QueryText='string', MaxResults=123, BiasPosition=[ 123.0, ], Filter={ 'BoundingBox': [ 123.0, ], 'Circle': { 'Center': [ 123.0, ], 'Radius': 123 }, 'IncludeCountries': [ 'string', ], 'IncludePlaceTypes': [ 'Locality'|'PostalCode', ] }, PostalCodeMode='MergeAllSpannedLocalities'|'EnumerateSpannedLocalities', AdditionalFeatures=[ 'Core', ], Language='string', PoliticalView='string', IntendedUse='SingleUse', Key='string' )
string
[REQUIRED]
The free-form text query to match addresses against. This is usually a partially typed address from an end user in an address box or form.
integer
An optional limit for the number of results returned in a single call.
list
The position in longitude and latitude that the results should be close to. Typically, place results returned are ranked higher the closer they are to this position. Stored in [lng, lat] and in the WSG84 format.
Note
The fields BiasPosition , FilterBoundingBox , and FilterCircle are mutually exclusive.
(float) --
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
BoundingBox (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Circle (dict) --
The Circle that all results must be in.
Center (list) -- [REQUIRED]
The center position, in longitude and latitude, of the FilterCircle .
(float) --
Radius (integer) -- [REQUIRED]
The radius, in meters, of the FilterCircle .
IncludeCountries (list) --
A list of countries that all results must be in. Countries are represented by either their alpha-2 or alpha-3 character codes.
(string) --
IncludePlaceTypes (list) --
The included place types.
(string) --
string
The PostalCodeMode affects how postal code results are returned. If a postal code spans multiple localities and this value is empty, partial district or locality information may be returned under a single postal code result entry. If it's populated with the value cityLookup , all cities in that postal code are returned.
list
A list of optional additional parameters that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'Distance': 123, 'Language': 'string', 'PoliticalView': 'string', 'Highlights': { 'Title': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Address': { 'Label': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Country': { 'Code': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Name': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ] }, 'Region': { 'Code': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Name': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ] }, 'SubRegion': { 'Code': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Name': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ] }, 'Locality': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'District': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'SubDistrict': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Street': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Block': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'SubBlock': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Intersection': [ [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], ], 'PostalCode': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'AddressNumber': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ], 'Building': [ { 'StartIndex': 123, 'EndIndex': 123, 'Value': 'string' }, ] } } }, ] }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
A result matching the input query text.
PlaceId (string) --
The PlaceId of the place associated with this result. This can be used to look up additional details about the result via GetPlace.
PlaceType (string) --
PlaceType describes the type of result entry returned.
Title (string) --
A formatted string for display when presenting this result to an end user.
Address (dict) --
The address associated with this result.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
Distance (integer) --
The distance in meters between the center of the search area and this result. Useful to evaluate how far away from the original bias position the result is.
Language (string) --
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.
PoliticalView (string) --
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.
Highlights (dict) --
Indicates the starting and ending index of the place in the text query that match the found title.
Title (list) --
Indicates where the title field in the result matches the input query.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Address (dict) --
Describes how part of the result address match the input query.
Label (list) --
Indicates the starting and ending indexes for result items where they are identified to match the input query. This should be used to provide emphasis to output display to make selecting the correct result from a list easier for end users.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Country (dict) --
The alpha-2 or alpha-3 character code for the country that the results will be present in.
Code (list) --
Indicates the starting and ending index of the country code in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Name (list) --
Indicates the starting and ending index of the country code in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Region (dict) --
The region or state results should be to be present in.
Example: North Rhine-Westphalia .
Code (list) --
Indicates the starting and ending index of the region in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Name (list) --
Indicates the starting and ending index of the region name in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (list) --
Indicates the starting and ending index of the sub-region in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Name (list) --
Indicates the starting and ending index of the name in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Locality (list) --
The city or locality results should be present in.
Example: Vancouver .
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
District (list) --
The district or division of a city the results should be present in.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
SubDistrict (list) --
Indicates the starting and ending index of the title in the text query that match the found title.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Street (list) --
The name of the street results should be present in.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Block (list) --
Name of the block. Example: Sunny Mansion 203 block: 2 Chome
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
SubBlock (list) --
Name of sub-block. Example Sunny Mansion 203 sub-block: 4
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Intersection (list) --
Name of the streets in the intersection. For example: e.g. ["Friedrichstraße","Unter den Linden"]
(list) --
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
PostalCode (list) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
AddressNumber (list) --
The house number or address results should have.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
Building (list) --
The name of the building at the address.
(dict) --
Describes how parts of the result response match the input query.
StartIndex (integer) --
Start index of the highlight.
EndIndex (integer) --
End index of the highlight.
Value (string) --
The highlight's value.
The ReverseGeocode operation allows you to retrieve addresses and place information from coordinates.
See also: AWS API Documentation
Request Syntax
client.reverse_geocode( QueryPosition=[ 123.0, ], QueryRadius=123, MaxResults=123, Filter={ 'IncludePlaceTypes': [ 'Locality'|'Intersection'|'Street'|'PointAddress'|'InterpolatedAddress', ] }, AdditionalFeatures=[ 'TimeZone'|'Access', ], Language='string', PoliticalView='string', IntendedUse='SingleUse'|'Storage', Key='string' )
list
[REQUIRED]
The position, in [lng, lat] for which you are querying nearby resultsfor. Results closer to the position will be ranked higher then results further away from the position
(float) --
integer
The maximum distance in meters from the QueryPosition from which a result will be returned.
integer
An optional limit for the number of results returned in a single call.
dict
A structure which contains a set of inclusion/exclusion properties that results must posses in order to be returned as a result.
IncludePlaceTypes (list) --
The included place types.
(string) --
list
A list of optional additional parameters, such as time zone that can be requested for each result.
(string) --
string
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.
string
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.
string
Indicates if the results will be stored. Defaults to SingleUse , if left empty.
string
Optional: The API key to be used for authorization. Either an API key or valid SigV4 signature must be provided when making a request.
dict
Response Syntax
{ 'PricingBucket': 'string', 'ResultItems': [ { 'PlaceId': 'string', 'PlaceType': 'Country'|'Region'|'SubRegion'|'Locality'|'District'|'SubDistrict'|'PostalCode'|'Block'|'SubBlock'|'Intersection'|'Street'|'PointOfInterest'|'PointAddress'|'InterpolatedAddress', 'Title': 'string', 'Address': { 'Label': 'string', 'Country': { 'Code2': 'string', 'Code3': 'string', 'Name': 'string' }, 'Region': { 'Code': 'string', 'Name': 'string' }, 'SubRegion': { 'Code': 'string', 'Name': 'string' }, 'Locality': 'string', 'District': 'string', 'SubDistrict': 'string', 'PostalCode': 'string', 'Block': 'string', 'SubBlock': 'string', 'Intersection': [ 'string', ], 'Street': 'string', 'StreetComponents': [ { 'BaseName': 'string', 'Type': 'string', 'TypePlacement': 'BeforeBaseName'|'AfterBaseName', 'TypeSeparator': 'string', 'Prefix': 'string', 'Suffix': 'string', 'Direction': 'string', 'Language': 'string' }, ], 'AddressNumber': 'string', 'Building': 'string' }, 'AddressNumberCorrected': True|False, 'PostalCodeDetails': [ { 'PostalCode': 'string', 'PostalAuthority': 'Usps', 'PostalCodeType': 'UspsZip'|'UspsZipPlus4', 'UspsZip': { 'ZipClassificationCode': 'Military'|'PostOfficeBoxes'|'Unique' }, 'UspsZipPlus4': { 'RecordTypeCode': 'Firm'|'General'|'HighRise'|'PostOfficeBox'|'Rural'|'Street' } }, ], 'Position': [ 123.0, ], 'Distance': 123, 'MapView': [ 123.0, ], 'Categories': [ { 'Id': 'string', 'Name': 'string', 'LocalizedName': 'string', 'Primary': True|False }, ], 'FoodTypes': [ { 'LocalizedName': 'string', 'Id': 'string', 'Primary': True|False }, ], 'AccessPoints': [ { 'Position': [ 123.0, ] }, ], 'TimeZone': { 'Name': 'string', 'Offset': 'string', 'OffsetSeconds': 123 }, 'PoliticalView': 'string' }, ] }
Response Structure
(dict) --
PricingBucket (string) --
The pricing bucket for which the query is charged at.
For more inforamtion on pricing, please visit Amazon Location Service Pricing.
ResultItems (list) --
List of places or results returned for a query.
(dict) --
The returned location from the Reverse Geocode action.
PlaceId (string) --
The PlaceId of the place you wish to receive the information for.
PlaceType (string) --
A PlaceType is a category that the result place must belong to.
Title (string) --
The localized display name of this result item based on request parameter language .
Address (dict) --
The place's address.
Label (string) --
Assembled address value built out of the address components, according to the regional postal rules. This is the correctly formatted address.
Country (dict) --
The country component of the address.
Code2 (string) --
Country, represented by its alpha 2-character code.
Code3 (string) --
Country, represented by its alpha t-character code.
Name (string) --
Name of the country.
Region (dict) --
The region or state results should be present in.
Example: North Rhine-Westphalia .
Code (string) --
Abbreviated code for a the state, province or region of the country.
Example: BC .
Name (string) --
Name for a the state, province, or region of the country.
Example: British Columbia .
SubRegion (dict) --
The sub-region or county for which results should be present in.
Code (string) --
Abbreviated code for the county or sub-region.
Name (string) --
Name for the county or sub-region.
Locality (string) --
The locality or city of the address.
Example: Vancouver .
District (string) --
The district or division of a locality associated with this address.
SubDistrict (string) --
A subdivision of a district.
Example: Minden-Lübbecke .
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code, for which the result should posses.
Block (string) --
Name of the block.
Example: Sunny Mansion 203 block: 2 Chome
SubBlock (string) --
Name of sub-block.
Example: Sunny Mansion 203 sub-block: 4
Intersection (list) --
Name of the streets in the intersection.
Example: ["Friedrichstraße","Unter den Linden"]
(string) --
Street (string) --
The name of the street results should be present in.
StreetComponents (list) --
Components of the street.
Example: Younge from the "Younge street".
(dict) --
Components of a street.
BaseName (string) --
Base name part of the street name.
Example: Younge from the “Younge street".
Type (string) --
Street type part of the street name.
Example: “avenue" .
TypePlacement (string) --
Defines if the street type is before or after the base name.
TypeSeparator (string) --
What character(s) separates the string from its type.
Prefix (string) --
A prefix is a directional identifier that precedes, but is not included in, the base name of a road.
Example: E for East.
Suffix (string) --
A suffix is a directional identifier that follows, but is not included in, the base name of a road.
Example W for West.
Direction (string) --
Indicates the official directional identifiers assigned to highways.
Language (string) --
A 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.
AddressNumber (string) --
The number that identifies an address within a street.
Building (string) --
The name of the building at the address.
AddressNumberCorrected (boolean) --
Boolean indicating if the address provided has been corrected.
PostalCodeDetails (list) --
Contains details about the postal code of the place/result.
(dict) --
Contains details about the postal code of the place or result.
PostalCode (string) --
An alphanumeric string included in a postal address to facilitate mail sorting, such as post code, postcode, or ZIP code for which the result should posses.
PostalAuthority (string) --
The postal authority or entity. This could be a governmental authority, a regulatory authority, or a designated postal operator.
PostalCodeType (string) --
The postal code type.
UspsZip (dict) --
The ZIP Classification Code, or in other words what type of postal code is it.
ZipClassificationCode (string) --
The ZIP Classification Code, or in other words what type of postal code is it.
UspsZipPlus4 (dict) --
The USPS ZIP+4 Record Type Code.
RecordTypeCode (string) --
The USPS ZIP+4 Record Type Code.
Position (list) --
The position in longitude and latitude.
(float) --
Distance (integer) --
The distance in meters from the QueryPosition.
MapView (list) --
The bounding box enclosing the geometric shape (area or line) that an individual result covers.
The bounding box formed is defined as a set 4 coordinates: [{westward lng}, {southern lat}, {eastward lng}, {northern lat}]
(float) --
Categories (list) --
Categories of results that results must belong to.
(dict) --
Category of the Place returned.
Id (string) --
The category ID.
Name (string) --
The category name.
LocalizedName (string) --
Localized name of the category type.
Primary (boolean) --
Boolean which indicates if this category is the primary offered by the place.
FoodTypes (list) --
List of food types offered by this result.
(dict) --
List of Food types offered by this result.
LocalizedName (string) --
Localized name of the food type.
Id (string) --
The Food Type Id.
Primary (boolean) --
Boolean which indicates if this food type is the primary offered by the place. For example, if a location serves fast food, but also dessert, he primary would likely be fast food.
AccessPoints (list) --
Position of the access point represent by longitude and latitude.
(dict) --
Position of the access point represented by longitude and latitude for a vehicle.
Position (list) --
The position, in longitude and latitude.
(float) --
TimeZone (dict) --
The time zone in which the place is located.
Name (string) --
The time zone name.
Offset (string) --
Time zone offset of the timezone from UTC.
OffsetSeconds (integer) --
The offset of the time zone from UTC, in seconds.
PoliticalView (string) --
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.