- [HTTP request](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation#body.request_body)
- [Response body](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation#body.response_body)
- [Authorization scopes](https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/geocode.location/geocodeLocation#body.aspect)

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`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### 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 (`https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/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: ||
| `locationQuery` | `string` The location in the format of "lat,lng" string. For example, "64.7611872,-18.4705364". |
| `location` | ``object (`https://developers.google.com/maps/documentation/geocoding/reference/rest/Shared.Types/Viewport#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 `https://developers.google.com/maps/documentation/geocoding/reference/rest/v4beta/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`