Countries
Every ISO 3166-1 entity with its alpha-2, alpha-3, and numeric codes, plus capital, region, currency code, calling code, official languages, flag emoji, and country-code top-level domain. Use for country pickers, locale routing, fraud-rule geo lookups, and anywhere your code needs a stable identifier for a country.
Quick fetch
Stable URL. CORS-enabled. No auth.
curl https://staticdata.dev/v1/countries.json
Or use as a typed import:
import { countries } from "https://staticdata.dev/v1/countries.ts"
Formats
- JSON 87.8 KB
/v1/countries.json
min: 63.8 KB 路 /v1/countries.min.json
- CSV 24.8 KB
/v1/countries.csv
- TypeScript 88.0 KB
/v1/countries.ts
export const countries
type Country = (typeof countries)[number]
Schema
Each record in the dataset has the following shape.
| Field | Type | Description | Example |
|---|---|---|---|
| alpha2 | string | ISO 3166-1 alpha-2 code | US |
| alpha3 | string | ISO 3166-1 alpha-3 code | USA |
| numeric | string | ISO 3166-1 numeric code (zero-padded) | 840 |
| name | string | English short name | United States |
| officialName | string | Official long-form name | United States of America |
| capital? | string | null | Capital city (null for entities with no defined capital) | Washington, D.C. |
| region | string | UN M.49 region | Americas |
| subregion | string | UN M.49 subregion | Northern America |
| currency? | string | null | ISO 4217 currency code in primary use | USD |
| callingCode | string | Country calling code with leading + | +1 |
| languages | string[] | ISO 639-1 codes of official or de facto languages (ISO 639-2/3 code where no 639-1 code exists, e.g. pap, fil, tet) | ["en"] |
| flag | string | Flag as Unicode regional indicator emoji | 馃嚭馃嚫 |
| tld | string | Country-code top-level domain | .us |
Preview
First 10 records.
| alpha2 | alpha3 | numeric | name | officialName | capital |
|---|---|---|---|---|---|
| AD | AND | 020 | Andorra | Principality of Andorra | Andorra la Vella |
| AE | ARE | 784 | United Arab Emirates | United Arab Emirates | Abu Dhabi |
| AF | AFG | 004 | Afghanistan | Islamic Republic of Afghanistan | Kabul |
| AG | ATG | 028 | Antigua and Barbuda | Antigua and Barbuda | Saint John's |
| AI | AIA | 660 | Anguilla | Anguilla | The Valley |
| AL | ALB | 008 | Albania | Republic of Albania | Tirana |
| AM | ARM | 051 | Armenia | Republic of Armenia | Yerevan |
| AO | AGO | 024 | Angola | Republic of Angola | Luanda |
| AQ | ATA | 010 | Antarctica | Antarctica | |
| AR | ARG | 032 | Argentina | Argentine Republic | Buenos Aires |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/countries.json | jq '.[0]' import type { Country } from "https://staticdata.dev/v1/countries.ts";
const res = await fetch("https://staticdata.dev/v1/countries.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const countries: Country[] = await res.json();
console.log(countries[0]); import urllib.request, json
with urllib.request.urlopen("https://staticdata.dev/v1/countries.min.json") as r:
countries = json.load(r)
print(countries[0]) package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("https://staticdata.dev/v1/countries.min.json")
if err != nil { panic(err) }
defer resp.Body.Close()
var data []map[string]any
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
panic(err)
}
fmt.Println(data[0])
} use serde_json::Value;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let body = ureq::get("https://staticdata.dev/v1/countries.min.json").call()?.into_string()?;
let data: Vec<Value> = serde_json::from_str(&body)?;
println!("{:?}", data.first());
Ok(())
} Sources and methodology
The dataset contains all 249 officially assigned ISO 3166-1 codes as of October 2026: UN member states, observer states (Vatican City, Palestine), Taiwan, and the dependent territories and special areas that have their own codes (R茅union, Svalbard and Jan Mayen, Bouvet Island, and so on). It does not include subnational entities, historical codes, or user-assigned codes such as XK for Kosovo.
Names follow ISO 3166-1 short forms in English. Where a country has changed its name (T眉rkiye, Eswatini, Czechia, Cabo Verde) we use the current ISO name. The officialName is the long-form constitutional name.
Calling codes follow ITU-T E.164. For territories sharing a parent country code we keep the shared code (+1 for the United States and Canada) and disambiguate with extended prefixes only where they are ITU-assigned (+1-787 for Puerto Rico). Where a territory dials through another country鈥檚 code, the area prefix is included the same way (+44-1624 for the Isle of Man). Vatican City is listed as +39: ITU reserves +379 for it, but that code has never been brought into service. Regions and subregions follow the UN M.49 geoscheme; Antarctica, which M.49 does not place in a region, uses Antarctic, and Taiwan is placed in Eastern Asia.
Currencies are the primary ISO 4217 code used domestically as of October 2026 (for example EUR for Bulgaria since 1 January 2026, ZWG for Zimbabwe, XCG for Cura莽ao and Sint Maarten; null where ISO 4217 lists no universal currency); see the currencies dataset for the full mapping including secondary currencies.
The dataset is updated when ISO 3166-1 publishes a change (typically a few times per year). Each update gets a new version field, and the previous version remains live forever under its versioned /v1/ URL.
Versioning
URLs under /v1/ are stable: field names and types will not change in a way
that breaks consumers. Values can be corrected or records added when the upstream source
changes; schema-incompatible updates ship under a new version path. See the
countries changelog for this dataset's history.