One dataset.
Nine ways to use it.
Every channel is built from the same open database, with the same IDs. Start with one, switch or combine later without remapping anything.
Downloads across the ecosystem.
- npm downloads
- 313,934
- 10 official packages · 30 days29 Oct 2026 – 27 Nov 2026
- Updated npm downloads API ↗
- PyPI downloads
- 13,320
- 8 official packages · 30 days29 Oct 2026 – 27 Nov 2026
- Updated PyPI Stats · known mirrors excluded ↗
- GitHub release downloads
- 73,762
- 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. Updates are scheduled daily with catch-up attempts; provider outages retain the last successful values and their update dates. View the counts and package breakdown →
Pick the channel that fits how you work.
Grouped by what you're trying to do. Every channel is kept in sync from one source of truth.
Install it the way you work.
Versioned packages with types included. Data packages use ODbL-1.0; the npm API SDK and CLI use MIT. Check each package before use. Bundled snapshots need no network; countries-browser and geojson load data from a CDN.
Prototype offline. Go live when you ship.
Bundled data packages provide versioned snapshots for prototypes, offline use and local joins. Use the hosted API for its currently served data, search on eligible plans and support. Snapshots and API data can differ by release.
import { getStatesOfCountry, getCitiesOfState }
from '@countrystatecity/countries';
const states = await getStatesOfCountry('IN');
const cities = await getCitiesOfState('IN', 'MH');import { createCSCClient } from '@countrystatecity/sdk';
const csc = createCSCClient({ apiKey: process.env.CSC_API_KEY });
const { data: states } = await csc.states.list({ country: 'IN' });
const hits = await csc.search.fuzzy({ query: 'bangalor', type: 'city' });Community includes the state-list call with 100 requests per day and 3,000 per month; both limits apply. The fuzzy-search call requires Supporter or higher.
Not sure where to start?
Most teams start with the API: 3,000 free requests a month, no card needed.