| country-codes | csv | Download | [Local: CSV – JSON ] |
| Field Name | Order | Type (Format) | Description |
|---|---|---|---|
| name | 1 | string | Country's customary English short name (CLDR) |
| official_name_en | 2 | string | Country's official English short name |
| official_name_fr | 3 | string | Country's offical French short name |
| ISO3166-1-Alpha-2 | 4 | string | Alpha-2 codes from ISO 3166-1 |
| ISO3166-1-Alpha-3 | 5 | string | Alpha-3 codes from ISO 3166-1 (synonymous with World Bank Codes) |
| M49 | 6 | number | UN Statistics M49 numeric codes (nearly synonymous with ISO 3166-1 numeric codes, which are based on UN M49. ISO 3166-1 does not include Channel Islands or Sark, for example) |
| ITU | 7 | string | Codes assigned by the International Telecommunications Union |
| MARC | 8 | string | MAchine-Readable Cataloging codes from the Library of Congress |
| WMO | 9 | string | Country abbreviations by the World Meteorological Organization |
| DS | 10 | string | Distinguishing signs of vehicles in international traffic |
| Dial | 11 | string | Country code from ITU-T recommendation E.164, sometimes followed by area code |
| FIFA | 12 | string | Codes assigned by the Fédération Internationale de Football Association |
| FIPS | 13 | string | Codes from the U.S. standard FIPS PUB 10-4 |
| GAUL | 14 | string | Global Administrative Unit Layers from the Food and Agriculture Organization |
| IOC | 15 | string | Codes assigned by the International Olympics Committee |
| ISO4217-currency_alphabetic_code | 16 | string | ISO 4217 currency alphabetic code |
| ISO4217-currency_country_name | 17 | string | ISO 4217 country name |
| ISO4217-currency_minor_unit | 18 | number | ISO 4217 currency number of minor units |
| ISO4217-currency_name | 19 | string | ISO 4217 currency name |
| ISO4217-currency_numeric_code | 20 | number | ISO 4217 currency numeric code |
| is_independent | 21 | string | Country status, based on the CIA World Factbook |
| Capital | 22 | string | Capital city from Geonames |
| Continent | 23 | string | Continent from Geonames |
| TLD | 24 | string | Top level domain from Geonames |
| Languages | 25 | string | Languages from Geonames |
| Geoname ID | 26 | number | Geoname ID |
| EDGAR | 27 | string | EDGAR country code from SEC |
Comprehensive country code information, including ISO 3166 codes, ITU dialing codes, ISO 4217 currency codes, and many others. Provided as a Tabular Data Package.
Data comes from multiple sources as follows:
Customary English short names are from Unicode Common Locale Data Repository (CLDR) Project.
Note: CLDR shorter names "ZZ-alt-short" are used when available
ISO 3166 official English and French short names are from United Nations Statistics Division
ISO 4217 currency codes are from currency-iso.org
Many other country codes are from statoids.com
Special thanks to Gwillim Law for his excellent statoids.com site (some of the field descriptions are excerpted from his site), which is more up-to-date than most similar resources and is much easier to scrape than multiple Wikipedia pages.
Capital cities, languages, continents, TLDs, and geonameid are from geonames.org
EDGAR codes are from sec.gov
This package includes Python scripts to fetch current country information and output a JSON document and CSV of combined country code information.
CSV output is provided via the in2csv and csvcut utilities from csvkit
Install requirements:
pip install -r scripts/requirements.pip
Run GNU Make to generate data file:
make country-codes.csv
This material is licensed by its maintainers under the Public Domain Dedication and License.
Nevertheless, it should be noted that this material is ultimately sourced from ISO and other standards bodies and their rights and licensing policies are somewhat unclear. As this is a short, simple database of facts there is a strong argument that no rights can subsist in this collection. However, ISO state on their site:
ISO makes the list of alpha-2 country codes available for internal use and non-commercial purposes free of charge.
This carries the implication (though not spelled out) that other uses are not permitted and that, therefore, there may be rights preventing further general use and reuse.
If you intended to use these data in a public or commercial product, please check the original sources for any specific restrictions.