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.
Quick fetch
Stable URL. CORS-enabled. No auth.
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
min: 357.3 KB · /v1/country-subdivisions.min.json
- CSV 160.3 KB
/v1/country-subdivisions.csv
- TypeScript 505.4 KB
/v1/country-subdivisions.ts
export const countrySubdivisions
type Subdivision = (typeof countrySubdivisions)[number]
Schema
Each record in the dataset has the following shape.
| 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.
| code | name | country | type |
|---|---|---|---|
| AD-02 | Canillo | AD | Parish |
| AD-03 | Encamp | AD | Parish |
| AD-04 | La Massana | AD | Parish |
| AD-05 | Ordino | AD | Parish |
| AD-06 | Sant Julià de Lòria | AD | Parish |
| AD-07 | Andorra la Vella | AD | Parish |
| AD-08 | Escaldes-Engordany | AD | Parish |
| AE-AJ | ‘Ajmān | AE | Emirate |
| AE-AZ | Abū Z̧aby | AE | Emirate |
| AE-DU | Dubayy | AE | Emirate |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/country-subdivisions.json | jq '.[0]' 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]); 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]) 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])
} 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.