5 Free Reverse Geocoding API to convert Lat-Long to Address

0 Comments
Editor Ratings:
User Ratings:
[Total: 1   Average: 3/5]




This article covers 5 reverse geocoding API to convert lat-long to address. Reverse geocoding is a process of converting geocoordinates to the corresponding address. In simple words, you can obtain a street address by entering the latitude and longitude.

The reverse geocoding APIs covered here are offered by popular geographical data providers including Google Maps, Bing Maps, and other services which are solely dealing with geographical data. These APIs are free to use with a monthly quota. Four of these services require you to create an API key for reverse geocoding whereas one (DataScienceToolkit) offers the reverse geocoding directly using just syntax without the need for an API key. You can easily generate an API key by creating a free account and then use it with the proper syntax to reverse geocode lat-long to address. Let’s explore these API providers and cover their use-case and limitations.


Also read: How To Reverse Geocode Coordinates to Address in Excel?

5 Free Reverse Geocoding API to convert Lat-Long to Address:

Location IQ

reverse geocode api locationiq

LocationIQ is one of the popular and recognized location service provider that offers enterprise-grade location services. It offers both, geocoding and reverse geocoding services with a monthly quota. It is free for non-commercial use and allows 10,000 requests per day with 60 requests per minute.

To use this API, first, you have to generate a token. To do that, you have to create an account. After creating an account, you can obtain the token from here. When you generate a token, this website also gives you the syntax to use the API. Simply replace the token and lat-long with your value in the syntax to reverse geocode geocoordinates to address.

Region 1: US
GET https://us1.locationiq.com/v1/reverse.php?key=YOUR_PRIVATE_TOKEN&lat=LAT&lon=LONG&format=json

Region 2: Europe

GET https://eu1.locationiq.com/v1/reverse.php?key=YOUR_PRIVATE_TOKEN&lat=LAT&lon=LONG&format=json

Example:

GET https://eu1.locationiq.com/v1/reverse.php?key=123456789XYZ&lat=23.546987&lon=78.658459&format=json

This API gives the output in JSON format by default. And, you can change to XML by replacing the JSON format with XML in the API syntax.

Google Maps Geocoding API

reverse geocode api google maps

Google Maps is arguably the most used geographical data providers. It offers a Geocoding API which you can be used to geocoding as well as reverse geocoding. To use this API, you an API key which you can create in Google Console. Here is a direct link to that. In order to successfully generate an API key, you have to enable the billing of your Google Console.

Once you get the API, you can use the following syntax to  reverse geocode lat-long to address:

https://maps.googleapis.com/maps/api/geocode/json?latlng=LAT,LONG&key=YOUR_API_KEY

Example:
https://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&key==123abc456def78

This API allows you to make 2,500 requests per day with 50 per second for free. And, unlike other services, requests are calculated as the sum of client-side and server-side queries. This API also gives the output in JSON format which you can change to XML by replacing the JSON with XML in the syntax.

DataScienceToolkit

reverse geocode api datascience toolkit

DataScienceToolkit (DSTK) is a collection of open-source tools and data-sets which offers various types of geographical data services. It has an API which you can use to convert lat-long to address. As I already mentioned in the intro, this service doesn’t need any API key or token. All you need is the API syntax where you can enter your lat-long values and get the addresses in the output.

Here is DSTK’s reverse geocoding API syntax:

http://www.datasciencetoolkit.org/coordinates2politics/LATLONG

Example:

http://www.datasciencetoolkit.org/coordinates2politics/37.769456%2c-122.429128

This service gives the output is JSON format with no options to change to other formats. But on the brighter side, it does not have any limitation. You can generate as many requests as you want. And, if you use some other API with limited quota, DSTK has tutorials to help you move to DSTK with ease.

MapQuest Geocoding API

reverse geocode api mapquest

MapQuest is another service that provides geospatial solutions for personal and business use. This service offers various types of location-based services including APIs for geocoding and reverse geocoding. In order to use MapQuest reverse geocoding API, you need an API key which you can obtain here. Once you get the key, you can use it with the following syntax to reverse geocode lat-long to address:

http://www.mapquestapi.com/geocoding/v1/reverse?key=KEY&location=LAT,LONG&includeRoadMetadata=true&includeNearestIntersection=true

Example:

http://www.mapquestapi.com/geocoding/v1/reverse?key=KEY&location=30.333472,-81.470448&includeRoadMetadata=true&includeNearestIntersection=true

This service also gives the output in JSON format with no option to change it to any other format. And, the API allows you to make up to 15000 requests per month for free.

Bing Maps

reverse geocode api bing maps

Just like Google Maps, Bing Maps also provides various types of location-based geospatial services. To access those feature you have to sign up to Bing Maps Dev Center. With the Dev Center, you get access to Bing Maps API for geocoding and reverse geocoding. In order to use the Bing Maps API, you have to generate a Bing Maps Key. You can do that easily from the Dev Center. Once you get the API key, you can use the following API syntax for reverse geocoding:

http://dev.virtualearth.net/REST/v1/Locations/LAT,LONG?o=xml&key={BingMapsAPIKey}

For example:

http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?o=xml&key=123456789XYZ

This API gives the data output in XML format and you can change to JSON simply by replacing XML with JSON in the syntax. This API is limited to 50 requests per days with the ability to make up to 2 simultaneous requests at a time.

Wrap Up:

These are the 5 free reverse geocoding API which you can use to convert lat-long to address. All these APIs are simple to use with their own specific monthly limitations. Out of all these, I personally prefer DSTK for two reasons; it doesn’t need a key/token and there is no limitation. This makes the syntax a lot simpler than the competition and unlimited quota just makes it better. Give them all a try and let us know which one fulfills your requirements the best.

Editor Ratings:
User Ratings:
[Total: 1   Average: 3/5]