Place geocoding request and response

  • This page explains how to retrieve a human-readable address for a given place ID using the Google Maps Geocoding API.

  • You need to provide a place_id and your API key as required parameters in the request.

  • Optional parameters for refining the request are available and shared with reverse geocoding.

  • A successful response includes detailed address components, formatted address, location coordinates, and more.

  • Refer to the provided links for details on place IDs, API keys, optional parameters, and response fields.

European Economic Area (EEA) developers

This page shows you requests and responses to retrieve an address for a place ID.

Required parameters

  • place_id — The place ID of the place for which you wish 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 the placeID returned by the Roads API to get the address for a snapped point. For more information about place IDs, see the place ID overview..
  • key — Your application's API key. This key identifies your application for purposes of quota management. Learn how to get a key.

The optional parameters are the same as those for reverse geocoding.

The following query contains the place ID of a place in Brooklyn:

https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJd8BlQ2BZwokRAFUEcm_qrcA
&key=YOUR_API_KEY

The above query returns the following result:

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "277",
               "short_name" : "277",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "Bedford Avenue",
               "short_name" : "Bedford Ave",
               "types" : [ "route" ]
            },
            {
               "long_name" : "Williamsburg",
               "short_name" : "Williamsburg",
               "types" : [ "neighborhood", "political" ]
            },
            {
               "long_name" : "Brooklyn",
               "short_name" : "Brooklyn",
               "types" : [ "political", "sublocality", "sublocality_level_1" ]
            },
            {
               "long_name" : "Kings County",
               "short_name" : "Kings County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "New York",
               "short_name" : "NY",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "11211",
               "short_name" : "11211",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "277 Bedford Ave, Brooklyn, NY 11211, USA",
         "geometry" : {
            "location" : {
               "lat" : 40.7142205,
               "lng" : -73.9612903
            },
            "location_type" : "ROOFTOP",
            "viewport" : {
               "northeast" : {
                  "lat" : 40.71556948029149,
                  "lng" : -73.95994131970849
               },
               "southwest" : {
                  "lat" : 40.7128715197085,
                  "lng" : -73.9626392802915
               }
            }
         },
         "place_id" : "ChIJd8BlQ2BZwokRAFUEcm_qrcA",
         "types" : [ "street_address" ]
      }
   ],
   "status" : "OK"
}

For a description of the fields in the response, see Geocoding responses.