**European Economic Area (EEA) developers**

> [!NOTE]
> If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](https://developers.google.com/maps/comms/eea/faq.md.txt).

> [!NOTE]
> **Before you begin:** Before you start using the Geocoding API, you need a project with a billing account and the Geocoding API enabled. We recommend creating multiple Project Owners and Billing Administrators, so that you'll always have someone with these roles available to your team. To learn more, see [Set up in Cloud console](https://developers.google.com/maps/documentation/geocoding/cloud-setup).

The Geocoding API v4 provides two core capability families: destination search for rich hyperlocal attributes, and basic geocoding (coordinate-address conversion). Not sure which method to use? See [**Choose a geocoding method**](https://developers.google.com/maps/documentation/geocoding/choose-a-method.md.txt).

- [**Search for destinations (`SearchDestinations`)**](https://developers.google.com/maps/documentation/geocoding/search-for-destinations.md.txt): Retrieves rich arrival details for a destination---including building entrances, routable [navigation points](https://developers.google.com/maps/documentation/geocoding/navigation-point-tokens.md.txt), building/grounds outlines, sub-destinations, and nearby landmarks.
- [**Geocoding (`GeocodeAddress`)**](https://developers.google.com/maps/documentation/geocoding/geocoding.md.txt): Converts street addresses into latitude and longitude coordinates to place basic markers or center a map.
- [**Reverse geocoding (`GeocodeLocation`)**](https://developers.google.com/maps/documentation/geocoding/reverse-geocoding.md.txt): Converts geographic coordinates into a human-readable street address.
- [**Place geocoding (`GeocodePlace`)**](https://developers.google.com/maps/documentation/geocoding/places-geocoding.md.txt): Finds the formatted address and coordinates for a known Place ID.

## Sample requests and responses

You access the Geocoding API through an HTTP interface. Below are quickstart examples for [Search for destinations](https://developers.google.com/maps/documentation/geocoding/start-v4.md.txt#destinations-request), [forward geocoding](https://developers.google.com/maps/documentation/geocoding/start-v4.md.txt#geocoding-request), and [reverse geocoding](https://developers.google.com/maps/documentation/geocoding/start-v4.md.txt#reverse).

### Search for destinations request and response (hyperlocal arrival data)

The following example sends an HTTP `POST` request to `SearchDestinations` for "1600 Amphitheatre Parkway, Mountain View, CA". Note that `SearchDestinations` requires an `X-Goog-FieldMask` header specifying the fields to return:

```
curl -X POST -d '{
  "addressQuery": {
    "addressQuery": "1600 Amphitheatre Parkway, Mountain View, CA"
  }
}' \
-H 'Content-Type: application/json' \
-H 'X-Goog-FieldMask: destinations.primary.displayName,destinations.primary.formattedAddress,destinations.primary.location,destinations.primary.displayPolygon,destinations.entrances,destinations.navigationPoints,destinations.landmarks' \
-H "X-Goog-Api-Key: YOUR_API_KEY" \
"https://geocode.googleapis.com/v4/geocode/destinations"
```

Below is a sample `SearchDestinations` response showing the building footprint polygon, preferred entrances, routable navigation points, and nearby landmarks:

```
{
  "destinations": [
    {
      "primary": {
        "displayName": { "text": "Googleplex", "languageCode": "en" },
        "formattedAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
        "location": { "latitude": 37.4220656, "longitude": -122.0840897 },
        "displayPolygon": {
          "type": "Polygon",
          "coordinates": [
            [
              [-122.084958, 37.422145],
              [-122.084112, 37.422610],
              [-122.083510, 37.421980],
              [-122.084958, 37.422145]
            ]
          ]
        }
      },
      "entrances": [
        {
          "location": { "latitude": 37.422189, "longitude": -122.084215 },
          "tags": ["PREFERRED"]
        }
      ],
      "navigationPoints": [
        {
          "navigationPointToken": "Eg...",
          "displayName": { "text": "Amphitheatre Pkwy Dropoff", "languageCode": "en" },
          "location": { "latitude": 37.421912, "longitude": -122.084301 },
          "travelModes": ["DRIVE"],
          "usages": ["DROPOFF", "PICKUP"]
        }
      ],
      "landmarks": [
        {
          "place": { "displayName": { "text": "Charleston Park", "languageCode": "en" } },
          "relationalDescription": { "text": "Adjacent to Charleston Park", "languageCode": "en" },
          "straightLineDistanceMeters": 85.4
        }
      ]
    }
  ]
}
```

### Geocoding request and response (latitude/longitude lookup)

The following example requests the latitude and longitude of "1600 Amphitheatre
Parkway, Mountain View, CA", and specifies that the output must be in JSON format.

```
curl -H "X-Goog-Api-Key: YOUR_API_KEY" \
"https://geocode.googleapis.com/v4/geocode/address/1600+Amphitheatre+Parkway,+Mountain+View,+CA"
```

You can test this by entering the URL into your web browser (be sure to replace
`YOUR_API_KEY` with [your actual API key](https://developers.google.com/maps/documentation/geocoding/get-api-key-v4.md.txt)).
The response includes the latitude and longitude of the address.

View the [developer's guide](https://developers.google.com/maps/documentation/geocoding/geocoding-v4-overview.md.txt)
for more information about
[building geocoding request URLs](https://developers.google.com/maps/documentation/geocoding/geocoding.md.txt#geocode_request),
[available parameters](https://developers.google.com/maps/documentation/geocoding/geocoding.md.txt#required_parameters)
and [understanding the response](https://developers.google.com/maps/documentation/geocoding/geocoding.md.txt#geocode_response).

Below is a sample geocoding response, in JSON:

```
{
  "results": [
    {
      "place": "//places.googleapis.com/places/ChIJ2Z2idB66j4ARI43TG-9RoCQ",
      "placeId": "ChIJ2Z2idB66j4ARI43TG-9RoCQ",
      "location": {
        "latitude": 37.4438238,
        "longitude": -122.0869895
      },
      "granularity": "ROOFTOP",
      "viewport": {
        "low": {
          "latitude": 37.4424748197085,
          "longitude": -122.0883384802915
        },
        "high": {
          "latitude": 37.445172780291493,
          "longitude": -122.08564051970852
        }
      },
      "formattedAddress": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
      "postalAddress": {
        "regionCode": "US",
        "languageCode": "en",
        "postalCode": "94043-1351",
        "administrativeArea": "CA",
        "locality": "Mountain View",
        "addressLines": [
          "1600 Amphitheatre Pkwy"
        ]
      },
      "addressComponents": [
        {
          "longText": "1600",
          "shortText": "1600",
          "types": [
            "street_number"
          ]
        },
        {
          "longText": "Amphitheatre Parkway",
          "shortText": "Amphitheatre Pkwy",
          "types": [
            "route"
          ],
          "languageCode": "en"
        },
        {
          "longText": "Mountain View",
          "shortText": "Mountain View",
          "types": [
            "locality",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "Santa Clara County",
          "shortText": "Santa Clara County",
          "types": [
            "administrative_area_level_2",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "California",
          "shortText": "CA",
          "types": [
            "administrative_area_level_1",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "United States",
          "shortText": "US",
          "types": [
            "country",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "94043",
          "shortText": "94043",
          "types": [
            "postal_code"
          ]
        },
        {
          "longText": "1351",
          "shortText": "1351",
          "types": [
            "postal_code_suffix"
          ]
        }
      ],
      "types": [
        "premise",
        "street_address"
      ]
    }
  ]
}
```

### Reverse geocoding request and response (address lookup)

The following example requests the address corresponding to a given latitude/longitude
in Brooklyn, NY, USA. It specifies that the output must be in JSON format.

```
https://geocode.googleapis.com/v4/geocode/location/37.4225508,-122.0846338?key=YOUR_API_KEY
```

You can test this by entering the URL into your web browser (be sure to replace
'YOUR_API_KEY' with [your actual API key](https://developers.google.com/maps/documentation/geocoding/get-api-key-v4.md.txt)).
The response includes a human-readable address for the latitude and longitude
location.

View the [developer's guide](https://developers.google.com/maps/documentation/geocoding/geocoding-v4-overview.md.txt)
for more information about
[building reverse geocoding request URLs](https://developers.google.com/maps/documentation/geocoding/reverse-geocoding.md.txt), [available parameters](https://developers.google.com/maps/documentation/geocoding/reverse-geocoding.md.txt#required_parameters),
and [understanding the response](https://developers.google.com/maps/documentation/geocoding/reverse-geocoding.md.txt#reverse_geocoding_response).

Below is a sample reverse geocoding response, in JSON:

```
{
  "results": [
    {
      "place": "//places.googleapis.com/places/ChIJHRNUiQK6j4ARJ__Hrbt6qsE",
      "placeId": "ChIJHRNUiQK6j4ARJ__Hrbt6qsE",
      "location": {
        "latitude": 37.4225657,
        "longitude": -122.08465439999999
      },
      "granularity": "ROOFTOP",
      "viewport": {
        "low": {
          "latitude": 37.421214719708509,
          "longitude": -122.08603273029148
        },
        "high": {
          "latitude": 37.423912680291508,
          "longitude": -122.0833347697085
        }
      },
      "bounds": {
        "low": {
          "latitude": 37.4225178,
          "longitude": -122.08484599999998
        },
        "high": {
          "latitude": 37.422609600000008,
          "longitude": -122.0845215
        }
      },
      "formattedAddress": "Google Building 40, 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
      "postalAddress": {
        "regionCode": "US",
        "languageCode": "en",
        "postalCode": "94043",
        "administrativeArea": "CA",
        "locality": "Mountain View",
        "addressLines": [
          "Google Building 40",
          "1600 Amphitheatre Pkwy"
        ]
      },
      "addressComponents": [
        {
          "longText": "Google Building 40",
          "shortText": "Google Building 40",
          "types": [
            "premise"
          ],
          "languageCode": "en"
        },
        {
          "longText": "1600",
          "shortText": "1600",
          "types": [
            "street_number"
          ]
        },
        {
          "longText": "Amphitheatre Parkway",
          "shortText": "Amphitheatre Pkwy",
          "types": [
            "route"
          ],
          "languageCode": "en"
        },
        {
          "longText": "Mountain View",
          "shortText": "Mountain View",
          "types": [
            "locality",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "Santa Clara County",
          "shortText": "Santa Clara County",
          "types": [
            "administrative_area_level_2",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "California",
          "shortText": "CA",
          "types": [
            "administrative_area_level_1",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "United States",
          "shortText": "US",
          "types": [
            "country",
            "political"
          ],
          "languageCode": "en"
        },
        {
          "longText": "94043",
          "shortText": "94043",
          "types": [
            "postal_code"
          ]
        }
      ],
      "types": [
        "street_address",
        "subpremise"
      ]
    },
    ... Additional results truncated in this example[] ...
}
```

## Authentication, quotas, pricing, and policies

### Authentication

To use the Geocoding API, you must first enable the API
and obtain the proper authentication credentials. For more information, see
[Get Started with Google Maps Platform](https://developers.google.com/maps/get-started.md.txt).

### Quotas and pricing

Review the [usage and billing](https://developers.google.com/maps/documentation/geocoding/usage-and-billing.md.txt)
page for details on the quotas and pricing set for the Geocoding API.

> [!NOTE]
> **Note:** During Preview, Geocoding API v4 methods are limited to 25 queries per second (QPS). For information on requesting a higher quota, see [View and manage quotas](https://docs.cloud.google.com/docs/quotas/view-manage#requesting_higher_quota) and select **Geocoding API** as the service.

> [!WARNING]
> **Warning:** Due to security risks, you shouldn't call Geocoding API v4
> methods directly from client-side JavaScript. If you are doing so against
> recommendations, be aware that requesting higher quotas increases the potential
> impact of API key abuse. See [Security considerations](https://developers.google.com/maps/documentation/geocoding/geocoding-v4-migrate.md.txt#security-considerations).

### Policies

Use of the Geocoding API must be in accordance with the
[API policies](https://developers.google.com/maps/documentation/geocoding/policies.md.txt).