Countries, Languages & Continents data (capital and currency, native name, calling codes).
Countries, Languages & Continents data (capital and currency, native name, calling codes).
Continents & countries: ISO 3166-1 alpha-2 code (with alpha-2 to alpha-3 set), name, ISO 639-1 languages, capital, ISO 4217 currencies (with symbols & numeric codes), native name, calling codes. Lists are available in JSON, CSV and SQL formats. Also, contains separate JSON files with additional country Emoji flags data.
Version 3 comes with some data structure changes. It was completely reworked under the hood with TypeScript, ESM exports and a Bun workspaces monorepo structure.
Everything is strongly typed so you can easily use data with auto-complete in your IDE.
Note: If your projects depend on the old structure, carefully specify required versions in your dependencies.
Package is available via:
bun add countries-listnpm install countries-listcomposer require annexare/countries-listModule exports continents, countries, languages and utility functions.
…Built files are in the dist directory of this repository, and packages/countries directory contains source data.
Note: JS build contains ES modules, CommonJS and IIFE (for now)
cjs/index.jsmjs/index.jsindex.iife.jsFull ISO 4217 currency data — English and native name, UI symbol, native symbol, 3-digit numeric code and minor-unit decimals — is an opt-in import via the countries-list/currencies subpath, so it does not affect the main bundle size:
…The dataset covers the complete active ISO 4217 list plus a few withdrawn codes still referenced by country data (e.g. ANG, flagged with withdrawn: true). symbol falls back to the ISO code where a currency has no distinct Latin glyph (e.g. CHF, KWD); the local glyph is then in symbolNative. Symbols come from Unicode CLDR (ISO 4217 itself defines no symbols).
…Everything is generated from strongly typed files in packages/countries/src, including SQL file.
Everything in dist is generated,
so please make data related changes ONLY to files from packages/countries, commit them.
Use bun run build / bun run test to build/test generated files.
The currencies dataset (packages/countries/src/data/currencies.ts) is generated from the official ISO 4217 list and Unicode CLDR via packages/scripts/generateCurrencies.ts. Refresh it with cd packages/scripts && bun run generate:currencies (requires network) when ISO 4217 publishes an update, rather than editing the data by hand.
Prepared by Annexare Studio from different public sources. Feel free to use it as you need in your apps or send updates into this public repository. It's under MIT license.
No open issues yet, or sync has not completed.