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
Union parameter location_input. The location to geocode. location_input can be only one of the following:
locationQuery

string

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

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 (Granularity)

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

Union parameter location_input. The location to geocode. location_input can be only one of the following:
location

object (LatLng)

The location in the structured format.

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