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.
Quick fetch
Stable URL. CORS-enabled. No auth.
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
min: 5.0 KB · /v1/us-states.min.json
- CSV 1.9 KB
/v1/us-states.csv
- TypeScript 7.1 KB
/v1/us-states.ts
export const usStates
type UsState = (typeof usStates)[number]
Schema
Each record in the dataset has the following shape.
| 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.
| code | name | capital | statehoodYear | type |
|---|---|---|---|---|
| AL | Alabama | Montgomery | 1819 | state |
| AK | Alaska | Juneau | 1959 | state |
| AZ | Arizona | Phoenix | 1912 | state |
| AR | Arkansas | Little Rock | 1836 | state |
| CA | California | Sacramento | 1850 | state |
| CO | Colorado | Denver | 1876 | state |
| CT | Connecticut | Hartford | 1788 | state |
| DE | Delaware | Dover | 1787 | state |
| FL | Florida | Tallahassee | 1845 | state |
| GA | Georgia | Atlanta | 1788 | state |
Fetch examples
Drop-in snippets in five languages.
curl -sSL https://staticdata.dev/v1/us-states.json | jq '.[0]' 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]); 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]) 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])
} 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.