REST API to convert latitude/longitude coordinates into city, state, and country data. Turn GPS coordinates into human-readable locations.
Convert lat/long coordinates to location names
Returns city, state, and country code
Works with any location on Earth
5,000 requests/month on free tier
Example Response:
{
"name" : " San Francisco" ,
"state" : " California" ,
"country_code" : " US"
}
Create account at omkar.cloud
Get API key from omkar.cloud/api-key
Include API-Key header in requests
curl -X GET " https://reverse-geocoding-api.omkar.cloud/reverse-geocode?lat=37.7749&lon=-122.4194" \
-H " API-Key: YOUR_API_KEY"
[
{
"name" : " San Francisco" ,
"state" : " California" ,
"country_code" : " US"
}
]
import requests
response = requests .get (
"https://reverse-geocoding-api.omkar.cloud/reverse-geocode" ,
params = {"lat" : 37.7749 , "lon" : - 122.4194 },
headers = {"API-Key" : "YOUR_API_KEY" }
)
data = response .json ()[0 ]
print (f"Location: { data ['name' ]} , { data ['state' ]} , { data ['country_code' ]} " )
import axios from "axios" ;
const response = await axios . get ( "https://reverse-geocoding-api.omkar.cloud/reverse-geocode" , {
params : { lat : 37.7749 , lon : - 122.4194 } ,
headers : { "API-Key" : "YOUR_API_KEY" }
} ) ;
console . log ( `Location: ${ response . data [ 0 ] . name } , ${ response . data [ 0 ] . state } ` ) ;
GET https://reverse-geocoding-api.omkar.cloud/reverse-geocode
Headers
Parameter
Required
Description
lat
Yes
Latitude (-90 to 90)
lon
Yes
Longitude (-180 to 180)
Field
Type
Description
name
string
City/place name
state
string
State or province
country_code
string
Two-letter ISO country code
Get location from coordinates
response = requests .get (
"https://reverse-geocoding-api.omkar.cloud/reverse-geocode" ,
params = {"lat" : 40.7128 , "lon" : - 74.0060 },
headers = {"API-Key" : "YOUR_API_KEY" }
)
location = response .json ()[0 ]
print (f"{ location ['name' ]} , { location ['state' ]} " ) # New York, New York
response = requests .get (
"https://reverse-geocoding-api.omkar.cloud/reverse-geocode" ,
params = {"lat" : 35.6762 , "lon" : 139.6503 },
headers = {"API-Key" : "YOUR_API_KEY" }
)
location = response .json ()[0 ]
print (f"{ location ['name' ]} , { location ['country_code' ]} " ) # Tokyo, JP
response = requests .get (
"https://reverse-geocoding-api.omkar.cloud/reverse-geocode" ,
params = {"lat" : 37.7749 , "lon" : - 122.4194 },
headers = {"API-Key" : "YOUR_API_KEY" }
)
if response .status_code == 200 :
data = response .json ()
elif response .status_code == 401 :
# Invalid API key
pass
elif response .status_code == 429 :
# Rate limit exceeded
pass
Plan
Price
Requests/Month
Free
$0
5,000
Starter
$25
100,000
Grow
$75
1,000,000
Scale
$150
10,000,000
Questions? We have answers.
Reach out anytime. We will solve your query within 1 working day.