SkillAgentSearch skills...

Countries

World countries in JSON, YAML, CSV and XML. Any help is welcome!

Install / Use

/learn @mledoze/Countries
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

World countries in JSON, CSV, XML and YAML.

License Build Status

Latest Stable Version npm downloads

Latest Stable Version PHP from Packagist Packagist downloads

Countries data

This repository contains a list of world countries, as defined by ISO Standard 3166-1, in JSON, CSV, XML and YAML. Warning: not all entities in this project are independent countries; refer to the independent property to know if the country is considered a sovereign state.

Each line contains the country:

  • name
    • common - common name in english
    • official - official name in english
    • native - list of all native names
      • key: three-letter ISO 639-3 language code
      • value: name object
        • key: official - official name translation
        • key: common - common name translation
  • country code top-level domain (tld)
  • code ISO 3166-1 alpha-2 (cca2)
  • code ISO 3166-1 numeric (ccn3)
  • code ISO 3166-1 alpha-3 (cca3)
  • code International Olympic Committee (cioc)
  • ISO 3166-1 independence status (independent) (denotes the country is considered a sovereign state)
  • ISO 3166-1 assignment status (status)
  • UN Member status (unMember)
  • UN Regional Group (unRegionalGroup)
  • currencies - list of all currencies
    • key: ISO 4217 currency code
    • value: currency object
      • key: name name of the currency
      • key: symbol symbol of the currency
  • International Direct Dialing info (idd)
    • root - the root geographical code prefix. e.g. +6 for New Zealand, +4 for UK.
    • suffixes - list of all suffixes assigned to this country. 4 for NZ, 809, 829, and 849 for Dominican Republic.
  • capital city(ies) (capital)
  • alternative spellings (altSpellings)
  • region
  • subregion
  • list of official languages (languages)
    • key: three-letter ISO 639-3 language code
    • value: name of the language in english
  • list of name translations (translations)
    • key: three-letter ISO 639-3 language code
    • value: name object
      • key: official - official name translation
      • key: common - common name translation
  • latitude and longitude (latlng)
  • demonyms - name of residents, translated & genderized
    • key: three-letter ISO 639-3 language code
    • value: genderized demonym object
      • key: f (female) or m (male)
      • value: genderized demonym translation
  • landlocked status (landlocked)
  • land borders (borders)
  • land area in km² (area)
  • emoji flag (flag)
  • calling codes (callingCodes)

Additional data

The data folder contains additional data such as the countries GeoJSON outlines and flags in SVG format.

Examples

JSON

{
	"name": {
		"common": "Austria",
		"official": "Republic of Austria",
		"native": {
			"bar": {
				"official": "Republik Österreich",
				"common": "Österreich"
			}
		}
	},
	"tld": [".at"],
	"cca2": "AT",
	"ccn3": "040",
	"cca3": "AUT",
	"cioc": "AUT",
	"independent": true,
	"status": "officially-assigned",
	"unMember": true,
	"unRegionalGroup": "Western European and Others Group",
	"currencies": {"EUR": {"name": "Euro", "symbol": "\u20ac"}},
	"idd": {
		"root": "+4",
		"suffixes": ["3"]
	},
	"capital": ["Vienna"],
	"altSpellings": ["AT", "Osterreich", "Oesterreich"],
	"region": "Europe",
	"subregion": "Western Europe",
	"languages": {
		"bar": "Austro-Bavarian German"
	},
	"translations": {
		"cym": {"official": "Republic of Austria", "common": "Awstria"},
		"deu": {"official": "Republik Österreich", "common": "Österreich"},
		"fra": {"official": "République d'Autriche", "common": "Autriche"},
		"hrv": {"official": "Republika Austrija", "common": "Austrija"},
		"ita": {"official": "Repubblica d'Austria", "common": "Austria"},
		"jpn": {"official": "オーストリア共和国", "common": "オーストリア"},
		"nld": {"official": "Republiek Oostenrijk", "common": "Oostenrijk"},
		"por": {"official": "República da Áustria", "common": "Áustria"},
		"rus": {"official": "Австрийская Республика", "common": "Австрия"},
		"spa": {"official": "República de Austria", "common": "Austria"}
	},
	"latlng": [47.33333333, 13.33333333],
	"demonyms": {
		"fra": {
			"f": "Autrichienne",
			"m": "Autrichien"
		},
		"spa": {
			"f": "Austriaco",
			"m": "Austriaca"
		}
	},
	"landlocked": true,
	"borders": ["CZE", "DEU", "HUN", "ITA", "LIE", "SVK", "SVN", "CHE"],
	"area": 83871,
	"callingCodes": ["+43"]
	"flag": "\ud83c\udde6\ud83c\uddf9"
}

GeoJSON and TopoJSON outlines

See an example for Germany: GeoJSON or TopoJSON.

CSV

