@countrystatecity monorepo publishes six packages to npm. All data is bundled directly — no API key or network requests needed (except the CLI, which calls the REST API).
Packages
Installation
Install only the packages you need:Use
@countrystatecity/countries in Node.js, Next.js API routes, or Express. Use @countrystatecity/countries-browser in client-side React, Vue, or Svelte apps — it loads data via CDN instead of bundling it.Usage
Countries, States, and Cities
Timezones
Currencies
Translations
ar, br, de, es, fa, fr, hi, hr, it, ja, ko, nl, pl, pt, pt-BR, ru, tr, uk, zh-CN
CLI
Code generation (
csc generate) requires a Supporter plan or above. Run csc upgrade to view plans and pricing.Data Updates
All packages update automatically every week via a CI pipeline that fetches the latest data from the countries-states-cities-database, runs tests, and publishes a patch release to npm. To get the latest data in your project, update the package:Source
GitHub Repository
View the monorepo source, open issues, or contribute.
npm Organization
Browse all published packages on npm.