GET /state/{code} · /{code}/districts
State API
Pass colorado, texas, or ontario. The state, country, and timezones.
Try it
{
"state": "CO",
"name": "Colorado",
"type": "state",
"country": "US",
"country_name": "United States",
"latitude": 38.725178,
"longitude": -105.607716,
"timezone": "America/Denver",
"America/Denver"
],
"iso_3166_2": "US-CO",
?deep=true
}1M requests · $20/mo. Get started
What comes back.
name
Name
type
State, province, etc.
deep.capital
Capital or seat of government
timezones
Every IANA timezone in the state
deep.area_codes
Telephone area codes (NANP countries)
deep.tax
State or province levy name (Sales tax, HST, GST + PST). Null when unavailable or no levy is named
deep.tax_rate
State or province reference rate in percent. May already include national tax; do not add the country rate
deep.fips
US Census FIPS code. Null outside the US
districts
Every district in the state
1
Pass a code or the name
/state/colorado and /state/texas resolve on their own. CA needs ?country=US.
2
Get the facts
Name, type, country, coordinates, and timezones. Paid deep adds the capital, statistics, area codes, and tax references.
3
List districts
Districts hang off the state path.
Make your first request.
One key works across the APIs. Copy a request in your language and get JSON back.
curl "https://api.parseapi.com/state/BY?country=DE" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Parse-Version: 2.0.0"// Example response · 200
{
"state": "BY",
"name": "Bavaria",
"name_local": "Bayern",
"type": "land",
"country": "DE",
"country_name": "Germany",
"latitude": 48.946756,
"longitude": 11.403872,
"timezone": "Europe/Berlin",
"timezones": ["Europe/Berlin"],
"iso_3166_2": "DE-BY"
}API referenceSDKsKeys and authentication
Every response field
Response fields
- statestring
- State or province code
- namestring or null
- Name
- name_localstring or null
- Local-language name, null when absent or identical to name
- typestring or null
- State, province, etc.
- countrystring or null
- ISO2 country code
- country_namestring or null
- Country name
- latitudenumber or null
- Centroid latitude
- longitudenumber or null
- Centroid longitude
- timezonestring or null
- Primary timezone (most-populated zone)
- timezonesarray or null
- Every IANA timezone in the state
- iso_3166_2string or null
- ISO 3166-2 code (US-CO)
Deep fields
- deep.populationinteger or null
- Population estimate
- deep.population_periodstring or null
- Observation year or multi-year period for this population estimate (YYYY or YYYY-YYYY). Null when the record has no verified period or population. Never the import date.
- deep.areanumber or null
- Total area in km²
- deep.fipsstring or null
- US Census FIPS code. Null outside the US
- deep.capitalstring or null
- Capital or seat of government
- deep.area_codesarray or null
- Telephone area codes (NANP countries)
- deep.taxstring or null
- State or province levy name (Sales tax, HST, GST + PST). Null when unavailable or no levy is named
- deep.tax_ratenumber or null
- State or province reference rate in percent. May already include national tax; do not add the country rate
QUESTIONS
- When do I use which?
- A code or name for the state record. /districts for every district or county in it.
- Do I need a country?
- Not when the code or name is unique. colorado and texas resolve on their own. CA matches 12 states, so pass ?country=US. Country takes ISO2, ISO3, or a name.
- What comes back?
- Name, type, country, coordinates, timezones, and subdivision code. Paid deep adds population, area, capital, area codes, FIPS, and tax references.
- What is type?
- The kind of division. State, province, prefecture, oblast.
- How do I list every state in a country?
- GET /country/{code}/states.
- How do I list districts?
- GET /state/{code}/districts returns district names, codes, and types. Add deep=true on a paid plan for population inside each district detail bag.
All 50 two-letter codes plus DC and territories in the abbreviations list.