"name.common","name.official","tld","cca2","ccn3","cca3","cioc","independent","status","unMember","currencies","idd.root","idd.suffixes","capital","altSpellings","region","subregion","languages","translations.ces.official","translations.ces.common","translations.deu.official","translations.deu.common","translations.est.official","translations.est.common","translations.fin.official","translations.fin.common","translations.fra.official","translations.fra.common","translations.hrv.official","translations.hrv.common","translations.hun.official","translations.hun.common","translations.ita.official","translations.ita.common","translations.jpn.official","translations.jpn.common","translations.kor.official","translations.kor.common","translations.nld.official","translations.nld.common","translations.per.official","translations.per.common","translations.pol.official","translations.pol.common","translations.por.official","translations.por.common","translations.rus.official","translations.rus.common","translations.slk.official","translations.slk.common","translations.spa.official","translations.spa.common","translations.swe.official","translations.swe.common","translations.urd.official","translations.urd.common","translations.zho.official","translations.zho.common","latlng","landlocked","borders","area","flag","demonyms.eng.f","demonyms.eng.m","demonyms.fra.f","demonyms.fra.m","callingCodes"
"Aruba","Aruba",".aw","AW","533","ABW","ARU","0","officially-assigned","0","AWG","+2","97","Oranjestad","AW","Americas","Caribbean","Dutch,Papiamento","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","アルバ","アルバ","아루바","아루바","Aruba","Aruba","آروبا","آروبا","Aruba","Aruba","Aruba","Aruba","Аруба","Аруба","Aruba","Aruba","Aruba","Aruba","Aruba","Aruba","اروبا","اروبا","阿鲁巴","阿鲁巴","12.5,-69.96666666","0","","180","🇦🇼","Aruban","Aruban","Arubaise","Arubais","+297"
"Afghanistan","Islamic Republic of Afghanistan",".af","AF","004","AFG","AFG","1","officially-assigned","1","AFN","+9","3","Kabul","AF,Afġānistān","Asia","Southern Asia","Dari,Pashto,Turkmen","Afghánská islámská republika","Afghánistán","Islamische Republik Afghanistan","Afghanistan","Afganistani Islamivabariik","Afganistan","Afganistanin islamilainen tasavalta","Afganistan","République islamique d'Afghanistan","Afghanistan","Islamska Republika Afganistan","Afganistan","Afganisztáni Iszlám Köztársaság","Afganisztán","Repubblica islamica dell'Afghanistan","Afghanistan","アフガニスタン・イスラム共和国","アフガニスタン","아프가니스탄 이슬람 공화국","아프가니스탄","Islamitische Republiek Afghanistan","Afghanistan","جمهوری اسلامی افغانستان","افغانستان","Islamska Republika Afganistanu","Afganistan","República Islâmica do Afeganistão","Afeganistão","Исламская Республика Афганистан","Афганистан","Afgánsky islamský štát","Afganistan","República Islámica de Afganistán","Afganistán","Islamiska republiken Afghanistan","Afghanistan","اسلامی جمہوریہ افغانستان","افغانستان","阿富汗伊斯兰共和国","阿富汗","33,65","1","IRN,PAK,TKM,UZB,TJK,CHN","652230","🇦🇫","Afghan","Afghan","Afghane","Afghan","+93"
"Angola","Republic of Angola",".ao","AO","024","AGO","ANG","1","officially-assigned","1","AOA","+2","44","Luanda","AO,República de Angola,ʁɛpublika de an'ɡɔla","Africa","Middle Africa","Portuguese","Angolská republika","Angola","Republik Angola","Angola","Angola Vabariik","Angola","Angolan tasavalta","Angola","République d'Angola","Angola","Republika Angola","Angola","Angola","Angola","Repubblica dell'Angola","Angola","アンゴラ共和国","アンゴラ","앙골라 공화국","앙골라","Republiek Angola","Angola","جمهوری آنگولا","آنگولا","Republika Angoli","Angola","República de Angola","Angola","Республика Ангола","Ангола","Angolská republika","Angola","República de Angola","Angola","Republiken Angola","Angola","جمہوریہ انگولہ","انگولہ","安哥拉共和国","安哥拉","-12.5,18.5","0","COG,COD,ZMB,NAM","1246700","🇦🇴","Angolan","Angolan","Angolaise","Angolais","+244"
⋮

XML

<?xml version="1.0" encoding="UTF-8"?>
<countries>
  <country name.common="Aruba" name.official="Aruba" name.native.nld.official="Aruba" name.native.nld.common="Aruba" name.native.pap.official="Aruba" name.native.pap.common="Aruba" tld=".aw" cca2="AW" ccn3="533" cca3="ABW" cioc="ARU" independent="0" status="officially-assigned" unMember="0" currencies.AWG.name="Aruba

Related Skills

View on GitHub
GitHub Stars6.2k
CategoryDevelopment
Updated10d ago
Forks1.3k

Languages

PHP

Security Score

100/100

Audited on Mar 17, 2026

No findings