Free and Unlimited API to convert city names to latitude/longitude coordinates. Example Response:
{
"name": "New York",
"state": "New York",
"country_code": "US",
"coordinates": {
"latitude": 40.7127281,
"longitude": -74.0060152
}
}- Convert any city name to lat/long coordinates
- Completely free and unlimited - no rate limits, no usage caps
- Once the Geolocation API is perfected, we will open source it by February 25, 2026.
- Filter by state and country code for accuracy
- Covers cities worldwide
- High Quality Api, Built by Omkar Cloud, a pro open source organization (creators of Botasaurus, 3.8K+ GitHub stars)
- Create account at omkar.cloud
- Get API key from omkar.cloud/api-key
- Include
API-Keyheader in requests
curl -X GET "https://geocoding-api.omkar.cloud/geocode?city=New%20York" \
-H "API-Key: YOUR_API_KEY"[
{
"name": "New York",
"state": "New York",
"country_code": "US",
"coordinates": {
"latitude": 40.7127281,
"longitude": -74.0060152
}
}
]pip install requestsimport requests
response = requests.get(
"https://geocoding-api.omkar.cloud/geocode",
params={"city": "New York"},
headers={"API-Key": "YOUR_API_KEY"}
)
data = response.json()[0]
print(f"Coordinates: {data['coordinates']['latitude']}, {data['coordinates']['longitude']}")npm install axiosimport axios from "axios";
const response = await axios.get("https://geocoding-api.omkar.cloud/geocode", {
params: { city: "New York" },
headers: { "API-Key": "YOUR_API_KEY" }
});
console.log(`Coordinates: ${response.data[0].coordinates.latitude}, ${response.data[0].coordinates.longitude}`);GET https://geocoding-api.omkar.cloud/geocode
| Header | Required | Description |
|---|---|---|
API-Key |
Yes | API key from omkar.cloud/api-key |
| Parameter | Required | Description |
|---|---|---|
city |
Yes | City name to geocode (e.g., "London", "Tokyo") |
state |
No | State/region to disambiguate same-named cities |
country_code |
No | Two-letter ISO country code (e.g., "US", "GB", "JP") |
| Field | Type | Description |
|---|---|---|
name |
string | City/place name |
state |
string | State or province |
country_code |
string | Two-letter ISO country code |
coordinates |
object | Contains latitude and longitude |
response = requests.get(
"https://geocoding-api.omkar.cloud/geocode",
params={"city": "London"},
headers={"API-Key": "YOUR_API_KEY"}
)
location = response.json()[0]
print(f"{location['name']}: {location['coordinates']['latitude']}, {location['coordinates']['longitude']}")response = requests.get(
"https://geocoding-api.omkar.cloud/geocode",
params={
"city": "Paris",
"country_code": "FR"
},
headers={"API-Key": "YOUR_API_KEY"}
)
location = response.json()[0]
print(f"{location['name']}, {location['country_code']}")response = requests.get(
"https://geocoding-api.omkar.cloud/geocode",
params={
"city": "Portland",
"state": "Oregon"
},
headers={"API-Key": "YOUR_API_KEY"}
)
location = response.json()[0]
print(f"{location['name']}, {location['state']}")response = requests.get(
"https://geocoding-api.omkar.cloud/geocode",
params={"city": "New York"},
headers={"API-Key": "YOUR_API_KEY"}
)
if response.status_code == 200:
data = response.json()
elif response.status_code == 401:
# Invalid API key
passNo limits! This API is completely free with unlimited requests.
Reach out anytime. We will solve your query within 1 working day.



