Reverse Geocoding API

Reverse Geocoding - the API to search addresses by latitude/longitude coordinates. Reverse Geocoding API is functional when you need to know a user's location address by his position or get the address of the place or building the user clicked on.

For example, for "lat: 52.152066, lon: 9.952231" coordinates the Reverse Geocoding API will return the "Stadtbibliothek, Judenstraße 1, 31134 Hildesheim, Germany" address.

Try Reverse Geocoding API

Click on the map to query an address for the latitude/longitude coordinates. Then, switch to the "GeoJSON" tab to check the API result object and "URL" tabs to get the API request URL:

Try set language or change the number of results when calling the API with the Reverse Geocoding API Playground >>

Features and capabilities

Get corresponding address by coordinates

The API provides a corresponding address for latitude and longitude pair. When the coordinates are outside a building with an address, the reverse geocoding returns the nearest address. In addition, the result object contains a distance in meters to the original coordinates, so you can estimate how far is the found address to the original location.

Here is an example of the result object of Reverse Geocoding API:

    • "FeatureCollection"
    • [] 1 item
      • {} 3 keys
        • "Feature"
        • {} 2 keys
          • "Point"
          • [] 2 items
            • 13.420649
            • 52.536956
        • {} 20 keys
          • "43"
          • "Rykestraße"
          • 27.66892814155257
          • "Germany"
          • {} 3 keys
            • "openaddresses"
            • "© OpenAddresses contributors"
            • "BSD-3-Clause License"
          • "de"
          • "10405"
          • "Berlin"
          • "Berlin"
          • "Berlin"
          • "Prenzlauer Berg"
          • 13.420649
          • 52.536956
          • "building"
          • "Rykestraße 43, 10405 Berlin, Germany"
          • "Rykestraße 43"
          • "10405 Berlin, Germany"
          • "BE"
          • {} 1 key
            • 8.571847884884006
          • "51b130444e5fd72a40590cb265f9ba444a40"

Localize the results

The API has a language parameter that allows retrieving localized addresses. Here is, for example, 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

Bulk reverse geocoding

You can create a Bulk Reverse Geocoding request with Geoapify Batcher. So you will be able to process many coordinates pairs and get the result after some time. Learn more about Batch Geocoding Requests >>

Why the Geoapify Reverse Geocoding?

Affordable prices

Affordable for every business

We have a Freemium model and pricing plans for different volutes and rates. So you can register and start for Free and upgrade when you need it.

Simple and cross-platform

By developers for developers

The API is convenient and straightforward to use. It works via HTTP Get and can be integrated into any website or app with any programming language.

permissive conditions

Permissive and safe

Geoapify geocoding services are based on open data, so you can use the geocoding results you get and cache and store them. Moreover, we have "soft" limits, so we will not block or ban you even if you exceed the limits of your current plan.

Getting started

Step 1. Register and get an API Key

The API key is needed to communicate with the API:

  • sing 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.

Code samples

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

FAQ

How to get an address programmatically for latitude/longitude pair?

The Geoapify Reverse Geocoding API returns an address and location information by latitude/longitude coordinates provided. The result includes house number, street, postcode, city, country, and other address components.

What is Reverse Geocoding?

Reverse Geocoding is a process of an address search for the given location coordinates. For example, you can query an address for a user location or get building information a customer clicked on.

Is Reverse Geocoding API Free?

You can use the Reverse Geocoding API for Free when your usage does not exceed the Free Tier limit. You can run up to 3000 queries/day (or 90.000 requests/month) when using Geoapify Reverse Geocoding API.

How can I get not building but streets as the result?

The Reverse Geocoding API's primary purpose is to provide information on what is located on the coordinate provided and the location's address. That's why buildings and amenities have more significant priorities than streets. Map Matching API (currently available on request) that matches GPS coordinates to roads and paths can fit better in your case.

Can I use the Free plan for a commercial project?

Yes, but you need to provide a follow-link to Geoapify on your website. For example, "Powered by Geoapify" near information about Geocoding service.

Can I store Reverse Geocoding results?

Yes, you can do it! Geoapify services are based on open data, so our terms and conditions allow you to keep the results as long as you need them. However, please keep the attributions we return you together with the address objects.

Ready to get started?

Get an API key and try Geoapify Reverse Geocoding API!