Geocoding API overview
Stay organized with collections
Save and categorize content based on your preferences.
The Geocoding API is a service that accepts a place as an address, latitude and longitude coordinates, or Place ID. It converts the address into latitude and longitude coordinates and a Place ID, or converts latitude and longitude coordinates or a Place ID into an address.
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 method returns.
| Data resources | Data returned | Return format |
|---|---|---|
| Geocoding | Returns address, address components, and address types. See Results in the Geocoding request and response guide. |
|
| Reverse geocoding | Returns address, address components, and address types. See Reverse geocoding responses in the Reverse geocoding request and response guide. | |
| Place geocoding | Returns address, address components, and address types. See Reverse geocoding responses in the Place geocoding request and response guide. |
How to use the Geocoding API
Available client libraries
Call this API in the language of your choice through one of the following client libraries:
- Java Client for Google Maps Services
- Python Client for Google Maps Services
- Go Client for Google Maps Services
- Node.js Client for Google Maps Services
The Java Client, Python Client, Go Client and Node.js Client for Google Maps Services are community-supported client libraries, open sourced under the Apache 2.0 License. Download them from GitHub, where you can also find installation instructions and sample code.
What's next
- Start using the Geocoding API: Go to Set up your Google Cloud project.
- Get started with sample requests and responses: Go to Geocoding requests and responses
- Follow best practices: Go to Geocoding Addresses Best Practices.