← Docs

State API

A state or province by code or name, with timezones.

Look up a state or province by code or name. /state/colorado and /state/texas resolve on their own. CA is shared across countries, so pass ?country=US for California. 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
Explore
Parameters 5
formatstring · query · optional

json by default. geojson returns simplified administrative Polygon/MultiPolygon outlines with country-qualified IDs and selected facts in properties. Coordinates are longitude first. Missing or ambiguous outlines retain null geometry. Unavailable boundary storage returns 503. Collections retain parent context. Existing Deep access and pooled allowance apply. API 2.0.0 only.

Default: json

Values: json, geojson

codestring · path · required

State or province code or name (NC, colorado, ontario)

countrystring · query · optional

ISO2, ISO3, or a country name. Optional when the code or name is globally unique. A collision 404s asking for it.

langstring · query · optional

Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.

Length: 2 to 64 characters

deepboolean · query · optional

Population, area and tax references. Core includes State identifiers, area codes and capital. Included on paid plans.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

Run this Deep example with a paid-plan key. Deep is included in the pooled request, with no separate lookup charge.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.state("BY", { country: "DE", deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "state": "BY",
  "iso_subdivision": "DE-BY",
  "fips": null,
  "name": "Bavaria",
  "name_local": "Bayern",
  "type": "land",
  "country": "DE",
  "country_name": "Germany",
  "latitude": 48.946756,
  "longitude": 11.403872,
  "timezones": [
    "Europe/Berlin"
  ],
  "capital": {
    "name": "Munich",
    "latitude": null,
    "longitude": null
  },
  "area_codes": null,
  "deep": {
    "population": 13435062,
    "area": 70551
  }
}

Response fields

statestring
State or province code
iso_subdivisionstring or null
ISO 3166-2 code (US-CO)
fipsstring or null
US Census FIPS code. Null outside the US
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
timezonesarray or null
Every IANA timezone in the state
capitalobject
Capital city, matching Country’s name, latitude and longitude shape
capital.namestring or null
Capital or seat of government name
capital.latitudenumber or null
Capital latitude; null while only the name is recorded
capital.longitudenumber or null
Capital longitude; null while only the name is recorded
area_codesarray or null
Telephone area codes (NANP countries)

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
Explore
Parameters 5
formatstring · query · optional

json by default. geojson returns simplified administrative Polygon/MultiPolygon outlines with country-qualified IDs and selected facts in properties. Coordinates are longitude first. Missing or ambiguous outlines retain null geometry. Unavailable boundary storage returns 503. Collections retain parent context. Existing Deep access and pooled allowance apply. API 2.0.0 only.

Default: json

Values: json, geojson

codestring · path · required

State / province code or name

countrystring · query · optional

ISO2, ISO3, or a country name. Optional when the code is globally unique.

langstring · query · optional

Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.

Length: 2 to 64 characters

deepboolean · query · optional

Population, area and tax references. Core includes State identifiers, area codes and capital. Included on paid plans.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

Run this Deep example with a paid-plan key. Deep is included in the pooled request, with no separate lookup charge.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.state.districts("nc", { country: "US", deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "state": "NC",
  "state_name": "North Carolina",
  "country": "US",
  "country_name": "United States",
  "districts": [
    {
      "district": "37001",
      "name": "Alamance County",
      "type": "county",
      "deep": {
        "population": 183040
      }
    },
    {
      "district": "37003",
      "name": "Alexander County",
      "type": "county",
      "deep": {
        "population": 36693
      }
    },
    {
      "district": "37005",
      "name": "Alleghany County",
      "type": "county",
      "deep": {
        "population": 11379
      }
    },
    {
      "district": "37007",
      "name": "Anson County",
      "type": "county",
      "deep": {
        "population": 22432
      }
    },
    {
      "district": "37009",
      "name": "Ashe County",
      "type": "county",
      "deep": {
        "population": 27266
      }
    },
    {
      "district": "37011",
      "name": "Avery County",
      "type": "county",
      "deep": {
        "population": 17811
      }
    },
    {
      "district": "37013",
      "name": "Beaufort County",
      "type": "county",
      "deep": {
        "population": 44576
      }
    },
    {
      "district": "37015",
      "name": "Bertie County",
      "type": "county",
      "deep": {
        "population": 16939
      }
    },
    {
      "district": "37017",
      "name": "Bladen County",
      "type": "county",
      "deep": {
        "population": 29777
      }
    },
    {
      "district": "37019",
      "name": "Brunswick County",
      "type": "county",
      "deep": {
        "population": 167112
      }
    },
    {
      "district": "37021",
      "name": "Buncombe County",
      "type": "county",
      "deep": {
        "population": 279210
      }
    },
    {
      "district": "37023",
      "name": "Burke County",
      "type": "county",
      "deep": {
        "population": 88545
      }
    },
    {
      "district": "37025",
      "name": "Cabarrus County",
      "type": "county",
      "deep": {
        "population": 244925
      }
    },
    {
      "district": "37027",
      "name": "Caldwell County",
      "type": "county",
      "deep": {
        "population": 80739
      }
    },
    {
      "district": "37029",
      "name": "Camden County",
      "type": "county",
      "deep": {
        "population": 11184
      }
    },
    {
      "district": "37031",
      "name": "Carteret County",
      "type": "county",
      "deep": {
        "population": 70259
      }
    },
    {
      "district": "37033",
      "name": "Caswell County",
      "type": "county",
      "deep": {
        "population": 22363
      }
    },
    {
      "district": "37035",
      "name": "Catawba County",
      "type": "county",
      "deep": {
        "population": 167054
      }
    },
    {
      "district": "37037",
      "name": "Chatham County",
      "type": "county",
      "deep": {
        "population": 83874
      }
    },
    {
      "district": "37039",
      "name": "Cherokee County",
      "type": "county",
      "deep": {
        "population": 30373
      }
    },
    {
      "district": "37041",
      "name": "Chowan County",
      "type": "county",
      "deep": {
        "population": 13891
      }
    },
    {
      "district": "37043",
      "name": "Clay County",
      "type": "county",
      "deep": {
        "population": 12042
      }
    },
    {
      "district": "37045",
      "name": "Cleveland County",
      "type": "county",
      "deep": {
        "population": 102194
      }
    },
    {
      "district": "37047",
      "name": "Columbus County",
      "type": "county",
      "deep": {
        "population": 50054
      }
    },
    {
      "district": "37049",
      "name": "Craven County",
      "type": "county",
      "deep": {
        "population": 104167
      }
    },
    {
      "district": "37051",
      "name": "Cumberland County",
      "type": "county",
      "deep": {
        "population": 338430
      }
    },
    {
      "district": "37053",
      "name": "Currituck County",
      "type": "county",
      "deep": {
        "population": 32278
      }
    },
    {
      "district": "37055",
      "name": "Dare County",
      "type": "county",
      "deep": {
        "population": 38183
      }
    },
    {
      "district": "37057",
      "name": "Davidson County",
      "type": "county",
      "deep": {
        "population": 177809
      }
    },
    {
      "district": "37059",
      "name": "Davie County",
      "type": "county",
      "deep": {
        "population": 45383
      }
    },
    {
      "district": "37061",
      "name": "Duplin County",
      "type": "county",
      "deep": {
        "population": 50539
      }
    },
    {
      "district": "37063",
      "name": "Durham County",
      "type": "county",
      "deep": {
        "population": 343628
      }
    },
    {
      "district": "37065",
      "name": "Edgecombe County",
      "type": "county",
      "deep": {
        "population": 49124
      }
    },
    {
      "district": "37067",
      "name": "Forsyth County",
      "type": "county",
      "deep": {
        "population": 398143
      }
    },
    {
      "district": "37069",
      "name": "Franklin County",
      "type": "county",
      "deep": {
        "population": 79771
      }
    },
    {
      "district": "37071",
      "name": "Gaston County",
      "type": "county",
      "deep": {
        "population": 242010
      }
    },
    {
      "district": "37073",
      "name": "Gates County",
      "type": "county",
      "deep": {
        "population": 10299
      }
    },
    {
      "district": "37075",
      "name": "Graham County",
      "type": "county",
      "deep": {
        "population": 8179
      }
    },
    {
      "district": "37077",
      "name": "Granville County",
      "type": "county",
      "deep": {
        "population": 61544
      }
    },
    {
      "district": "37079",
      "name": "Greene County",
      "type": "county",
      "deep": {
        "population": 20671
      }
    },
    {
      "district": "37081",
      "name": "Guilford County",
      "type": "county",
      "deep": {
        "population": 558816
      }
    },
    {
      "district": "37083",
      "name": "Halifax County",
      "type": "county",
      "deep": {
        "population": 46992
      }
    },
    {
      "district": "37085",
      "name": "Harnett County",
      "type": "county",
      "deep": {
        "population": 146096
      }
    },
    {
      "district": "37087",
      "name": "Haywood County",
      "type": "county",
      "deep": {
        "population": 63048
      }
    },
    {
      "district": "37089",
      "name": "Henderson County",
      "type": "county",
      "deep": {
        "population": 120771
      }
    },
    {
      "district": "37091",
      "name": "Hertford County",
      "type": "county",
      "deep": {
        "population": 19169
      }
    },
    {
      "district": "37093",
      "name": "Hoke County",
      "type": "county",
      "deep": {
        "population": 55382
      }
    },
    {
      "district": "37095",
      "name": "Hyde County",
      "type": "county",
      "deep": {
        "population": 4583
      }
    },
    {
      "district": "37097",
      "name": "Iredell County",
      "type": "county",
      "deep": {
        "population": 206361
      }
    },
    {
      "district": "37099",
      "name": "Jackson County",
      "type": "county",
      "deep": {
        "population": 45281
      }
    },
    {
      "district": "37101",
      "name": "Johnston County",
      "type": "county",
      "deep": {
        "population": 249794
      }
    },
    {
      "district": "37103",
      "name": "Jones County",
      "type": "county",
      "deep": {
        "population": 9462
      }
    },
    {
      "district": "37105",
      "name": "Lee County",
      "type": "county",
      "deep": {
        "population": 68537
      }
    },
    {
      "district": "37107",
      "name": "Lenoir County",
      "type": "county",
      "deep": {
        "population": 55332
      }
    },
    {
      "district": "37109",
      "name": "Lincoln County",
      "type": "county",
      "deep": {
        "population": 97611
      }
    },
    {
      "district": "37113",
      "name": "Macon County",
      "type": "county",
      "deep": {
        "population": 38717
      }
    },
    {
      "district": "37115",
      "name": "Madison County",
      "type": "county",
      "deep": {
        "population": 22352
      }
    },
    {
      "district": "37117",
      "name": "Martin County",
      "type": "county",
      "deep": {
        "population": 21523
      }
    },
    {
      "district": "37111",
      "name": "McDowell County",
      "type": "county",
      "deep": {
        "population": 45269
      }
    },
    {
      "district": "37119",
      "name": "Mecklenburg County",
      "type": "county",
      "deep": {
        "population": 1206285
      }
    },
    {
      "district": "37121",
      "name": "Mitchell County",
      "type": "county",
      "deep": {
        "population": 15030
      }
    },
    {
      "district": "37123",
      "name": "Montgomery County",
      "type": "county",
      "deep": {
        "population": 26364
      }
    },
    {
      "district": "37125",
      "name": "Moore County",
      "type": "county",
      "deep": {
        "population": 108417
      }
    },
    {
      "district": "37127",
      "name": "Nash County",
      "type": "county",
      "deep": {
        "population": 97990
      }
    },
    {
      "district": "37129",
      "name": "New Hanover County",
      "type": "county",
      "deep": {
        "population": 243333
      }
    },
    {
      "district": "37131",
      "name": "Northampton County",
      "type": "county",
      "deep": {
        "population": 16580
      }
    },
    {
      "district": "37133",
      "name": "Onslow County",
      "type": "county",
      "deep": {
        "population": 212954
      }
    },
    {
      "district": "37135",
      "name": "Orange County",
      "type": "county",
      "deep": {
        "population": 152877
      }
    },
    {
      "district": "37137",
      "name": "Pamlico County",
      "type": "county",
      "deep": {
        "population": 12550
      }
    },
    {
      "district": "37139",
      "name": "Pasquotank County",
      "type": "county",
      "deep": {
        "population": 41418
      }
    },
    {
      "district": "37141",
      "name": "Pender County",
      "type": "county",
      "deep": {
        "population": 70077
      }
    },
    {
      "district": "37143",
      "name": "Perquimans County",
      "type": "county",
      "deep": {
        "population": 13460
      }
    },
    {
      "district": "37145",
      "name": "Person County",
      "type": "county",
      "deep": {
        "population": 40143
      }
    },
    {
      "district": "37147",
      "name": "Pitt County",
      "type": "county",
      "deep": {
        "population": 180783
      }
    },
    {
      "district": "37149",
      "name": "Polk County",
      "type": "county",
      "deep": {
        "population": 20320
      }
    },
    {
      "district": "37151",
      "name": "Randolph County",
      "type": "county",
      "deep": {
        "population": 148389
      }
    },
    {
      "district": "37153",
      "name": "Richmond County",
      "type": "county",
      "deep": {
        "population": 41990
      }
    },
    {
      "district": "37155",
      "name": "Robeson County",
      "type": "county",
      "deep": {
        "population": 118624
      }
    },
    {
      "district": "37157",
      "name": "Rockingham County",
      "type": "county",
      "deep": {
        "population": 93517
      }
    },
    {
      "district": "37159",
      "name": "Rowan County",
      "type": "county",
      "deep": {
        "population": 153384
      }
    },
    {
      "district": "37161",
      "name": "Rutherford County",
      "type": "county",
      "deep": {
        "population": 65587
      }
    },
    {
      "district": "37163",
      "name": "Sampson County",
      "type": "county",
      "deep": {
        "population": 60404
      }
    },
    {
      "district": "37165",
      "name": "Scotland County",
      "type": "county",
      "deep": {
        "population": 33898
      }
    },
    {
      "district": "37167",
      "name": "Stanly County",
      "type": "county",
      "deep": {
        "population": 67326
      }
    },
    {
      "district": "37169",
      "name": "Stokes County",
      "type": "county",
      "deep": {
        "population": 45857
      }
    },
    {
      "district": "37171",
      "name": "Surry County",
      "type": "county",
      "deep": {
        "population": 71547
      }
    },
    {
      "district": "37173",
      "name": "Swain County",
      "type": "county",
      "deep": {
        "population": 13945
      }
    },
    {
      "district": "37175",
      "name": "Transylvania County",
      "type": "county",
      "deep": {
        "population": 34103
      }
    },
    {
      "district": "37177",
      "name": "Tyrrell County",
      "type": "county",
      "deep": {
        "population": 3517
      }
    },
    {
      "district": "37179",
      "name": "Union County",
      "type": "county",
      "deep": {
        "population": 263386
      }
    },
    {
      "district": "37181",
      "name": "Vance County",
      "type": "county",
      "deep": {
        "population": 42337
      }
    },
    {
      "district": "37183",
      "name": "Wake County",
      "type": "county",
      "deep": {
        "population": 1232444
      }
    },
    {
      "district": "37185",
      "name": "Warren County",
      "type": "county",
      "deep": {
        "population": 19081
      }
    },
    {
      "district": "37187",
      "name": "Washington County",
      "type": "county",
      "deep": {
        "population": 10654
      }
    },
    {
      "district": "37189",
      "name": "Watauga County",
      "type": "county",
      "deep": {
        "population": 54997
      }
    },
    {
      "district": "37191",
      "name": "Wayne County",
      "type": "county",
      "deep": {
        "population": 120338
      }
    },
    {
      "district": "37193",
      "name": "Wilkes County",
      "type": "county",
      "deep": {
        "population": 66186
      }
    },
    {
      "district": "37195",
      "name": "Wilson County",
      "type": "county",
      "deep": {
        "population": 79958
      }
    },
    {
      "district": "37197",
      "name": "Yadkin County",
      "type": "county",
      "deep": {
        "population": 37995
      }
    },
    {
      "district": "37199",
      "name": "Yancey County",
      "type": "county",
      "deep": {
        "population": 18993
      }
    }
  ]
}

Response fields

statestring
State or province code
state_namestring or null
State or province name
countrystring or null
ISO2 country code
country_namestring or null
Country name
districtsarray
Every district in the state
districts[].districtstring or null
District code
districts[].namestring or null
District name
districts[].typestring or null
County, department, etc.

GeoJSON state and province outlines

Add format=geojson on API 2.0.0 for a simplified Polygon or MultiPolygon Feature. Its stable id combines the country and state code, such as US-CO. The same selected facts and requested Deep profile stay in properties. Coordinates use WGS84 [longitude, latitude].

Choose a place to load its outline.Drag to pan · + / - to zoom
State GeoJSON · HTTP
curl "https://api.parseapi.com/state/CO?country=US&format=geojson" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Parse-Version: 2.0.0"

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

curl "https://api.parseapi.com/state/CO?country=US&format=geojson" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Parse-Version: 2.0.0"

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "type": "Feature",
  "id": "US-CO",
  "geometry": {
    "type": "Polygon",
    "coordinates": [
      [
        [
          -102.04,
          36.99
        ],
        [
          -102.05,
          41
        ],
        [
          -109.05,
          41
        ],
        [
          -109.05,
          37
        ],
        [
          -102.04,
          36.99
        ]
      ]
    ]
  },
  "properties": {
    "state": "CO",
    "iso_subdivision": "US-CO",
    "fips": null,
    "name": "Colorado",
    "name_local": null,
    "type": "state",
    "country": "US",
    "country_name": "United States",
    "latitude": 38.725178,
    "longitude": -105.607716,
    "timezones": [
      "America/Denver"
    ],
    "area_codes": null,
    "capital": {
      "name": null,
      "latitude": null,
      "longitude": null
    }
  }
}

/country/US/states?format=geojson returns a FeatureCollection in the existing list order. Parent country context stays on the collection and in each Feature's properties. Collection facts remain the same as the ordinary list. Outline collections are larger than ordinary JSON.

Coverage varies by place. An exact outline that is missing or ambiguous stays geometry: null, even when center coordinates are known. Small islands and holes may be omitted from the simplified display outline. Unavailable boundary storage returns HTTP 503. These are administrative areas. District does not provide electoral constituencies. Outlines do not establish legal borders or survey measurements.

Omit format or use format=json for the ordinary response. Existing paid Deep access and pooled request allowances apply. Use HTTP for GeoJSON. Published SDK and MCP methods retain ordinary JSON. API 1.0.0 is unchanged.

Deep

?deep=true Population, area and tax references. Core includes State identifiers, area codes and capital. Included on paid plans.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

Run this Deep example with a paid-plan key. Deep is included in the pooled request, with no separate lookup charge.

import { parseAPI } from '@parseapi/sdk';

const parse = parseAPI("YOUR_API_KEY");
const result = await parse.state("BY", { country: "DE", deep: true });
console.log(result);

Run on your server with a secret key. Calling from a browser or app?

Example response
{
  "state": "BY",
  "iso_subdivision": "DE-BY",
  "fips": null,
  "name": "Bavaria",
  "name_local": "Bayern",
  "type": "land",
  "country": "DE",
  "country_name": "Germany",
  "latitude": 48.946756,
  "longitude": 11.403872,
  "timezones": [
    "Europe/Berlin"
  ],
  "capital": {
    "name": "Munich",
    "latitude": null,
    "longitude": null
  },
  "area_codes": null,
  "deep": {
    "population": 13435062,
    "area": 70551
  }
}

Deep fields

deep.populationinteger or null
Population estimate
deep.areanumber or null
Total area in km²
deep.tax.namestring 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. Choose this geographic reference for state or province tasks

Display language

Pass lang with a language tag such as fr, pt-BR, or zh-Hant. Existing country_name and separately sourced state or district names when available.

Omitting lang preserves the original response. Codes, IDs, numeric facts and native-name fields stay unchanged. Missing translations keep their existing source value; unknown values stay null. A preserved name_local may equal the translated name.

Send a chosen browser preference explicitly, for example { lang: navigator.language } in your JavaScript SDK options. The API does not read Accept-Language automatically. Unsupported regions fall back to their supported base language; unsupported languages or scripts use English. Empty, invalid or repeated tags return 400.

Content-Language identifies languages used in translated display fields and known English fallbacks. This option follows the current API contract. Requests selecting frozen 1.0.0 retain that contract. Select API 2.0.0 to use display language.

33 display language choices
Language tagLanguage
enEnglish
arالعربية
cacatalà
hrhrvatski
csčeština
dadansk
nlNederlands
fisuomi
frfrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
humagyar
idIndonesia
ititaliano
ja日本語
ko한국어
msMelayu
nbnorsk bokmål
plpolski
ptportuguês
roromână
ruрусский
zh-Hans简体中文
skslovenčina
esespañol
svsvenska
thไทย
zh-Hant繁體中文
trTürkçe
ukукраїнська
viTiếng Việt

Questions? Email