Place geocoding Stay organized with collections Save and categorize content based on your preferences.
Place geocoding lets you retrieve an address from aplaceID.
Place IDs uniquely identify a place in the Google Places database and on GoogleMaps. Retrieve place IDs when youGeocode anaddress. You can also retrieve a place ID from many other APIs, such asPlace Details (New),Text Search (New),andNearby Search(New).
Place geocoding requests
Aplace geocodingrequest is an HTTP GET request in the form:
https://geocode.googleapis.com/v4beta/geocode/places/PLACE_ID
WherePLACE_ID contains the place ID of the location of interest.
Pass all other parameters as URL parameters or, for parameters such as the APIkey or field mask, in headers as part of the GET request. For example:
https://geocode.googleapis.com/v4beta/geocode/places/ChIJj61dQgK6j4AR4GeTYWZsKWw?key=API_KEY
Or in a curl command:
curl -X GET -H 'Content-Type: application/json' \-H "X-Goog-Api-Key:API_KEY" \"https://geocode.googleapis.com/v4beta/geocode/places/ChIJj61dQgK6j4AR4GeTYWZsKWw"
Use OAuth to make a request
Geocoding API v4 supportsOAuth2.0 for authentication. To use OAuthwith the Geocoding API, the OAuth token must be assigned the correct scope.Geocoding API supports the following scopes for use with place geocoding:
https://www.googleapis.com/auth/maps-platform.geocode— Use with all Geocoding API endpoints.https://www.googleapis.com/auth/maps-platform.geocode.place— Use only withGeocodePlacefor place geocoding.
Also, you can use the generalhttps://www.googleapis.com/auth/cloud-platformscope for all Geocoding API endpoints. That scope is useful duringdevelopment, but not production, because it is a general scope that allowsaccess to all endpoints.
For more information and examples, seeUseOAuth.
Place geocoding responses
Place geocoding returns aGeocodeResultobject that represents the place corresponding to the place ID.
The complete JSON object is in the form:
{"place":"//places.googleapis.com/places/ChIJj61dQgK6j4AR4GeTYWZsKWw","placeId":"ChIJj61dQgK6j4AR4GeTYWZsKWw","location":{"latitude":37.4220541,"longitude":-122.08532419999999},"granularity":"ROOFTOP","viewport":{"low":{"latitude":37.4209489697085,"longitude":-122.08846930000001},"high":{"latitude":37.4236469302915,"longitude":-122.0829156}},"formattedAddress":"1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA","postalAddress":{"regionCode":"US","languageCode":"en","postalCode":"94043","administrativeArea":"CA","locality":"Mountain View","addressLines":["1600 Amphitheatre Pkwy"]},"addressComponents":[{"longText":"1600","shortText":"1600","types":["street_number"]},{"longText":"Amphitheatre Parkway","shortText":"Amphitheatre Pkwy","types":["route"],"languageCode":"en"},{"longText":"Mountain View","shortText":"Mountain View","types":["locality","political"],"languageCode":"en"},{"longText":"Santa Clara County","shortText":"Santa Clara County","types":["administrative_area_level_2","political"],"languageCode":"en"},{"longText":"California","shortText":"CA","types":["administrative_area_level_1","political"],"languageCode":"en"},{"longText":"United States","shortText":"US","types":["country","political"],"languageCode":"en"},{"longText":"94043","shortText":"94043","types":["postal_code"]}],"types":["establishment","point_of_interest"]}
Required parameters
place— The place ID of the place for which you want to obtain the human-readable address. The place ID is a unique identifier that can be used with other Google APIs. For example, you can use theplaceIDreturned by theRoads API to get the address for a snapped point. For more information about place IDs, see thePlace IDs.
Optional parameters
languageCode
The language in which to return results.
- See thelist of supported languages. Google often updates the supported languages, so this list may not be exhaustive.
- If
languageCodeis not supplied, the API defaults toen. If you specify an invalid language code, the API returns anINVALID_ARGUMENTerror. - The API does its best to provide a street address that is readable for both the user and locals. To achieve that goal, it returns street addresses in the local language, transliterated to a script readable by the user if necessary, observing the preferred language. All other addresses are returned in the preferred language. Address components are all returned in the same language, which is chosen from the first component.
- If a name is not available in the preferred language, the API uses the closest match.
- The preferred language has a small influence on the set of results that the API chooses to return, and the order in which they are returned. The geocoder interprets abbreviations differently depending on language, such as the abbreviations for street types, or synonyms that may be valid in one language but not in another.
regionCode
The region code as a two-character CLDR code value. There is no default value. Most CLDR codes are identical to ISO 3166-1 codes.
When geocoding an address,forward geodcoding, this parameter can influence, but not fully restrict, results from the service to the specified region. When geocoding a location or a place,reverse geocoding orplace geocoding, this parameter can be used to format the address. In all cases, this parameter can affect results based on applicable law.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-21 UTC.