Reverse Geocoding API
Our Reverse Geocoding API takes lat/long coordinates and converts them into a location address.
Use the Reverse Geocoding API when you have a person's lat/long position and want to translate that into their address. You can also convert latitude and longitude to address of the place or building when clicking on a map.
For example, for the coordinates "lat: 52.152066, long: 9.952231" the Reverse Geocoding API will return the address "Stadtbibliothek, Judenstraße 1, 31134 Hildesheim, Germany".
On this page
Try Our Reverse Geocoding API
Click on the map below to query the latitude/longitude coordinates. Switch to the "Result JSON" tab to see the API result object, and go to the "URL" tab to get the API request URL:
Visit our Reverse Geocoding API Playground to set your language or change the number of results returned when calling the API.
Reverse Geocoding API Use Cases
There are many ways to use the Reverse Geocoding API in your business:
Find your customer's address from their location
You find your customer's address by examining their location. For example, if you've got a taxi firm, you can use the GPS coordinates from the customer's mobile to get address suggestions.
Click on a map and get address information
Get the address information you need by clicking on a map. With reverse geocoding you can click the building on a map in your application, and our API will provide address details.
Use geographical information to better target your customers
Use city, county, or state information to provide highly targeted ad campaigns and offers to your customers. For example, if you have a restaurant chain and you notice a specific dish is popular in a city, you can show ads for money off that dish to customers in that city.
Use with our other APIs to get the results you need
You can use our Reverse Geocoding API with our other APIs to get the location information you need:
Need to track assets such as deliveries or fleet tracking?
Match GPS coordinates with road databases using our Map Matching API to create a route track.
Features and capabilities
Get Address from Latitude and Longitude
Enter a latitude and longitude pair and our Reverse Geocoding API provides a corresponding address. If the coordinates are outside a building, our API returns the nearest address along with distance in metres to the original coordinates. This helps you estimate how far the returned address is from the latitude and longitude you entered.
Here's an example of the result object of Reverse Geocoding API in JSON format:
- [] 1 item▶
- {} 25 keys▶
- {} 4 keys▶
- "openstreetmap"
- "© OpenStreetMap contributors"
- "Open Database License"
- "https://www.openstreetmap.org/copyright"
- "White Cube"
- "144-152"
- "Bermondsey Street"
- "Old Kent Road"
- "London"
- "Greater London"
- "England"
- "SE1 3TQ"
- "United Kingdom"
- "gb"
- -0.08232898488016241
- 51.49945965
- "ENG"
- 5.3214605688001875
- "amenity"
- "Southwark"
- "White Cube, 144-152 Bermondsey Street, London, SE1 3TQ, United Kingdom"
- "White Cube"
- "144-152 Bermondsey Street, London, SE1 3TQ, United Kingdom"
- "entertainment.culture.gallery"
- {} 7 keys▶
- "Europe/London"
- "+00:00"
- 0
- "+01:00"
- 3600
- "GMT"
- "BST"
- {} 2 keys▶
- 0.3785485023418972
- 8.495473945193059
- "51aabb92298313b5bf59f735374beebf4940f00102f901228c1a060000000092030a57686974652043756265e203216f70656e7374726565746d61703a76656e75653a7761792f313032343033313036"
- {} 4 keys▶
- -0.08295
- 51.4990909
- -0.0817856
- 51.4997666
Results can be returned in GeoJSON, JSON, or XML format.
Localize the results
Our API's language parameters let you retrieve localized addresses. For example, here's an API URL link for a French version of the address:
https://api.geoapify.com/v1/geocode/reverse?lat=52.532329&lon=13.411415&lang=fr&apiKey=YOUR_API_KEY
Convert latitude/longitude to address, street, postcode, city, and country
With our API you can query different parameters for each set of coordinates. For each given location you can get the country, city, postcode or address.
Here's a URL example to get the postcode by latitude/longitude:
https://api.geoapify.com/v1/geocode/reverse?lat=52.478117501285965&lon=13.47717282413089&type=postcode&apiKey=YOUR_API_KEY
And here's a URL example to get the country by latitude/longitude:
https://api.geoapify.com/v1/geocode/reverse?lat=52.478117501285965&lon=13.47717282413089&type=country&apiKey=YOUR_API_KEY
A URL example to get the street by latitude/longitude:
https://api.geoapify.com/v1/geocode/reverse?lat=52.478117501285965&lon=13.47717282413089&type=street&apiKey=YOUR_API_KEY
Permissive and safe
We based our Reverse Geocoding API on open data. You can cache and store your results every time. And we have “soft” limits on our plans, so even if you exceed the limit we won't block or ban you.
Made by developers for developers
Our API is easy and convenient to use. It works via HTTP Get and can be integrated with any website or app, and with any programming language.
Bulk reverse geocoding
With bulk geocoding you can process thousands of records at once. Enter multiple pairs of coordinates and our API will return batch results. Learn more about Batch Geocoding Requests >>
We can help you set up large volume queries. Reach out to us and let's talk about your needs.
Getting Started and Reverse Geocoding API Code Samples
Step 1. Register and get an API Key
You'll need an API key to communicate with the API:
- Sign up on MyProject Geoapify page
- Create a new project
- Go to the "API keys" page and get an API key
Step 2. Generate and call HTTP GET API request
The API works via HTTP GET requests. The typical geocoding request looks like this:
https://api.geoapify.com/v1/geocode/reverse?lat=52.534708&lon=13.403800&apiKey=YOUR_API_KEY
Learn more about the API parameters on our documentation page or generate a URL with Reverse Geocoding API Playground.
Here is a code sample that shows how to get an address when a user clicks on a Leaflet map:
map.on('click', onMapClick);
function onMapClick(e) {
if (marker) {
marker.remove();
}
const reverseGeocodingUrl = `https://api.geoapify.com/v1/geocode/reverse?lat=${e.latlng.lat}&lon=${e.latlng.lng}&apiKey=${myAPIKey}`;
// call Reverse Geocoding API - https://www.geoapify.com/reverse-geocoding-api/
fetch(reverseGeocodingUrl).then(result => result.json())
.then(featureCollection => {
if (featureCollection.features.length === 0) {
console.log("The address is not found");
return;
}
const foundAddress = featureCollection.features[0];
marker = L.marker(new L.LatLng(foundAddress.properties.lat, foundAddress.properties.lon)).addTo(map);
});
}
You can find a complete code sample on JSFiddle >>
How Much Does It Cost?
We know cost matters. That's why our pricing is straightforward, fair, and clear.
Our model for the Reverse Geocoding is simple:
1 credit = 1 request.
And you can get started for free. Our free plan includes 3000 credits daily at no charge, which is good news for your budget.
Need more than 3000 credits per day? No worries. Our affordable pricing plans make it easy to get the credits you need. If you need more than 3000 credits, but it's only a one time job, don't worry. You can subscribe for as little as one month.
If you want to save even more money, our batch geocoding requests are up to 50% cheaper.
Reverse Geocoding Tutorials and Blog Posts
Discover more about reverse geocoding, address conversion, and how to integrate Geoapify's API into your projects. Explore our curated tutorials and blog posts for practical insights, tips, and step-by-step guides to enhance your geospatial applications.
Javascript Tutorial: How to get address by coordinates with Reverse Geocoding API
Javascript Tutorial: How to search addresses with Geocoding API
How To Geocode Millions Of Records Efficiently
FAQ
What is Reverse Geocoding?
Reverse Geocoding is the process of converting geographic coordinates (latitude/longitude) into a readable address or place name. It allows you to identify an address based on the location clicked on a map or a user's GPS coordinates.
How do I get an address for a latitude/longitude pair?
Geoapify's Reverse Geocoding API converts latitude/longitude coordinates into detailed address information, including house number, street, postcode, city, and country.
Is Geoapify Reverse Geocoding API free?
We offer a generous free tier with up to 3,000 queries per day (90,000 requests per month). After that, our affordable pricing plans ensure you can continue using the API within your budget.
Can I use the free plan for a commercial project?
Yes, the free plan can be used for commercial projects. We request that you include a follow-link to Geoapify on your website, such as "Powered by <a href="https://www.geoapify.com/">Geoapify</a>" near information about Geocoding service.
Can I store my reverse geocoding results?
Yes, you can store your results indefinitely. Geoapify's services are based on open data, so you're allowed to keep and use the data as long as you maintain the Geoapify attribution included with the address information.
How do I get the nearest city for a specific lat/lon coordinate?
Use the Reverse Geocoding API with the 'lat' and 'lon' parameters for your coordinates. Set the 'type' parameter to 'city' to retrieve the closest city. You can find more details in our documentation.
How can I get the postcode from lat/lon coordinates?
To get a postcode, use the Reverse Geocoding API with your 'lat' and 'lon' coordinates, and set the 'type' parameter to 'postcode'. See examples in our documentation.
How can I get the result in JSON format?
Set the 'format' parameter to 'json' in the Reverse Geocoding API to receive the response in JSON format.
How do I retrieve location information in a specific language?
Use the 'lang' parameter in the Reverse Geocoding API to specify the 2-character ISO 639-1 code for the language you want.
How can I retrieve country information using lat/lon coordinates?
To get the country for specific coordinates, set the 'type' parameter to 'country'.
Ready to get started?
Get an API key and start Geocoding! Don't forget to check our tutorials for code samples.
Need further help? Get in touch and we'll be happy to help you find what you need.