Every city, stacked. One request away.
The country, state and city API and open database: 250 countries, 5,300+ states and 150,000+ cities. Use the hosted API or download an offline snapshot.

curl "https://api.countrystatecity.in/v1/countries" \ -H "X-CSCAPI-KEY: $API_KEY"
[
{ "id": 101, "name": "India", "iso2": "IN" },
{ "id": 102, "name": "Indonesia", "iso2": "ID" },
…
]Downloads across the ecosystem.
- npm downloads
- 199,363
- 10 official packages · 30 days12 Oct 2026 – 10 Nov 2026
- Updated npm downloads API ↗
- PyPI downloads
- 17,941
- 8 official packages · 30 days12 Oct 2026 – 10 Nov 2026
- Updated PyPI Stats · known mirrors excluded ↗
- GitHub release downloads
- 66,091
- Lifetime · published data-file assets
- Updated GitHub database releases ↗
Sources and counting method
Downloads count file transfers, including repeat installs and automation; they are not unique developers. Package totals use the displayed UTC dates, with a short allowance for reporting lag. GitHub totals include data files from all published database releases, including prereleases, and exclude checksums, notices, migration archives, source archives, Git clones and raw-file traffic. Statistics refresh daily; provider outages retain the last successful values and their update dates. View the counts and package breakdown →
One dataset. Use it however you build.
Same records, same IDs, in every channel. Switch from the API to a package or a file without remapping anything.
Explore the ecosystem →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.
See what each level returns in the Country API, State API and City API guides, or use the data offline with the npm packages. For a working example, follow the React country, state and city dropdown guide.
Coverage varies by release. Check the API statistics and database releases for current data. Read the ODbL-1.0 licence before using the database.
What developers build with it.
“Outstanding job on this API! The worldwide country, state, and city data is exactly what our PalGo app needed.”
“Thanks for putting together such a comprehensive location service! The tax calculation features based on user location have been essential for our payment processing.”
“The comprehensive state and city data makes it easy for users across different countries to fill out location information accurately.”
“The comprehensive global data has been perfect for our international darts league platform.”
“The location-based prayer timing functionality works perfectly with the comprehensive country, state, and city data.”
“Excellent job with this API! The credit card processing integration with location data has been seamless and reliable.”
“This export tool has been wonderful for our x509 certificate validation processes!”
“Thanks a lot for this database, this is awesome!”
“Your data is very complete and useful.”
“I'm using your data in other project and it's working just fine. Thanks!”
“The dropdown functionality for country, state, and city selection works flawlessly in our user profile system.”
“This API is really a big help, this is exactly what I was searching for.”
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.