staticdata.dev
Menu
Datasets About Contact

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.

bash
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

    Open

    min: 63.8 KB 路 /v1/countries.min.json

  • CSV 24.8 KB

    /v1/countries.csv

    Open
  • TypeScript 88.0 KB

    /v1/countries.ts

    export const countries

    type Country = (typeof countries)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
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.

Data preview
alpha2alpha3numericnameofficialNamecapital
ADAND020AndorraPrincipality of AndorraAndorra la Vella
AEARE784United Arab EmiratesUnited Arab EmiratesAbu Dhabi
AFAFG004AfghanistanIslamic Republic of AfghanistanKabul
AGATG028Antigua and BarbudaAntigua and BarbudaSaint John's
AIAIA660AnguillaAnguillaThe Valley
ALALB008AlbaniaRepublic of AlbaniaTirana
AMARM051ArmeniaRepublic of ArmeniaYerevan
AOAGO024AngolaRepublic of AngolaLuanda
AQATA010AntarcticaAntarctica
ARARG032ArgentinaArgentine RepublicBuenos Aires

Showing 10 of 249. View full data:  JSON 路 CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/countries.json | jq '.[0]'
JavaScript
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]);
Python
import urllib.request, json

with urllib.request.urlopen("https://staticdata.dev/v1/countries.min.json") as r:
    countries = json.load(r)

print(countries[0])
Go
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])
}
Rust
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.

Related datasets

More Geo datasets