staticdata.dev
Menu
Datasets About Contact

Country Subdivisions (ISO 3166-2)

5 046 ISO 3166-2 subdivision codes for the 200 countries that have them, each with its official ISO code (e.g. US-CA), name, parent country alpha-2 code, and subdivision type (State, Province, Region, District, etc.). Use it for address forms, geographic filtering, analytics dashboards, and any application that needs a typed list of the world's administrative divisions.

v1.0.0 MIT 5,046 records Updated 2026-10-05 stable Source:  ISO 3166-2 (ISO Online Browsing Platform), Debian iso-codes (iso_3166-2.json)

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
curl https://staticdata.dev/v1/country-subdivisions.json

Or use as a typed import: import { countrySubdivisions } from "https://staticdata.dev/v1/country-subdivisions.ts"

Formats

  • JSON 505.1 KB

    /v1/country-subdivisions.json

    Open

    min: 357.3 KB · /v1/country-subdivisions.min.json

  • CSV 160.3 KB

    /v1/country-subdivisions.csv

    Open
  • TypeScript 505.4 KB

    /v1/country-subdivisions.ts

    export const countrySubdivisions

    type Subdivision = (typeof countrySubdivisions)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
Field Type Description Example
code string ISO 3166-2 subdivision code (country-subdivision format) US-CA
name string Subdivision name as given by ISO (official romanised form) California
country string ISO 3166-1 alpha-2 code of the parent country US
type string Subdivision type (State, Province, Region, District, etc.) State

Preview

First 10 records.

Data preview
codenamecountrytype
AD-02CanilloADParish
AD-03EncampADParish
AD-04La MassanaADParish
AD-05OrdinoADParish
AD-06Sant Julià de LòriaADParish
AD-07Andorra la VellaADParish
AD-08Escaldes-EngordanyADParish
AE-AJ‘AjmānAEEmirate
AE-AZAbū Z̧abyAEEmirate
AE-DUDubayyAEEmirate

Showing 10 of 5,046. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

curl
curl -sSL https://staticdata.dev/v1/country-subdivisions.json | jq '.[0]'
JavaScript
import type { Subdivision } from "https://staticdata.dev/v1/country-subdivisions.ts";

const res = await fetch("https://staticdata.dev/v1/country-subdivisions.min.json");
if (!res.ok) throw new Error(`Fetch failed: ${res.status}`);
const countrySubdivisions: Subdivision[] = await res.json();
console.log(countrySubdivisions[0]);
Python
import urllib.request, json

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

print(countrySubdivisions[0])
Go
package main

import (
	"encoding/json"
	"fmt"
	"net/http"
)

func main() {
	resp, err := http.Get("https://staticdata.dev/v1/country-subdivisions.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/country-subdivisions.min.json").call()?.into_string()?;
    let data: Vec<Value> = serde_json::from_str(&body)?;
    println!("{:?}", data.first());
    Ok(())
}

Sources and methodology

The dataset is generated from the iso_3166-2.json file of the Debian iso-codes project, which tracks the changes published by the ISO 3166 Maintenance Agency (last synchronised in October 2025; current as of October 2026). It contains 5 046 subdivision codes for the 200 countries that have ISO 3166-2 entries. Each record carries the official hyphenated code (country alpha-2 + subdivision identifier), the subdivision name, the parent country’s ISO 3166-1 alpha-2 code, and the subdivision type.

ISO 3166-2 lists subdivisions at more than one level for some countries, and this dataset includes every listed level: for example France has both regions (FR-ARA) and departments (FR-01), and the United Kingdom has nations, counties, council areas and districts. Dependent territories that ISO codes as subdivisions of their parent also appear here (for example US-PR Puerto Rico, FR-971 Guadeloupe); territories that only have an ISO 3166-1 code and no subdivisions (Anguilla, Gibraltar, Åland and so on) have no records.

The type field reflects the ISO 3166-2 category for each subdivision — common values include State, Province, Region, District, Department, Municipality, County, Governorate, and Prefecture, among others. Names use the official romanised form given by ISO (in the local language, e.g. Bayern rather than “Bavaria”); where ISO lists several official-language names, the first is used.

Records are sorted alphabetically by subdivision code for deterministic diffs. Country codes follow ISO 3166-1 alpha-2, matching the alpha2 field in the companion countries dataset. Subdivision codes do change over time as countries reorganise (ISO publishes several change notices per year), so treat codes that are not in the current list as historical.

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 country-subdivisions changelog for this dataset's history.

Related datasets

More Geo datasets