staticdata.dev
Menu
Datasets About Contact

US States

A complete reference list of all 50 US states, the District of Columbia, and the five inhabited US territories (American Samoa, Guam, Northern Mariana Islands, Puerto Rico, and the U.S. Virgin Islands). Each record includes the USPS 2-letter postal abbreviation, the capital city, the year of statehood (null for DC and territories), and a type discriminator to distinguish states from the district and territories.

v1.0.0 MIT 56 records Updated 2026-10-05 stable Source:  U.S. Census Bureau — State and Territory Reference, USPS Official Abbreviations

Quick fetch

Stable URL. CORS-enabled. No auth.

bash
curl https://staticdata.dev/v1/us-states.json

Or use as a typed import: import { usStates } from "https://staticdata.dev/v1/us-states.ts"

Formats

  • JSON 7.0 KB

    /v1/us-states.json

    Open

    min: 5.0 KB · /v1/us-states.min.json

  • CSV 1.9 KB

    /v1/us-states.csv

    Open
  • TypeScript 7.1 KB

    /v1/us-states.ts

    export const usStates

    type UsState = (typeof usStates)[number]

    Open

Schema

Each record in the dataset has the following shape.

Schema
Field Type Description Example
code string USPS 2-letter postal abbreviation CA
name string Full official name California
capital string Capital city name Sacramento
statehoodYear number | null Year admitted to the union; null for DC and territories 1850
type string Entity type: state, district, or territory state

Preview

First 10 records.

Data preview
codenamecapitalstatehoodYeartype
ALAlabamaMontgomery1819state
AKAlaskaJuneau1959state
AZArizonaPhoenix1912state
ARArkansasLittle Rock1836state
CACaliforniaSacramento1850state
COColoradoDenver1876state
CTConnecticutHartford1788state
DEDelawareDover1787state
FLFloridaTallahassee1845state
GAGeorgiaAtlanta1788state

Showing 10 of 56. View full data:  JSON · CSV

Fetch examples

Drop-in snippets in five languages.

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

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

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

print(usStates[0])
Go
package main

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

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

Sources and methodology

The dataset covers all 56 standard USPS-coded entities: the 50 states, the District of Columbia, and the five permanently inhabited unincorporated territories (American Samoa, Guam, the Northern Mariana Islands, Puerto Rico, and the U.S. Virgin Islands). Minor outlying islands (Baker, Howland, Jarvis, Johnston Atoll, Kingman Reef, Midway, Navassa, Palmyra, Wake) are excluded as they have no permanent civilian population and no dedicated USPS codes in common developer use.

Postal codes follow the official USPS two-letter abbreviations. Statehood years reflect the date each state was formally admitted to the Union; the original 13 states use the year of their Constitutional ratification. DC was established as the seat of government in 1790 but is not a state, hence statehoodYear: null. The five territories were acquired or organized at various points between 1898 and 1978 but have not been admitted as states, so they also carry null.

Records are sorted alphabetically by name, with DC and territories following the 50 states. Use the code field as a stable key — it will not change as long as USPS maintains these designations.

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

Related datasets

More Geo datasets