API requests served · live

Every city, stacked. One request away.

The country, state and city API and open database: 250+ countries, 5,300+ states and 152,900+ cities, used by 50,000+ developers.

99.9% uptime SLA
<200ms p95
ODbL-1.0 open data
World
Isometric world map in columns; column height is the number of cities per grid cell
250+ countries
World
curl "https://api.countrystatecity.in/v1/countries" \
  -H "X-CSCAPI-KEY: $API_KEY"
200 OK84ms · 250 results
[
  { "id": 101, "name": "India", "iso2": "IN" },
  { "id": 102, "name": "Indonesia", "iso2": "ID" },
  …
]
The data

Clean, linked records, from region down to city.

Every city knows its state and country. Every country carries ISO codes, currency, phone code, timezones and translations. Updated frequently by the community.

JSONCSVParquetMySQLPostgreSQLSQLiteSQL ServerMongoDBXMLYAMLGeoJSONTOON
countries
states and regions
cities
50,000+
developersstatic
In production

What developers build with it.

Country → state → city in onboarding
“Outstanding job on this API! The worldwide country, state, and city data is exactly what our PalGo app needed.”
Johan WalhoutDeveloper · PalGoAPI
Location for tax at checkout
“Thanks for putting together such a comprehensive location service! The tax calculation features based on user location have been essential for our payment processing.”
Mo KakwanBlabberizeAPI
Multi-country address forms
“The comprehensive state and city data makes it easy for users across different countries to fill out location information accurately.”
Cedric BorreguínDeveloperDatabase
International darts league
“The comprehensive global data has been perfect for our international darts league platform.”
Bendicht EggimannDeveloperAPI
Prayer times by location
“The location-based prayer timing functionality works perfectly with the comprehensive country, state, and city data.”
OmairDeveloperAPI
Address step in card checkout
“Excellent job with this API! The credit card processing integration with location data has been seamless and reliable.”
Douglas HuertasPayvmsAPI
Validating x509 certificate fields
“This export tool has been wonderful for our x509 certificate validation processes!”
Mike LettonaUserExport Tool
Universal address form for a client
“Thanks a lot for this database, this is awesome!”
Hiren ChauhanDeveloperDatabase
Municipalities across countries
“Your data is very complete and useful.”
GabrielDeveloper · HaydukDatabase
Location input in forms
“I'm using your data in other project and it's working just fine. Thanks!”
Guille AcostaDeveloperAPI
Cascading profile dropdowns
“The dropdown functionality for country, state, and city selection works flawlessly in our user profile system.”
Manish RajDeveloperAPI
Student address collection
“This API is really a big help, this is exactly what I was searching for.”
Vishal RanaStudent · NIT RourkelaAPI

Free to start. Open forever.

The database is open under ODbL-1.0. The API gives you 3,000 free requests a month; paid plans start at $5 and add search, GraphQL and the change feed.

Found a missing city or a wrong state code? Suggest a fix with the Update Tool; it's reviewed and merged into the next release.
Reviewed in the open · ships monthly