← Docs

State API

A state or province by code or name. Capital, tax, area codes, timezones.

Look up a state or province by code or name. /state/colorado and /state/texas resolve on their own. CA matches 12 states, so pass ?country=. ISO2, ISO3, and names all work. Accents optional.

Lookup

GET
api.parseapi.com/state/{code}
State or province by code or name. ?country= when it collides
curl "https://api.parseapi.com/state/colorado" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "state": "CO",
  "name": "Colorado",
  "local_name": "Colorado",
  "type": "state",
  "country": "US",
  "country_name": "United States",
  "latitude": 38.725178,
  "longitude": -105.607716,
  "population": 5957493,
  "area": 269837,
  "timezone": "America/Denver",
  "timezones": [
    "America/Denver"
  ],
  "iso_3166_2": "US-CO",
  "fips": "08",
  "capital": "Denver",
  "area_codes": [
    "303",
    "719",
    "720",
    "970"
  ],
  "tax": "Sales tax",
  "tax_rate": 2.9
}

Response fields

state
State or province code
name
Name
local_name
Local-language name
type
State, province, etc.
country
ISO2 country code
country_name
Country name
latitude
Centroid latitude
longitude
Centroid longitude
population
Population estimate
area
Total area in km²
timezone
Primary timezone (most-populated zone)
timezones
Every IANA timezone in the state
iso_3166_2
ISO 3166-2 code (US-CO)
fips
US Census FIPS code. Null outside the US
capital
Capital or seat of government
area_codes
Telephone area codes (NANP countries)
tax
Standard sales tax name (Sales tax, HST). Null when the state levies none
tax_rate
Standard sales tax rate, percent

Districts / counties in a state

Counties, parishes, boroughs, and the like under that state. Useful for finer address forms.

GET
api.parseapi.com/state/{code}/districts
Districts and counties in a state
curl "https://api.parseapi.com/state/nc/districts?country=US" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "state": "NC",
  "state_name": "North Carolina",
  "country": "US",
  "country_name": "United States",
  "districts": [
    {
      "district": "37119",
      "name": "Mecklenburg",
      "type": "county"
    },
    {
      "district": "37063",
      "name": "Durham",
      "type": "county"
    },
    // ... 98 more
  ]
}

Response fields

state
State or province code
state_name
State or province name
country
ISO2 country code
country_name
Country name
districts
Every district in the state
districts[].district
District code
districts[].name
District name
districts[].type
County, department, etc.

Questions? Email