GeocodeResult

A geocode result contains geographic information about a place.

JSON representation
{"place":string,"placeId":string,"location":{object (LatLng)},"granularity":enum (GeocodeResult.Granularity),"viewport":{object (Viewport)},"bounds":{object (Viewport)},"formattedAddress":string,"postalAddress":{object (PostalAddress)},"addressComponents":[{object (GeocodeResult.AddressComponent)}],"postalCodeLocalities":[{object (LocalizedText)}],"types":[string],"plusCode":{object (PlusCode)}}
Fields
place

string

The fully qualified place identifier for this result. In the format of "//places.googleapis.com/places/{placeID}". Seehttps://developers.google.com/maps/documentation/places/web-service/place-id. for more details.

placeId

string

The place ID for this result.

location

object (LatLng)

The latlng of this address.

granularity

enum (GeocodeResult.Granularity)

The granularity of the location.

viewport

object (Viewport)

A viewport suitable for displaying the geocode result.

bounds

object (Viewport)

A bounding box for the address.

formattedAddress

string

The one line formatted address.

postalAddress

object (PostalAddress)

The address in postal address format.

addressComponents[]

object (GeocodeResult.AddressComponent)

Repeated components for each locality level.

postalCodeLocalities[]

object (LocalizedText)

Complete list of localities contained in the postal code.

This is only populated when the result is of type "postal_code".

types[]

string

A set of type tags for this result. For example, "political" and "administrative_area".

For the complete list of possible values, see Table A and Table B athttps://developers.google.com/maps/documentation/places/web-service/place-types.

plusCode

object (PlusCode)

Plus code of the location in this geocode.

GeocodeResult.AddressComponent

The structured components that form the formatted address, if this information is available.

JSON representation
{"longText":string,"shortText":string,"types":[string],"languageCode":string}
Fields
longText

string

The full text description or name of the address component. For example, an address component for the country Australia may have a long name of "Australia".

shortText

string

An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short name of "AU".

types[]

string

An array indicating the type(s) of the address component.

Seehttps://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types for more details.

languageCode

string

The language used to format this components, in CLDR notation.

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-08-27 UTC.