← Docs

State API

A state or province, by code.

Look up a state or province by code. Country is required because codes aren't unique worldwide. CA is California with country=US, Ontario with country=CA.

Lookup

GET
api.parseapi.com/state/{code}?country={iso2}
State or province by code. ?country= required
curl "https://api.parseapi.com/state/nc?country=US" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "state": "NC",
  "name": "North Carolina",
  "local_name": "North Carolina",
  "type": "state",
  "country": "US",
  "country_name": "United States",
  "latitude": 35.5,
  "longitude": -79.8,
  "population": 10439388,
  "area": 139391,
  "timezone": "America/New_York"
}

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
Land area in km²
timezone
Primary timezone

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?country={iso2}
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[].district
District code
districts[].name
District name
districts[].type
County, department, etc.

Questions? Email