Reverse Geocoding API
The Reverse Geocoding API enables you convert latitude/longitude coordinates to cities that fall within those coordinates. For regular geocoding, check out our Geocoding API.
From 10,211 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 238ms | 260ms | 308ms | 449ms | 1130ms |
Didn't find what you were looking for? Suggest an improvement
/v1/reversegeocoding GET
https://api.api-ninjas.com/v1/reversegeocoding
Returns a list of cities that contain a given latitude and longitude.
Parameters
latrequiredLatitude coordinate.
lonrequiredLongitude coordinate.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
Returns an array of location objects, each containing:
nameName of the location (city, town, or area).
country2-letter ISO 3166 alpha-2 country code.
stateState, province, or administrative region name.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/reversegeocoding?lat=51.509865&lon=-0.118092Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/reversegeocoding?lat=40.7128&lon=-74.0060" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.