
City API
City API
TLDR
- Get city data (name, state, coordinates, population, capital status) for any city worldwide via API.
- 100 free queries per month.
Here's a sample response:
[
{
"city_name": "New York",
"state": "New York",
"country_code": "US",
"is_capital": false,
"coordinates": {
"latitude": 40.6943,
"longitude": -73.9249
},
"population": 18713220
}
]❓ What is this?
The City API gives you instant access to city data for any city worldwide.
Pass a city name, get back coordinates, population, state, country code, and capital status—all in clean JSON.
Perfect for location-based apps, travel platforms, geo-targeting systems, or any application that needs city data.
❓ Why use it?
1. Free Plan
100 queries per month. Free. No credit card required.
2. Affordable Pricing
When you need more, our paid plans cost less than alternatives:
- $16 gets you 3K queries/month
- $48 gets you 15K queries/month
- $148 gets you 75K queries/month
3. 99.99% Uptime SLA
Location data demands reliability.
We maintain a 99.99% uptime SLA.
❓ How to use it?
Simple REST API. Here's how it works:
-
Sign up on Omkar Cloud by visiting this link.

-
Visit the API Key Page.
-
Copy your API key.

-
Make a request with it:
cURL:
curl -X GET "https://city-api.omkar.cloud/city?name=New%20York" \
-H "API-Key: YOUR_API_KEY"Python:
import requests
city_name = "New York"
api_key = "YOUR_API_KEY"
response = requests.get(
"https://city-api.omkar.cloud/city",
params={"name": city_name},
headers={"API-Key": api_key}
)
print(response.json())JavaScript (Node.js axios):
import axios from "axios";
const cityName = "New York";
const apiKey = "YOUR_API_KEY";
const response = await axios.get("https://city-api.omkar.cloud/city", {
params: { name: cityName },
headers: { "API-Key": apiKey }
});
console.log(response.data);- Get structured city data and use it.
That's it. City name to location data in milliseconds.
API Reference
Endpoint
GET https://city-api.omkar.cloud/city
Parameters
-
name (optional, string):
The city name. Examples:New York,Los Angeles,Tokyo. -
country_code (optional, string):
Two-letter ISO country code. Use this to disambiguate cities with the same name. Examples:US,JP.
Response
Returns an array of matching cities with full location data:
[
{
"city_name": "New York",
"state": "New York",
"country_code": "US",
"is_capital": false,
"coordinates": {
"latitude": 40.6943,
"longitude": -73.9249
},
"population": 18713220
}
]❓ What data does the API return?
You get:
- City name — The city's name (e.g., "New York")
- State — The state or province (e.g., "New York")
- Country code — Two-letter ISO code (e.g., "US")
- Is capital — Whether it's the country's capital (true/false)
- Coordinates — Latitude and longitude
- Population — City population count
All in structured JSON. Ready to use in your app.
❓ How accurate is the data?
Data comes from authoritative geographic databases and is regularly updated.
Coordinates are precise to the city center. Population figures reflect the most recent available census data.
❓ What cities are covered?
The API covers cities worldwide—major metropolitan areas and smaller cities across all continents.
❓ Can I filter by country?
Yes. Use the country_code parameter.
Searching for "London" returns results from multiple countries. Add country_code=GB to get only London, UK.
curl -X GET "https://city-api.omkar.cloud/city?name=London&country_code=GB" \
-H "API-Key: YOUR_API_KEY"❓ Tell me about Omkar Cloud.
We're an API services company with 20+ tools for OCR, document processing, and developer APIs. Some things we are proud of:
- We built Botasaurus, an open-source Python framework with 3.7K+ GitHub stars
- Sponsored by 1000+ developers on GitHub
❓ How much does it cost?
- Free — $0 — 100 queries/month
- Starter — $16 — 3,000 queries/month
- Grow — $48 — 15,000 queries/month
- Scale — $148 — 75,000 queries/month
Why we're affordable: Low overhead. We run lean and pass the savings to you.
Note: You get 100 free queries every month.
❓ How do I get a refund?
If the product doesn't meet your needs within 90 days, get a refund in 2 clicks.
-
Go to Transactions Page

-
Click "Request Refund"

-
Confirm by clicking Request Refund again. The amount will be refunded within 1-2 business days. We'll email you updates.

No emails. No explanations. Simple 2-click process.
❓ Is there a catch in refunds?
No catch.
It's a simple 2-click process, exactly as described above.
Questions? We have answers.
Reach out anytime. We will solve your query within 1 working day.

