Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

How to geocode in a specific language

Focus mode
How to geocode in a specific language - Amazon Location Service

This feature allows the selection of a preferred response language from BCP47-compliant codes. It detects the query language based on name variants and uses the preferred language for unmatched tokens and ambiguous cases. If there is no requested language, the Places API provides results in the official country language, but prioritizes the regional language in regions where it differs. As a fallback strategy, if any address elements are unavailable in the requested language, Places APIs return addresses in the default language.

Potential use cases

One potential use case is to localize the query and/or the result.

Examples

Sample request
{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"

Get result in a specific language

Sample request
{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"
{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }
Sample request
{ "QueryText":"पटना, बिहार, भारत" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "Patana, Bihar, Bharat", "Address": { "Label": "Patana, Bihar, Bharat", "Country": { "Code2": "IN", "Code3": "IND", "Name": "Bharat" }, "Region": { "Code": "BR", "Name": "Bihar" }, "SubRegion": { "Name": "Patana" }, "Locality": "Patana", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"पटना, बिहार, भारत" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत"

Query in a specific language

Sample request
{ "QueryText":"पटना, बिहार, भारत" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "Patana, Bihar, Bharat", "Address": { "Label": "Patana, Bihar, Bharat", "Country": { "Code2": "IN", "Code3": "IND", "Name": "Bharat" }, "Region": { "Code": "BR", "Name": "Bihar" }, "SubRegion": { "Name": "Patana" }, "Locality": "Patana", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"पटना, बिहार, भारत" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत"
{ "QueryText":"पटना, बिहार, भारत" }
Sample request
{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"

Query and result in a specific language

Sample request
{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"
{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.