Stay organized with collections Save and categorize content based on your preferences.
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.The Geocoding API is a service that provides geocoding and reverse geocoding of addresses.
This service is also available as part of the client-side Google Maps JavaScript API, or for server-side use with the Java Client, Python Client, Go Client and Node.js Client for Google Maps Services.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.
Sample request and responseYou access the Geocoding API through an HTTP interface. Following are examples of geocoding and reverse geocoding 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). The response includes the latitude and longitude of the address.
View the developer's guide for more information about building geocoding request URLs and available parameters and understanding the response.
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). The response includes a human-readable address for the latitude and longitude location.
View the developer's guide for more information about building reverse geocoding request URLs and available parameters and understanding the 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 make developing with the Google Maps web service APIs easier by providing simple, native 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.
Authentication, quotas, pricing, and policies AuthenticationTo 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.
Quotas and pricingReview the usage and billing page for details on the quotas and pricing set for the Geocoding API.
PoliciesUse of the Geocoding API must be in accordance with the API policies.
Learn moreThere’s more you can do with the Geocoding API. See the Geocoding API developer guide for additional demos, examples, available parameters, status codes and error messages, and other details.
The Geocoding API developer guide 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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-09 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-09 UTC."],[[["The Geocoding API converts addresses into geographic coordinates (geocoding) and vice versa (reverse geocoding)."],["You need a Google Cloud project with billing enabled and the Geocoding API enabled before using the service."],["Access the Geocoding API through HTTP requests, specifying the address or coordinates and desired output format."],["Client libraries are available for Java, Python, Go, and Node.js to simplify development with the API."],["Usage of the Geocoding API is subject to quotas, pricing, and policies outlined in the documentation."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4