Geocoding API overview

  • The Geocoding API converts addresses into geographic coordinates (latitude and longitude) and vice versa.

  • This API is ideal for placing markers on maps based on addresses and retrieving addresses from map locations for static content, not dynamic user input.

  • You can use the Geocoding API to find geographic coordinates for addresses, addresses for coordinates, and addresses for Place IDs.

  • The API supports both geocoding (address to coordinates) and reverse geocoding (coordinates to address).

  • Client libraries are available in Java, Python, Go, and Node.js for easy integration into your applications.

European Economic Area (EEA) developers If your billing address is in the European Economic Area, effective on 8 July 2025, the Google Maps Platform EEA Terms of Service will apply to your use of the Services. Functionality varies by region.Learn more.

The Geocoding API is a service that accepts a place as anaddress, latitude and longitude coordinates, or Place ID. It converts theaddress into latitude and longitude coordinates and a Place ID, or convertslatitude and longitude coordinates or a Place ID into an address.

Note: If you only want plus codes and don't want to use an API key, you can use thePlus codes API.

Why use the Geocoding API

Use the Geocoding API for website or mobile application when you want to use geocoding data within maps provided by one of the Google Maps Platform APIs. With the Geocoding API, you use addresses to place markers on a map, or convert a marker on a map to an address. This service is designed for geocodingpredefined, static addresses for placement of application content on a map.

This service isnot designed to respond directly to user input. To do dynamic geocoding, for example, in a user interface, see the Maps JavaScript API client geocoder and/or the Google Play services Location APIs.

What you can do with the Geocoding API

You can use the Geocoding API to obtain geocoding data for one or more addresses or places, including the following:

  • Geographic coordinates for addresses.
  • Addresses for sets of latitude and longitude coordinates.
  • Addresses for place IDs.

You can control where the results appear and constrain the results to a particular region, county, or postal code.

How the Geocoding API works

The Geocoding API does both geocoding and reverse geocoding:

  • Geocoding: Converts addresses such as "1600 Amphitheatre Parkway, Mountain View, CA" into latitude and longitude coordinates or Place IDs. You can use these coordinates to place markers on a map, or to center or reposition the map within the view frame.
  • Reverse geocoding: Converts latitude/longitude coordinates or a Place ID into a human-readable address. You can use addresses for a variety of scenarios, including deliveries or pickups.

The following demo uses the Geocoding Service through the Maps JavaScript API to demonstrate how the Geocoding API works. Open the map in a separate tab to see more options and details.

Resources

The following table summarizes the resources available through the Geocoding API along with the data each endpoint returns.

Data resourcesData returnedReturn format
GeocodingReturns address, address components, and address types. SeeResults in theGeocoding request and response guide.
  • JSON
  • XML
Reverse geocodingReturns address, address components, and address types. SeeReverse geocoding responses in the Reverse geocoding request and response guide.
Place geocodingReturns address, address components, and address types. SeeReverse geocoding responses in the Place geocoding request and response guide.

How to use the Geocoding API

1Get set up.Start withSet up your Google Cloud project and complete the setup instructions that follow.
2Try a geocoding requestOnce you have an API key, you can start testing out the Geocoding API directly from curl or a browser. You'll need to supply the correct lookup parameters for address or component lookups. SeeGeocoding parameters for details.
3Try a reverse geocoding requestSupply latitude/longitude coordinates along with your API key to obtain address components for the closest human-readable address for that location. SeeReverse geocoding requests for details.
4Understand response basicsAll endpoints in the Geocoding API return the same data in either JSON or XML. SeeGeocoding responses for an explanation of the data, status codes, and error messages.
5Incorporate geocoding data into your own app!You can use geocoding data to obtain addresses from map markers or to supply markers on a map based on a known address.

Available client libraries

Call this API in the language ofyour choice through one of the following client libraries:

The Java Client, Python Client, Go Client and Node.js Client for Google MapsServices are community-supported client libraries, open sourced under theApache 2.0 License.Download them from GitHub, where you can also find installation instructions and sample code.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-11-21 UTC.