A comprehensive, community-maintained dataset of countries, states, counties, cities, and postcodes — published in 12 formats and free under the Open Database License (attribution required).
Total Regions : 6
Total Sub Regions : 22
Total Countries : 250
Total States/Regions/Municipalities : 5,299
Total Cities/Towns/Districts : 153,765
Total Postcodes : 725993 (116 countries)
Total Timezones : 427 (100% IANA coverage)
Last Updated On: October 19, 2026
The two managed products below are the fastest path to shipping. They're actively maintained, billed for sustainability, and back the rest of the ecosystem.
Query countries, states, cities, and postcodes from any language. Free tier for prototyping; paid tiers for production.
curl https://api.countrystatecity.in/v1/countries/IN/states/MH/cities \
-H "X-CSCAPI-KEY: $YOUR_API_KEY"Python applications can use the official sync and async client:
pip install countrystatecity-api
export CSC_API_KEY="YOUR_API_KEY"from countrystatecity import CountryStateCity
with CountryStateCity() as client:
states = client.get_states_of_country("IN")
print([state["name"] for state in states[:3]])Get a free API key → · Compare plans · Documentation · Interactive playground · OpenAPI spec · Status
Build tailored datasets in your browser — pick country, region, format, and field selection, then download.
NPM (JavaScript / TypeScript)
| Package | GitHub | NPM |
|---|---|---|
@countrystatecity/countries |
GitHub | npmjs.com |
@countrystatecity/countries-browser |
GitHub | npmjs.com |
@countrystatecity/currencies |
GitHub | npmjs.com |
@countrystatecity/timezones |
GitHub | npmjs.com |
@countrystatecity/translations |
GitHub | npmjs.com |
@countrystatecity/cli |
GitHub | npmjs.com |
PyPI (Python)
Use countrystatecity-api for live, managed data. The suffixed packages are versioned offline snapshots.


