List states and territories #
GET
/api/v1/states
All 50 states, the District of Columbia and Puerto Rico, in map order.
Parameters
-
updated_sinceinteger query -
Only records changed after this release number was built.
-
pageinteger query -
Page number, from 1.
-
per_pageinteger query -
Records per page. Values above 500 are lowered to 500.
Returns
-
dataarray of StateShow 13 child fieldsHide child fields
-
codestring -
fipsstring -
namestring -
jurisdictionstring -
county_equivalent_countinteger -
county_termstring -
county_typesobject or null -
land_area_sq_minumber or null -
water_area_sq_minumber or null -
populationinteger or null -
population_yearinteger or null -
population_sourcestring or null -
websitestring or null
-
-
metaPageMetaShow 5 child fieldsHide child fields
-
releaseinteger -
pageinteger -
per_pageinteger -
totalinteger -
last_pageinteger
-
-
linksPageLinksShow 5 child fieldsHide child fields
-
selfstring -
firststring -
prevstring or null -
nextstring or null -
laststring
-
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
"https://opendatamaps.com/api/v1/states" \
--data-urlencode "per_page=2"// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/states?per_page=2");
const body = await response.json();import requests
response = requests.get(
"https://opendatamaps.com/api/v1/states",
params={"per_page": 2},
# headers={"X-Api-Key": "YOUR_API_KEY"}, # for higher limits (optional)
timeout=30,
)
response.raise_for_status()
body = response.json()use Illuminate\Support\Facades\Http;
// For higher limits (optional): Http::withHeaders(['X-Api-Key' => 'YOUR_API_KEY'])->get(…)
$response = Http::get('https://opendatamaps.com/api/v1/states', ['per_page' => 2]);
$body = $response->json();200 OK A page of records.
{
"data": [
{
"code": "AL",
"fips": "01",
"name": "Alabama",
"jurisdiction": "state",
"county_equivalent_count": 67,
"county_term": "counties",
"county_types": {
"County": 67
},
"land_area_sq_mi": 50651.5999999999985448084771633148193359375,
"water_area_sq_mi": 1768.40000000000009094947017729282379150390625,
"population": 5193088,
"population_year": 2025,
"population_source": "census-popest-v2025",
"website": "https://al.gov"
},
{
"code": "AK",
"fips": "02",
"name": "Alaska",
"jurisdiction": "state",
"county_equivalent_count": 30,
"county_term": "boroughs and census areas",
"county_types": {
"Borough": 13,
"Census Area": 11,
"City and Borough": 4,
"Municipality": 2
},
"land_area_sq_mi": 571409.099999999976716935634613037109375,
"water_area_sq_mi": 94315.800000000002910383045673370361328125,
"population": 737270,
"population_year": 2025,
"population_source": "census-popest-v2025",
"website": "https://ak.gov"
}
],
"meta": {
"release": 14,
"page": 1,
"per_page": 2,
"total": 52,
"last_page": 26
},
"links": {
"self": "https://opendatamaps.com/api/v1/states?per_page=2&page=1",
"first": "https://opendatamaps.com/api/v1/states?per_page=2&page=1",
"prev": null,
"next": "https://opendatamaps.com/api/v1/states?per_page=2&page=2",
"last": "https://opendatamaps.com/api/v1/states?per_page=2&page=26"
}
}
X-OpenData-Release | integer Number of the release the answer was read from. |
|---|---|
X-RateLimit-Limit | string Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan. |
X-RateLimit-Remaining | integer Requests left in that window. With both a per-minute and a per-day limit, it describes whichever has fewer left. |
401 Unauthorized The API key is unknown, revoked or not activated.
{
"message": "The API key is not valid. It may have been revoked or never activated."
}
422 Unprocessable Content A parameter is invalid.
{
"message": "The page field must be at least 1.",
"errors": {
"page": [
"The page field must be at least 1."
]
}
}
429 Too Many Requests The plan's per-minute or per-day limit is used up. Retry-After says when to retry.
{
"message": "Too Many Attempts."
}
Retry-After | integer Seconds to wait before trying again. |
|---|---|
X-RateLimit-Reset | integer When the limit resets, as a Unix timestamp. |
503 Service Unavailable No release is live yet. Retry-After says when to retry.
{
"message": "No release is live yet. Try again shortly."
}
Retry-After | integer Seconds to wait before trying again. |
|---|