**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/guides-v3/cloud-setup).

The Geocoding API is a service that provides geocoding and reverse geocoding
of addresses.

> [!NOTE]
> This service is also available as part of the client-side [Google Maps JavaScript
> API](https://developers.google.com/maps/documentation/javascript/geocoding), or for server-side use with the [Java Client,
> Python Client, Go Client and Node.js Client for Google Maps Services](https://developers.google.com/maps/documentation/geocoding/client-library).

**Geocoding** is the process of converting addresses (like a street address)
into geographic coordinates (like latitude and longitude), which you can use to place markers
on a map, or position the map.

**Reverse geocoding** is the process of converting geographic coordinates
into a human-readable address.

You can also use the Geocoding API to find the address for a
given [place ID](https://developers.google.com/maps/documentation/geocoding/guides-v3/requests-places-geocoding.md.txt).

## Sample request and response

You access the Geocoding API through an HTTP interface. Following
are examples of geocoding and [reverse geocoding](https://developers.google.com/maps/documentation/geocoding/guides-v3/start.md.txt#reverse) requests.

### 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.

```
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&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/guides-v3/get-api-key.md.txt)).
The response includes the latitude and longitude of the address.

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

Below is a sample geocoding response, in JSON:

```
{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "1600",
               "short_name" : "1600",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "Amphitheatre Parkway",
               "short_name" : "Amphitheatre Pkwy",
               "types" : [ "route" ]
            },
            {
               "long_name" : "Mountain View",
               "short_name" : "Mountain View",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "Santa Clara County",
               "short_name" : "Santa Clara County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "California",
               "short_name" : "CA",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "94043",
               "short_name" : "94043",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
         "geometry" : {
            "location" : {
               "lat" : 37.4267861,
               "lng" : -122.0806032
            },
            "location_type" : "ROOFTOP",
            "viewport" : {
               "northeast" : {
                  "lat" : 37.4281350802915,
                  "lng" : -122.0792542197085
               },
               "southwest" : {
                  "lat" : 37.4254371197085,
                  "lng" : -122.0819521802915
               }
            }
         },
         "place_id" : "ChIJtYuu0V25j4ARwu5e4wwRYgE",
         "plus_code" : {
            "compound_code" : "CWC8+R3 Mountain View, California, United States",
            "global_code" : "849VCWC8+R3"
         },
         "types" : [ "street_address" ]
      }
   ],
   "status" : "OK"
}
```

### 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://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&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/guides-v3/start.md.txt#get-a-key)).
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/overview)
for more information about
[building reverse geocoding request URLs](https://developers.google.com/maps/documentation/geocoding/overview#GeocodingRequests) and
[available parameters](https://developers.google.com/maps/documentation/geocoding/overview#ReverseGeocoding)
and [understanding the response](https://developers.google.com/maps/documentation/geocoding/overview#reverse-response).

Below is a sample reverse geocoding response, in JSON:

```
{
   "plus_code" : {
      "compound_code" : "P27Q+MC New York, NY, USA",
      "global_code" : "87G8P27Q+MC"
   },
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "279",
               "short_name" : "279",
               "types" : [ "street_number" ]
            },
            {
               "long_name" : "Bedford Avenue",
               "short_name" : "Bedford Ave",
               "types" : [ "route" ]
            },
            {
               "long_name" : "Williamsburg",
               "short_name" : "Williamsburg",
               "types" : [ "neighborhood", "political" ]
            },
            {
               "long_name" : "Brooklyn",
               "short_name" : "Brooklyn",
               "types" : [ "political", "sublocality", "sublocality_level_1" ]
            },
            {
               "long_name" : "Kings County",
               "short_name" : "Kings County",
               "types" : [ "administrative_area_level_2", "political" ]
            },
            {
               "long_name" : "New York",
               "short_name" : "NY",
               "types" : [ "administrative_area_level_1", "political" ]
            },
            {
               "long_name" : "United States",
               "short_name" : "US",
               "types" : [ "country", "political" ]
            },
            {
               "long_name" : "11211",
               "short_name" : "11211",
               "types" : [ "postal_code" ]
            }
         ],
         "formatted_address" : "279 Bedford Ave, Brooklyn, NY 11211, USA",
         "geometry" : {
            "location" : {
               "lat" : 40.7142484,
               "lng" : -73.9614103
            },
            "location_type" : "ROOFTOP",
            "viewport" : {
               "northeast" : {
                  "lat" : 40.71559738029149,
                  "lng" : -73.9600613197085
               },
               "southwest" : {
                  "lat" : 40.71289941970849,
                  "lng" : -73.96275928029151
               }
            }
         },
         "place_id" : "ChIJT2x8Q2BZwokRpBu2jUzX3dE",
         "plus_code" : {
            "compound_code" : "P27Q+MC Brooklyn, New York, United States",
            "global_code" : "87G8P27Q+MC"
         },
         "types" : [
            "bakery",
            "cafe",
            "establishment",
            "food",
            "point_of_interest",
            "store"
         ]
      },

   ... Additional results truncated in this example[] ...

   ],
   "status" : "OK"
}
```

## Start coding with our client libraries

Client libraries help you
develop with the Google Maps web service APIs by providing built-in
implementations of common tasks, such as authentication, request
throttling, and automatic retry. The Geocoding API is
available in the
[Java Client,
Python Client, Go Client, and Node.js Client for Google Maps Services](https://developers.google.com/maps/documentation/geocoding/client-library).

## 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

See 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.

### Policies

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

## Learn more

There's more you can do with the Geocoding API. See the
[Geocoding API developer guide](https://developers.google.com/maps/documentation/geocoding/overview) for additional demos,
examples, available parameters, status codes and error messages, and other details.

The [Geocoding API developer guide](https://developers.google.com/maps/documentation/geocoding/overview) describes the
Geocoding API web service. It is intended for website and mobile developers
who want to use geocoding data within maps provided by one of the Google Maps Platform
APIs.