City API

150,000+ cities and settlements, linked by location.

Cities, towns and settlements linked to countries and states. Community returns basic city fields; richer fields, nearby search and autocomplete are available on eligible paid plans.

150,000+ cities and settlements
JSON responses
3,000 free requests / mo

Coverage varies by release. Check the API statistics and database releases for current data. Read the ODbL-1.0 licence before using the database.

Request200 OK
curl --location 'https://api.countrystatecity.in/v1/countries/IN/states/MH/cities' \
  --header 'X-CSCAPI-KEY: YOUR_API_KEY'
Community response excerpt
[
  {
    "id": 133024,
    "name": "Mumbai",
    "kind": "settlement"
  }
]

Endpoints

These endpoints are served from https://api.countrystatecity.in/v1 and require your key in the X-CSCAPI-KEY header. Availability depends on your plan.

GET/countries/{ciso}/citiesEvery city in a country
GET/countries/{ciso}/states/{siso}/citiesCities within one state
GET/search/autocompleteType-ahead for a location picker
GET/search/nearbyCities near a latitude and longitude
GET/timezone/{ciso}/{siso}/{city_id}Timezone for a given city

Available fields for city records.

Fields depend on your plan and may be missing or null. On eligible plans, select fields with ?fields=. Compare plan access.

idStable numeric identifier
nameEnglish name
nativeName in the local script
kindsettlement, county or administrative unit
typecity, town, village and so on
levelDepth in the official hierarchy
parent_idContaining division, where one exists
state_idParent state id
state_codeParent state code
country_idParent country id
country_codeParent country ISO2
latitudePoint latitude
longitudePoint longitude
timezoneIANA zone
populationWhen available; may be null
translationsName in other languages
wikiDataIdWikidata item

What people build with it.

  • The third dropdown in an address form, or a type-ahead that replaces all three.
  • Showing the right local time for a user without asking them to pick a timezone.
  • Finding the nearest serviceable city to a dropped pin, through /search/nearby.
  • Seeding a store locator or coverage map with real coordinates rather than geocoding every row.
Build a React location dropdown with the browser package →

Questions.

How many cities does the API cover?

150,000+ cities and settlements across 250 countries and territories. Coverage varies by release. Parent links help identify places with the same name; returned fields depend on your plan.

Is there an autocomplete endpoint?

GET /search/autocomplete returns ranked suggestions across countries, states and cities. It is available on Supporter and higher plans; basic city-list endpoints are also available on Community.

Do cities come with coordinates and timezones?

Coordinates and IANA timezones are included when populated and available on your plan. Some values may be missing or null; Community city responses contain basic fields rather than coordinates.

Can I find cities near a point?

On Supporter and higher plans, GET /search/nearby accepts coordinates and a radius and returns matching places ordered by distance. Check the endpoint documentation for accepted parameters and limits.

Free up to 3,000 requests a month.

Paid plans from $5 add higher limits. Supporter adds fuzzy search; Professional adds GraphQL and the change feed.