Method: geocode.location.geocodeLocationQuery

This method performs a location geocode, which maps a LatLng to an address. It also provides structured information about the address.

HTTP request

GET https://geocode.googleapis.com/v4beta/geocode/location/{locationQuery}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
The location to geocode. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
locationQuery

string

The location in the format of "lat,lng" string. For example, "64.7611872,-18.4705364".

End of mutually exclusive fields.

Query parameters

Parameters
languageCode

string

Optional. Language in which the results should be returned.

regionCode

string

Optional. Region code. The region code, specified as a ccTLD ("top-level domain") two-character value. The parameter affects results based on applicable law.

types[]

string

Optional. A set of type tags to restrict the results. Results that do not have any of the specified types are removed.

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

granularity[]

enum (GeocodeResult.Granularity)

Optional. A filter of one or more location granularity enums.

The location to geocode. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
location

object (LatLng)

The location in the structured format.

End of mutually exclusive fields.

Request body

The request body must be empty.

Response body

If successful, the response body contains an instance of GeocodeLocationResponse.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/maps-platform.geocode
  • https://www.googleapis.com/auth/maps-platform.geocode.location