OpenDataMAPS API reference v1 Release 15
Base URL https://opendatamaps.com/api/v1
Get an API keyGet a key

OpenData API reference

A read-only JSON API for U.S. states, counties, places, government offices, officials and public facilities, with a small write API for partners. Every endpoint is listed here with what it takes, what it returns and a call you can copy.

The whole API is also available as an OpenAPI document (version 1.0.0). To use it in Postman, choose Import, then Link, and paste the OpenAPI URL.

Download OpenAPI

Requests and answers

The public API only reads: its endpoints are all GET, need no key and answer JSON. The partner write API adds POST and PATCH for accounts with a partner token. Browsers can call the API from any site: answers carry Access-Control-Allow-Origin: *.

Licence

The data is released under CC0 1.0: use it for anything, no attribution needed. Each source keeps its own terms, listed by /meta.

Releases

The API answers from the latest published release, not from the live editing database, so a correction shows up once the next release is published. Every answer names its release in meta.release and in the X-OpenData-Release header, and updated_since lists only what changed after a given release.

The live release is number 15.

Base URL
https://opendatamaps.com/api/v1
Your first request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/search" \
  --data-urlencode "q=Alabama" \
  --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/search?q=Alabama&per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/search",
    params={"q": "Alabama", "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/search', ['q' => 'Alabama', 'per_page' => 2]);

$body = $response->json();

Authentication #

No key is needed. Without one you are on the anonymous plan, with the lowest limits. A free key from the pricing page raises them. Send it in one of these places, in order of preference:

Authorization header
Bearer od_…
X-Api-Key header
od_…
key query
?key=od_…

A key in the query string works, but URLs end up in server logs and browser history. Prefer a header, and never put a key in code that runs in a visitor's browser.

A key that is unknown, not yet activated or revoked is refused with 401, never quietly treated as anonymous. The partner write API uses a different credential: an API token issued on the admin profile page.

Sending a key
# In a header (preferred)
curl "https://opendatamaps.com/api/v1/offices?state=DE" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Or in the query string
curl "https://opendatamaps.com/api/v1/offices?state=DE&key=YOUR_API_KEY"
// In a header (preferred)
const response = await fetch("https://opendatamaps.com/api/v1/offices?state=DE", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});

// Or in the query string
await fetch("https://opendatamaps.com/api/v1/offices?state=DE&key=YOUR_API_KEY");
import requests

# In a header (preferred)
requests.get(
    "https://opendatamaps.com/api/v1/offices",
    params={"state": "DE"},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    timeout=30,
)

# Or in the query string
requests.get("https://opendatamaps.com/api/v1/offices", params={"state": "DE", "key": "YOUR_API_KEY"}, timeout=30)
use Illuminate\Support\Facades\Http;

// In a header (preferred)
Http::withToken('YOUR_API_KEY')->get('https://opendatamaps.com/api/v1/offices', ['state' => 'DE']);

// Or in the query string
Http::get('https://opendatamaps.com/api/v1/offices', ['state' => 'DE', 'key' => 'YOUR_API_KEY']);

Rate limits #

Each plan has a per-minute and a per-day limit. Keys are counted per key; anonymous requests are counted per visitor, on a hash of the address that is never stored.

Requests allowed per plan
PlanPer minutePer day
Anonymous 30 1,000
Free 60 5,000
Developer 300 100,000
Business 1,200 2,000,000
Partner Unlimited Unlimited

Headers

X-RateLimit-Limit always
Requests allowed in the current window, normally the minute. unlimited on the partner plan.
X-RateLimit-Remaining limited plans
Requests left in that window. With both a per-minute and a per-day limit, it describes whichever has fewer left.
Retry-After on 429
Seconds to wait before trying again.
X-RateLimit-Reset on 429
When the limit resets, as a Unix timestamp.

Refused (401) and throttled (429) requests do not count towards your daily usage.

429 Too Many Requests
HTTP/1.1 429 Too Many Requests
Retry-After: 42
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1764201600

{
  "message": "Too Many Attempts."
}

Errors #

Errors are JSON with a message in plain words. A 422 also has errors: each invalid parameter with its messages.

Status codes
StatusWhen
401 The key or token is unknown, not activated, expired or revoked.
403 Partner write API only: the token lacks the ability, or its owner the permission, for this operation.
404 No record has that key or code.
422 A parameter or field is invalid, for example page=0 or a search without q.
429 The plan's per-minute or per-day limit is used up. See Retry-After.
503 No release is live yet. Retry-After says when to try again.
422 Error shape
{
  "message": "The page field must be at least 1.",
  "errors": {
    "page": [
      "The page field must be at least 1."
    ]
  }
}

Pagination #

Lists are paged. page starts at 1; per_page is 100 by default and at most 500, and larger values are lowered to 500.

meta object
release, page, per_page, total and last_page.
links object
self, first, prev, next and last. prev and next are null at the ends.

Follow links.next until it is null. Links never carry your key, so send it again with each request.

Every page of a list ends with
{
  "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"
  }
}

Embeds #

Put the live map on your own website or inside your app. The embed builder picks a place, a theme, a size and options with a live preview, and writes the snippet for you.

Three ways to embed #

<opendata-map> recommended
One script and one tag. It reserves its box at once, loads the map when it scrolls into view, can size itself (height="auto") and can be steered from your page's JavaScript.
<iframe>
For site builders and pages that cannot run scripts: https://opendatamaps.com/embed/map with the options below as its query.
Static image
A picture of a view for emails, documents and pages where nothing interactive runs: https://opendatamaps.com/embed/static.
Link
Paste a map, embed, builder or directory link into WordPress, Notion, Medium or Slack: it unfurls into the map through oEmbed.

Embedded maps set no cookies, store nothing about visitors and make no third-party requests. The map's own forms (corrections, claims, saved places) become "Open on OpenData" links in a new tab.

Script embed
<script async src="https://opendatamaps.com/embed.js" data-opendata></script>
<opendata-map key="odpk_…" state="CA" county="06037" theme="population" height="480"></opendata-map>
Iframe
<iframe src="https://opendatamaps.com/embed/map?key=odpk_…&st=CA&co=06037" width="100%" height="480" style="border:0" loading="lazy" allow="fullscreen; geolocation" title="Los Angeles County government offices"></iframe>

Options #

The same names work as iframe query parameters, as <opendata-map> attributes (state, county, place and theme also work for st, co, pl and th) and as an embed key's defaults. Lists are comma-separated. Unknown or invalid values fall back to the default, and nothing you pass is ever shown as HTML. Without a key an embed reads only the place, the theme and the language.

Embed options
OptionValuesDefaultWithout a keyWhat it does
Place
st State — Yes Two-letter state code, such as CA.
co County — Yes Five-digit county GEOID, such as 06037. Its state is implied.
pl Place — Yes Seven-digit place or ten-digit county subdivision GEOID, inside the county.
office Office — Yes An office key, such as gus:123085: the map opens on the office with its details.
center Centre — Yes A free camera instead of a place: latitude,longitude, such as 34.05,-118.24.
zoom 1–12 — Yes With a centre: 1 (the whole country) to 12; each step doubles the scale.
Theme
th standard, population, density, growth, coverage, mayors, contacts standard Yes What the map colours.
Filters
lv federal, state, county, municipality, township, school, hospital, library, fire, district — Needs a key Show only offices of these levels (comma-separated).
ct address, website, email, phone — Needs a key Show only offices with each of these details (comma-separated).
da current, gov, site, pop — Needs a key Data filters (comma-separated).
q Search — Needs a key Start with this search text (120 characters at most).
v map, table map Needs a key Start on the map or on the table (the table needs its control).
Lock
lock none, area, view none Needs a key area: cannot leave the starting state or county. view: no pan or zoom, a live picture.
Controls
controls search, filters, theme, legend, zoom, fullscreen, table, locate search, theme, legend, zoom, fullscreen Needs a key The controls shown (comma-separated), or none.
Look
scheme auto, light, dark auto Needs a key auto follows the visitor’s light or dark setting.
accent Accent colour — Needs a key A six-digit hex colour, such as 0b5fff (with or without #). Business and Partner plans.
radius 0–24 — Needs a key Pixels, 0 to 24.
density comfortable, compact comfortable Needs a key compact makes the controls smaller.
Behaviour
gesture cooperative, greedy cooperative Needs a key cooperative: page scroll passes through and Ctrl + scroll or two fingers zoom the map. greedy: the map takes every gesture.
details panel, popup, none panel Needs a key Where a selected office or area shows its details.
links new-tab, top new-tab Needs a key How “Open on OpenData” and other links open.
Branding
badge 1, 0 1 Needs a key badge=0 hides the badge where the plan allows it. Business and Partner plans.
credit 1, 0 1 Needs a key credit=0 removes the “Data: OpenData” credit on the Partner plan. Partner plan only.
Language
lang en — Yes The embed’s language; by default the visitor’s browser language.

Keys and domains #

An embed key (odpk_…) is publishable: it is safe in page source because it works only on the domains listed for it. It is not your API key (od_…), which is a secret and must never go into a page. Create embed keys, list their domains and set their default options in your account.

example.com
That host, on its default port. example.com:8443 allows only that port.
*.example.com
Any subdomain, not the bare domain. Never on a shared suffix such as *.com or *.github.io.
localhost
Any port, for development; localhost:3000 one port. The same for 127.0.0.1 and [::1].

The map's response carries Content-Security-Policy: frame-ancestors with the key's domains, so browsers refuse to show it anywhere else, and the server checks the Referer too. A key marked "used in an app" works without a website; it is protected by metering, rate limits and rotation instead. A key's defaults sit under the snippet's own options. Pausing or revoking a key takes effect on the next load.

Every refusal (unknown, paused or revoked key, another site, limit reached, embeds switched off) is a small readable notice inside the frame, never a blank box. The script embed reports it as od:error.

403 on another site
HTTP/1.1 403 Forbidden
Content-Security-Policy: frame-ancestors *

This map is not enabled for example.org.

<opendata-map> #

Load https://opendatamaps.com/embed.js (always the current version) or https://opendatamaps.com/embed/v1.js (pinned) from this site. Besides every option above, the element takes:

height
Pixels or a CSS length, or auto to fit the area shown. 480 px by default, at least 240.
width, aspect-ratio
The box's width (the page's width by default) or its shape.
title
The frame's title for screen readers.
loading
eager loads at once instead of near the viewport.
loading-text
The placeholder's words.
lang
The map's language.
markers
Your own markers as a JSON array, at most 64 KB. Needs a key.

Methods

Each returns a promise; calls made before the map is ready wait for it. Embeds without a key can call everything but setFilters.

flyTo({ state, county, place, office })
Show a place or an office.
setTheme(name)
One of the th values.
setFilters({ levels, contacts, data, search })
The lv, ct, da and q filters. Needs a key.
zoomIn(), zoomOut(), zoomTo(level)
Levels 1 to 12.
reset(), getState(), destroy()
Back to the starting view; the current view, theme, selection and filters; remove the map.
addMarkers(list, { fit }), removeMarker(id), clearMarkers(), getMarkers()
Your own markers. Needs a key.

Errors carry a code: locked, not_allowed, invalid, rate_limited, unknown_method, timeout, destroyed or reloaded.

Events

od:ready
The map is drawn; detail is its state.
od:select
{ type, key, name, state, county, place }, or null when the selection is cleared.
od:move
{ state, county, place, view, zoom } once the camera rests.
od:theme
{ theme }.
od:markerclick
{ id, label } when a visitor opens one of your markers.
od:error
{ code, message }; notice with status when a notice stands in for the map.
Steering the map
const map = document.querySelector('opendata-map');

await map.flyTo({ state: 'TX', county: '48201' });
await map.setTheme('population');
await map.setFilters({ levels: ['county'], contacts: ['phone'] });

map.addEventListener('od:select', (event) => {
  console.log(event.detail); // { type, key, name, state, county, place }
});
map.addEventListener('od:error', (event) => console.warn(event.detail));

Your own markers #

Put your own points on the map: your offices, events or projects, each with a label, a colour and popup text. They come from your page (addMarkers, the markers attribute, or the addMarkers command for an iframe or an app) and stay in your visitor's browser: they are never sent to OpenData, stored or counted. Markers need an embed key; each plan allows a number per map (below).

id string
1–64 letters, digits, _ - . :. Optional; an existing id is replaced.
lat, lng required
WGS84 degrees inside the map's frame: the lower-48 box (border areas included) and the Alaska, Hawaii and Puerto Rico insets. There is no land check.
label required
Plain text, up to 80 characters: the marker's name, tooltip and popup title.
popup string
Plain text, up to 500 characters; line breaks are kept. HTML is shown as text, never run.
url string
One http or https link in the popup, opened outside the map as links says.
color string
blue, azure, indigo, purple, pink, red, orange, yellow, lime, green, teal, cyan, gray, dark or #rrggbb. Your accent colour by default.

addMarkers resolves to { added, invalid, dropped, total, fitted }. An entry that breaks a rule is skipped with od:error { code: 'invalid_marker', index, field }; entries past your plan's markers are skipped with { code: 'marker_limit', limit, dropped }. { fit: true } moves the camera to show the markers, unless the map is locked to its view. At most 5,000 entries a call. Markers are not drawn on the static image.

Adding markers
const map = document.querySelector('opendata-map');

const result = await map.addMarkers([
  { id: 'hq', lat: 38.8977, lng: -77.0365, label: 'Our office',
    popup: 'Open 9 to 5, Monday to Friday.', url: 'https://example.com/visit', color: 'red' },
  { id: 'depot', lat: 34.0522, lng: -118.2437, label: 'West depot', color: '#0ca678' },
], { fit: true });
// { added: ['hq', 'depot'], invalid: 0, dropped: 0, total: 2, fitted: true }

map.addEventListener('od:markerclick', (event) => {
  console.log(event.detail); // { id, label }
});
await map.removeMarker('depot');
await map.getMarkers(); // ['hq']

Message protocol #

Under the element, the page and the map talk with postMessage. You only need this to drive an iframe without the script.

  • Every message is { source: 'opendata', v: 1, type, … }: the page sends { type: 'command', id, method, args }; the map answers { type: 'reply', id, ok, result | error } and sends { type: 'event', name, detail }.
  • The map accepts commands only from its parent window and posts only to the parent's origin, never *. Send hello until ready arrives.
  • At most 20 commands at once, then 10 a second. Commands only change the map's view; nothing sent is ever run or shown as HTML.
A command and its reply
{
  "source": "opendata",
  "v": 1,
  "type": "command",
  "id": "1",
  "method": "setTheme",
  "args": { "theme": "density" }
}

{
  "source": "opendata",
  "v": 1,
  "type": "reply",
  "id": "1",
  "ok": true,
  "result": { "theme": "density" }
}

Mobile apps #

Load https://opendatamaps.com/embed/map?key=odpk_… in a WebView with a key marked "used in an app". The map then also sends its events and replies, as JSON strings, to window.webkit.messageHandlers.opendata (iOS), window.OpenDataAndroid (Android) and window.ReactNativeWebView (React Native), and takes commands from window.OpenDataMapBridge.send(json), with the same envelope and checks. There is no native SDK.

An app has no website for the browser to check, so an app key works anywhere it is pasted. Keep an eye on its usage and rotate it if it leaks.

The bridge
// iOS (WKWebView): receive events
config.userContentController.add(handler, name: "opendata")
// Android (WebView): receive events
webView.addJavascriptInterface(bridge, "OpenDataAndroid")
// React Native: <WebView onMessage={…} />

// Send a command from the app
webView.evaluateJavaScript("OpenDataMapBridge.send('{\"source\":\"opendata\",\"v\":1,\"type\":\"command\",\"id\":\"1\",\"method\":\"setTheme\",\"args\":{\"theme\":\"density\"}}')")

Static image #

GET https://opendatamaps.com/embed/static draws the view as an SVG image: the country, a state, a county or a place with the land around it, the population, density or growth colours when that theme is chosen, a title, a legend and the OpenData badge and data credit your plan shows. It takes the same options and key as the map (only the place, theme, camera, scheme and accent change the picture) and works on the same domains.

w, h integer
Width and height in pixels, 200 to 2000, rounded to the nearest 50; 800 × 500 by default.
scheme
light, dark or auto (follows the reader's system; needs a key, like the map's look options).

Images are redrawn for each new data release. Keyless images may be cached for an hour; keyed images are revalidated on every view (private, no-cache with an ETag), so pausing or revoking a key stops its image at once. A keyed image requested without a Referer shows the OpenData badge and data credit whatever the plan. Drawing many new images in a short time answers 429 for a minute; images already drawn are always served. Each image served counts as a static image on the key's usage, apart from map loads, and is served even past the month's map loads: it is what an embed shows once its grace allowance is used. The script embed shows it while the live map loads. PNG is planned for a later release.

Static image
<a href="https://opendatamaps.com/#st=CA&co=06037">
  <img src="https://opendatamaps.com/embed/static?st=CA&co=06037&th=population&w=800&h=450" width="800" height="450" alt="Los Angeles County government offices">
</a>

oEmbed #

GET https://opendatamaps.com/oembed?url=… answers oEmbed JSON of type rich for this site's own addresses. The map page, the embed builder and each embed name it in a <link rel="alternate" type="application/json+oembed">, so most sites find it by themselves.

url required
The map (/, with its view in the # hash), an embed (/embed/map?…), the builder (/developers/embed?…), or a directory page (/us/…, /offices/…). A link to another site answers 404.
maxwidth, maxheight
Caps on the frame, 800 × 480 by default. With only maxwidth the height follows the width.
format
json only; xml answers 501.

A map link carries no key, so its embed shows the place, office and theme. Answers are cached for an hour.

200 OK
{
    "version": "1.0",
    "type": "rich",
    "provider_name": "OpenData",
    "provider_url": "https://opendatamaps.com/",
    "title": "Los Angeles County, California: map of government offices",
    "html": "<iframe src=\"https://opendatamaps.com/embed/map?st=CA&co=06037\" width=\"800\" height=\"480\" style=\"border:0\" loading=\"lazy\" allow=\"fullscreen; geolocation\" title=\"\u2026\"></iframe>",
    "width": 800,
    "height": 480,
    "cache_age": 3600
}

Limits and branding #

Embeds are measured in map loads: a load is counted each time the map page is served to a browser (including a browser re-checking a map it has cached), with at most 30 counted per visitor per hour. Panning, zooming and changing the theme cost nothing, and previews in the builder are not counted. At 80% and 100% of the month's loads the key's owner gets an email; past 100% the map keeps working with a "limit reached" badge for a grace allowance, then shows its static image with a link to the full map until the month rolls over. There is never a blank box or a surprise bill.

Embed allowances per plan
PlanMap loads a monthEmbed keysDomains per keyCustomer markers per mapBrandingOwn accent colourScript API
No key 1,000 per site — — None OpenData badge and link No Place and theme only
Free 5,000 1 2 25 OpenData badge and link No Every method and event
Developer 50,000 5 10 250 Small “Data: OpenData” credit No Every method and event
Business 500,000 25 Unlimited 2,500 Badge can be hidden; data credit stays Yes Every method and event
Partner As agreed As agreed Unlimited Unlimited White-label, data credit removable Yes Every method and event

Geography #

States and territories, counties and county equivalents, and places (incorporated places, census-designated places and county subdivisions).

List states and territories #

GET /api/v1/states

All 50 states, the District of Columbia and Puerto Rico, in map order.

Parameters

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of State
    Show 13 child fieldsHide child fields
    • code string
    • fips string
    • name string
    • jurisdiction string
    • county_equivalent_count integer
    • county_term string
    • county_types object or null
    • land_area_sq_mi number or null
    • water_area_sq_mi number or null
    • population integer or null
    • population_year integer or null
    • population_source string or null
    • website string or null
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# 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();
Response

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"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One state #

GET /api/v1/states/{code}

One state by its two-letter code, in any case.

Parameters

code string path required

Two-letter state code, any case.

Example AL

Returns

  • data State
    Show 13 child fieldsHide child fields
    • code string
    • fips string
    • name string
    • jurisdiction string
    • county_equivalent_count integer
    • county_term string
    • county_types object or null
    • land_area_sq_mi number or null
    • water_area_sq_mi number or null
    • population integer or null
    • population_year integer or null
    • population_source string or null
    • website string or null
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/states/AL"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/states/AL");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/states/AL",
    # 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/AL');

$body = $response->json();
Response

200 OK The record.

{
  "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"
  },
  "meta": {
    "release": 14
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No state matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

List counties #

GET /api/v1/counties

Counties and county equivalents (parishes, boroughs, census areas, independent cities), by GEOID.

Parameters

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of County
    Show 19 child fieldsHide child fields
    • geoid string
    • name string
    • base_name string
    • state_code string
    • county_fips string
    • lsad string or null
    • geographic_type string
    • jurisdiction string
    • government_context string or null
    • latitude number or null
    • longitude number or null
    • land_area_sq_mi number or null
    • water_area_sq_mi number or null
    • population integer or null
    • population_year integer or null
    • county_seat string or null
    • website string or null
    • office_key string or null
    • has_boundary boolean
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/counties" \
  --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/counties?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/counties",
    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/counties', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [
    {
      "geoid": "01001",
      "name": "Autauga County",
      "base_name": "Autauga",
      "state_code": "AL",
      "county_fips": "001",
      "lsad": "06",
      "geographic_type": "County",
      "jurisdiction": "state",
      "government_context": "County. The structure and powers of county government vary by state.",
      "latitude": 32.53223700000000206955519388429820537567138671875,
      "longitude": -86.6464399999999983492671162821352481842041015625,
      "land_area_sq_mi": 594.4550000000000409272615797817707061767578125,
      "water_area_sq_mi": 9.9139999999999997015720509807579219341278076171875,
      "population": 61920,
      "population_year": 2025,
      "county_seat": null,
      "website": "http://www.autaugaco.org/",
      "office_key": "gus:100001",
      "has_boundary": true
    },
    {
      "geoid": "01003",
      "name": "Baldwin County",
      "base_name": "Baldwin",
      "state_code": "AL",
      "county_fips": "003",
      "lsad": "06",
      "geographic_type": "County",
      "jurisdiction": "state",
      "government_context": "County. The structure and powers of county government vary by state.",
      "latitude": 30.659217999999999193505573202855885028839111328125,
      "longitude": -87.7460669999999964829839882440865039825439453125,
      "land_area_sq_mi": 1589.942999999999983629095368087291717529296875,
      "water_area_sq_mi": 437.32999999999998408384271897375583648681640625,
      "population": 267761,
      "population_year": 2025,
      "county_seat": null,
      "website": "http://www.baldwincountyal.gov/",
      "office_key": "gus:160514",
      "has_boundary": true
    }
  ],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 3222,
    "last_page": 1611
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/counties?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/counties?per_page=2&page=1",
    "prev": null,
    "next": "https://opendatamaps.com/api/v1/counties?per_page=2&page=2",
    "last": "https://opendatamaps.com/api/v1/counties?per_page=2&page=1611"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One county #

GET /api/v1/counties/{geoid}

One county by its five-digit GEOID (state FIPS and county FIPS).

Parameters

geoid string path required

Five-digit county GEOID.

Example 01001

Returns

  • data County
    Show 19 child fieldsHide child fields
    • geoid string
    • name string
    • base_name string
    • state_code string
    • county_fips string
    • lsad string or null
    • geographic_type string
    • jurisdiction string
    • government_context string or null
    • latitude number or null
    • longitude number or null
    • land_area_sq_mi number or null
    • water_area_sq_mi number or null
    • population integer or null
    • population_year integer or null
    • county_seat string or null
    • website string or null
    • office_key string or null
    • has_boundary boolean
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/counties/01001"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/counties/01001");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/counties/01001",
    # 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/counties/01001');

$body = $response->json();
Response

200 OK The record.

{
  "data": {
    "geoid": "01001",
    "name": "Autauga County",
    "base_name": "Autauga",
    "state_code": "AL",
    "county_fips": "001",
    "lsad": "06",
    "geographic_type": "County",
    "jurisdiction": "state",
    "government_context": "County. The structure and powers of county government vary by state.",
    "latitude": 32.53223700000000206955519388429820537567138671875,
    "longitude": -86.6464399999999983492671162821352481842041015625,
    "land_area_sq_mi": 594.4550000000000409272615797817707061767578125,
    "water_area_sq_mi": 9.9139999999999997015720509807579219341278076171875,
    "population": 61920,
    "population_year": 2025,
    "county_seat": null,
    "website": "http://www.autaugaco.org/",
    "office_key": "gus:100001",
    "has_boundary": true
  },
  "meta": {
    "release": 14
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No county matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

List places and county subdivisions #

GET /api/v1/places

Incorporated places, census-designated places and county subdivisions. kind is place or subdivision.

Parameters

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

kind string query

Kind of record (office category, place kind or facility kind).

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of Place
    Show 10 child fieldsHide child fields
    • geoid string
    • kind string
    • name string
    • lsad string or null
    • funcstat string or null
    • state_code string or null
    • county_geoid string
    • land_sq_mi number or null
    • latitude number or null
    • longitude number or null
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/places" \
  --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/places?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/places",
    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/places', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [
    {
      "geoid": "0100124",
      "kind": "place",
      "name": "Abbeville city",
      "lsad": "25",
      "funcstat": "A",
      "state_code": "AL",
      "county_geoid": "01067",
      "land_sq_mi": 15.53999999999999914734871708787977695465087890625,
      "latitude": 31.565163999999999333567757275886833667755126953125,
      "longitude": -85.25916499999999587089405395090579986572265625
    },
    {
      "geoid": "0100190171",
      "kind": "subdivision",
      "name": "Autaugaville CCD",
      "lsad": null,
      "funcstat": "S",
      "state_code": "AL",
      "county_geoid": "01001",
      "land_sq_mi": 184.6200000000000045474735088646411895751953125,
      "latitude": 32.457413000000002512024366296827793121337890625,
      "longitude": -86.729003000000005840774974785745143890380859375
    }
  ],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 55765,
    "last_page": 27883
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/places?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/places?per_page=2&page=1",
    "prev": null,
    "next": "https://opendatamaps.com/api/v1/places?per_page=2&page=2",
    "last": "https://opendatamaps.com/api/v1/places?per_page=2&page=27883"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One place #

GET /api/v1/places/{geoid}

One place or county subdivision by its GEOID.

Parameters

geoid string path required

Place GEOID (7 or 10 digits).

Example 0100124

Returns

  • data Place
    Show 10 child fieldsHide child fields
    • geoid string
    • kind string
    • name string
    • lsad string or null
    • funcstat string or null
    • state_code string or null
    • county_geoid string
    • land_sq_mi number or null
    • latitude number or null
    • longitude number or null
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/places/0100124"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/places/0100124");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/places/0100124",
    # 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/places/0100124');

$body = $response->json();
Response

200 OK The record.

{
  "data": {
    "geoid": "0100124",
    "kind": "place",
    "name": "Abbeville city",
    "lsad": "25",
    "funcstat": "A",
    "state_code": "AL",
    "county_geoid": "01067",
    "land_sq_mi": 15.53999999999999914734871708787977695465087890625,
    "latitude": 31.565163999999999333567757275886833667755126953125,
    "longitude": -85.25916499999999587089405395090579986572265625
  },
  "meta": {
    "release": 14
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No place matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

Governments #

Units of government: federal, states, counties, municipalities, townships, special and school districts.

List governments #

GET /api/v1/governments

Units of government, from the federal government down to special and school districts. Each names its parent, so the list can be walked as a tree.

Parameters

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

type string query

Type of government, e.g. county, municipality, special_district.

One of federal state county municipality township special_district school_district tribal national subnational

parent string query

Key of the parent government, e.g. state:10 or county:10001.

country string query

Two-letter ISO 3166 country code, any case, e.g. US. Must be a country in the directory; an unknown or inactive code is a 422.

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of Government
    Show 14 child fieldsHide child fields
    • government_key string
      us, state:{fips}, county:{geoid}, gus:{Census of Governments id}, sd:{special district id} or lea:{NCES LEA id}.
    • name string
    • type string
    • country_code string
      ISO 3166-1 alpha-2, US for every U.S. government.
    • parent_key string or null
      The government above this one: a county, else the state; a state's parent is us.
    • state_code string or null
    • county_geoid string or null
    • place_geoid string or null
    • function string or null
      What a special or school district does, such as Water Supply Utility or School district.
    • population integer or null
    • population_year integer or null
    • website string or null
    • latitude number or null
    • longitude number or null
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/governments" \
  --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/governments?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/governments",
    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/governments', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 0,
    "last_page": 1
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/governments?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/governments?per_page=2&page=1",
    "prev": null,
    "next": null,
    "last": "https://opendatamaps.com/api/v1/governments?per_page=2&page=1"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One government #

GET /api/v1/governments/{key}

One government by its key.

The live release has no record to show here yet, so the example answer is built from the schema. Type a key in Try it to call the API with one of your own.

Parameters

key string path required

Government key.

Returns

  • data Government
    Show 14 child fieldsHide child fields
    • government_key string
      us, state:{fips}, county:{geoid}, gus:{Census of Governments id}, sd:{special district id} or lea:{NCES LEA id}.
    • name string
    • type string
    • country_code string
      ISO 3166-1 alpha-2, US for every U.S. government.
    • parent_key string or null
      The government above this one: a county, else the state; a state's parent is us.
    • state_code string or null
    • county_geoid string or null
    • place_geoid string or null
    • function string or null
      What a special or school district does, such as Water Supply Utility or School district.
    • population integer or null
    • population_year integer or null
    • website string or null
    • latitude number or null
    • longitude number or null
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/governments/GOVERNMENT_KEY"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/governments/GOVERNMENT_KEY");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/governments/GOVERNMENT_KEY",
    # 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/governments/GOVERNMENT_KEY');

$body = $response->json();
Response

200 OK The record.

{
  "data": {
    "government_key": "string",
    "name": "string",
    "type": "string",
    "country_code": "string",
    "parent_key": null,
    "state_code": null,
    "county_geoid": null,
    "place_geoid": null,
    "function": null,
    "population": null,
    "population_year": null,
    "website": null,
    "latitude": null,
    "longitude": null
  },
  "meta": {
    "release": 0
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No government matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

Offices #

Government offices with their contacts: address, phone, email and website.

List government offices #

GET /api/v1/offices

Government offices, from federal agencies to town clerks, with their public contacts.

Parameters

country string query

Two-letter ISO 3166 country code, any case, e.g. US: the country of the office's government (an office without one is in the US). Must be a country in the directory; an unknown or inactive code is a 422.

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

level string query

Level of government, e.g. county, municipal.

kind string query

Kind of record (office category, place kind or facility kind).

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of Office
    Show 24 child fieldsHide child fields
    • office_key string
    • name string
    • short_name string or null
    • level string
    • category string
    • parent string or null
    • state_code string or null
    • county_geoid string or null
    • place_geoid string or null
    • government_key string or null
      The government this record belongs to (see /governments).
    • place_name string or null
    • address string or null
    • phone string or null
    • email string or null
    • website string or null
    • other_websites array of string or null
    • contact_title string or null
    • gov_population integer or null
    • gov_population_year integer or null
    • verification_status string
    • latitude number or null
    • longitude number or null
    • freshness string or null
      The worst status of the record's fields: fresh, aging (past 75% of its window), stale or unknown. Null before the first nightly freshness run.
    • confidence integer or null
      0-99. The lowest confidence of the record's fields: the trust of the source, less a point per month past its freshness window, plus 5 for each agreeing source.
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/offices" \
  --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/offices?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/offices",
    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/offices', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [
    {
      "office_key": "curated:intl:international-monetary-fund",
      "name": "International Monetary Fund",
      "short_name": null,
      "level": "world",
      "category": "International finance",
      "parent": null,
      "state_code": "DC",
      "county_geoid": "11001",
      "place_geoid": null,
      "government_key": null,
      "place_name": null,
      "address": "700 19th Street NW, Washington, DC 20431",
      "phone": null,
      "email": null,
      "website": "https://www.imf.org",
      "other_websites": null,
      "contact_title": null,
      "gov_population": null,
      "gov_population_year": null,
      "verification_status": "curated",
      "latitude": 38.90424300000000101817931863479316234588623046875,
      "longitude": -77.0165240000000039799488149583339691162109375,
      "freshness": "fresh",
      "confidence": 45
    },
    {
      "office_key": "curated:intl:united-nations-headquarters",
      "name": "United Nations Headquarters",
      "short_name": null,
      "level": "world",
      "category": "International organization",
      "parent": null,
      "state_code": "NY",
      "county_geoid": "36061",
      "place_geoid": null,
      "government_key": null,
      "place_name": null,
      "address": "405 East 42nd Street, New York, NY 10017",
      "phone": null,
      "email": null,
      "website": "https://www.un.org",
      "other_websites": null,
      "contact_title": null,
      "gov_population": null,
      "gov_population_year": null,
      "verification_status": "curated",
      "latitude": 40.7765729999999990695869200862944126129150390625,
      "longitude": -73.9702620000000052868927014060318470001220703125,
      "freshness": "fresh",
      "confidence": 45
    }
  ],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 43780,
    "last_page": 21890
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/offices?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/offices?per_page=2&page=1",
    "prev": null,
    "next": "https://opendatamaps.com/api/v1/offices?per_page=2&page=2",
    "last": "https://opendatamaps.com/api/v1/offices?per_page=2&page=21890"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One office #

GET /api/v1/offices/{key}

One office by its key, such as gus:100001.

Parameters

key string path required

Office key, e.g. gus:100001.

Example curated:intl:international-monetary-fund

Returns

  • data Office
    Show 24 child fieldsHide child fields
    • office_key string
    • name string
    • short_name string or null
    • level string
    • category string
    • parent string or null
    • state_code string or null
    • county_geoid string or null
    • place_geoid string or null
    • government_key string or null
      The government this record belongs to (see /governments).
    • place_name string or null
    • address string or null
    • phone string or null
    • email string or null
    • website string or null
    • other_websites array of string or null
    • contact_title string or null
    • gov_population integer or null
    • gov_population_year integer or null
    • verification_status string
    • latitude number or null
    • longitude number or null
    • freshness string or null
      The worst status of the record's fields: fresh, aging (past 75% of its window), stale or unknown. Null before the first nightly freshness run.
    • confidence integer or null
      0-99. The lowest confidence of the record's fields: the trust of the source, less a point per month past its freshness window, plus 5 for each agreeing source.
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/offices/curated:intl:international-monetary-fund"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/offices/curated:intl:international-monetary-fund");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/offices/curated:intl:international-monetary-fund",
    # 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/offices/curated:intl:international-monetary-fund');

$body = $response->json();
Response

200 OK The record.

{
  "data": {
    "office_key": "curated:intl:international-monetary-fund",
    "name": "International Monetary Fund",
    "short_name": null,
    "level": "world",
    "category": "International finance",
    "parent": null,
    "state_code": "DC",
    "county_geoid": "11001",
    "place_geoid": null,
    "government_key": null,
    "place_name": null,
    "address": "700 19th Street NW, Washington, DC 20431",
    "phone": null,
    "email": null,
    "website": "https://www.imf.org",
    "other_websites": null,
    "contact_title": null,
    "gov_population": null,
    "gov_population_year": null,
    "verification_status": "curated",
    "latitude": 38.90424300000000101817931863479316234588623046875,
    "longitude": -77.0165240000000039799488149583339691162109375,
    "freshness": "fresh",
    "confidence": 45
  },
  "meta": {
    "release": 14
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No office matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

Officials #

The head of government of a county or place, such as a mayor, where a source names one.

List officials #

GET /api/v1/officials

One row per county or place: its office and, where a source names one, its head of government.

Parameters

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of Official
    Show 21 child fieldsHide child fields
    • subject_type string
    • subject_geoid string
    • office_key string or null
    • qid string or null
    • website string or null
    • email string or null
    • phone string or null
    • has_head boolean
    • head_name string or null
    • head_qid string or null
    • head_role string or null
    • head_start string or null
    • head_end string or null
    • head_possibly_outdated boolean or null
    • head_source string or null
    • head_as_of string or null
    • head_phone string or null
    • head_email string or null
    • head_office string or null
    • freshness string or null
      The worst status of the record's fields: fresh, aging (past 75% of its window), stale or unknown. Null before the first nightly freshness run.
    • confidence integer or null
      0-99. The lowest confidence of the record's fields: the trust of the source, less a point per month past its freshness window, plus 5 for each agreeing source.
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/officials" \
  --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/officials?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/officials",
    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/officials', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [
    {
      "subject_type": "place",
      "subject_geoid": "1001400",
      "office_key": "gus:124149",
      "qid": "Q638836",
      "website": "http://arden.delaware.gov/",
      "email": null,
      "phone": null,
      "has_head": false,
      "head_name": null,
      "head_qid": null,
      "head_role": null,
      "head_start": null,
      "head_end": null,
      "head_possibly_outdated": null,
      "head_source": null,
      "head_as_of": null,
      "head_phone": null,
      "head_email": null,
      "head_office": null,
      "freshness": "unknown",
      "confidence": null
    },
    {
      "subject_type": "place",
      "subject_geoid": "1001530",
      "office_key": "gus:161531",
      "qid": "Q967189",
      "website": "http://www.theardens.com/ardencroft.htm",
      "email": null,
      "phone": null,
      "has_head": false,
      "head_name": null,
      "head_qid": null,
      "head_role": null,
      "head_start": null,
      "head_end": null,
      "head_possibly_outdated": null,
      "head_source": null,
      "head_as_of": null,
      "head_phone": null,
      "head_email": null,
      "head_office": null,
      "freshness": "unknown",
      "confidence": null
    }
  ],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 18386,
    "last_page": 9193
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/officials?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/officials?per_page=2&page=1",
    "prev": null,
    "next": "https://opendatamaps.com/api/v1/officials?per_page=2&page=2",
    "last": "https://opendatamaps.com/api/v1/officials?per_page=2&page=9193"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

Facilities #

Public facilities: hospitals, schools, libraries, fire stations and more.

List public facilities #

GET /api/v1/facilities

Public facilities shown on the map. Hidden facilities are never listed.

Parameters

country string query

Two-letter ISO 3166 country code, any case, e.g. US: the country of the facility's government (a facility without one is in the US). Must be a country in the directory; an unknown or inactive code is a 422.

state string query

Two-letter state code, any case, e.g. DE.

county string query

County GEOID, e.g. 10001.

level string query

Level of government, e.g. county, municipal.

kind string query

Kind of record (office category, place kind or facility kind).

updated_since integer query

Only records changed after this release number was built.

page integer query

Page number, from 1.

Default 1

per_page integer query

Records per page. Values above 500 are lowered to 500.

Default 100 Max 500 Example 2

Returns

  • data array of Facility
    Show 18 child fieldsHide child fields
    • facility_key string
    • name string
    • kind string or null
    • kind_level string or null
    • state_code string
    • county_geoid string or null
    • place_geoid string or null
    • government_key string or null
      The government this record belongs to (see /governments).
    • address string or null
    • phone string or null
    • email string or null
    • website string or null
    • detail string or null
    • latitude number or null
    • longitude number or null
    • source_key string or null
    • freshness string or null
      The worst status of the record's fields: fresh, aging (past 75% of its window), stale or unknown. Null before the first nightly freshness run.
    • confidence integer or null
      0-99. The lowest confidence of the record's fields: the trust of the source, less a point per month past its freshness window, plus 5 for each agreeing source.
  • meta PageMeta
    Show 5 child fieldsHide child fields
    • release integer
    • page integer
    • per_page integer
    • total integer
    • last_page integer
  • links PageLinks
    Show 5 child fieldsHide child fields
    • self string
    • first string
    • prev string or null
    • next string or null
    • last string
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl --get \
  "https://opendatamaps.com/api/v1/facilities" \
  --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/facilities?per_page=2");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/facilities",
    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/facilities', ['per_page' => 2]);

$body = $response->json();
Response

200 OK A page of records.

{
  "data": [
    {
      "facility_key": "cms:020001",
      "name": "Providence Alaska Medical Center",
      "kind": "Acute Care hospital",
      "kind_level": "hospital",
      "state_code": "AK",
      "county_geoid": "02020",
      "place_geoid": "0203000",
      "government_key": null,
      "address": "3200 Providence Drive, Anchorage, AK 99508",
      "phone": "(907) 562-2211",
      "email": null,
      "website": null,
      "detail": "Ownership: Voluntary non-profit - Church · Emergency services: Yes · CMS overall rating 3 of 5",
      "latitude": 61.1900188999999983252564561553299427032470703125,
      "longitude": -149.819246300000003202512743882834911346435546875,
      "source_key": "cms-hospitals",
      "freshness": "fresh",
      "confidence": 45
    },
    {
      "facility_key": "cms:020006",
      "name": "Mat-Su Regional Medical Center",
      "kind": "Acute Care hospital",
      "kind_level": "hospital",
      "state_code": "AK",
      "county_geoid": "02170",
      "place_geoid": "0258660",
      "government_key": null,
      "address": "2500 South Woodworth Loop, Palmer, AK 99645",
      "phone": "(907) 861-6000",
      "email": null,
      "website": null,
      "detail": "Ownership: Voluntary non-profit - Other · Emergency services: Yes · CMS overall rating 3 of 5",
      "latitude": 61.5620373000000000729414750821888446807861328125,
      "longitude": -149.260046399999993127494235523045063018798828125,
      "source_key": "cms-hospitals",
      "freshness": "fresh",
      "confidence": 45
    }
  ],
  "meta": {
    "release": 14,
    "page": 1,
    "per_page": 2,
    "total": 168117,
    "last_page": 84059
  },
  "links": {
    "self": "https://opendatamaps.com/api/v1/facilities?per_page=2&page=1",
    "first": "https://opendatamaps.com/api/v1/facilities?per_page=2&page=1",
    "prev": null,
    "next": "https://opendatamaps.com/api/v1/facilities?per_page=2&page=2",
    "last": "https://opendatamaps.com/api/v1/facilities?per_page=2&page=84059"
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

One facility #

GET /api/v1/facilities/{key}

One facility by its key.

Parameters

key string path required

Facility key, e.g. cms:080001.

Example cms:020001

Returns

  • data Facility
    Show 18 child fieldsHide child fields
    • facility_key string
    • name string
    • kind string or null
    • kind_level string or null
    • state_code string
    • county_geoid string or null
    • place_geoid string or null
    • government_key string or null
      The government this record belongs to (see /governments).
    • address string or null
    • phone string or null
    • email string or null
    • website string or null
    • detail string or null
    • latitude number or null
    • longitude number or null
    • source_key string or null
    • freshness string or null
      The worst status of the record's fields: fresh, aging (past 75% of its window), stale or unknown. Null before the first nightly freshness run.
    • confidence integer or null
      0-99. The lowest confidence of the record's fields: the trust of the source, less a point per month past its freshness window, plus 5 for each agreeing source.
  • meta object
    Show 1 child fieldHide child fields
    • release integer
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/facilities/cms:020001"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/facilities/cms:020001");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/facilities/cms:020001",
    # 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/facilities/cms:020001');

$body = $response->json();
Response

200 OK The record.

{
  "data": {
    "facility_key": "cms:020001",
    "name": "Providence Alaska Medical Center",
    "kind": "Acute Care hospital",
    "kind_level": "hospital",
    "state_code": "AK",
    "county_geoid": "02020",
    "place_geoid": "0203000",
    "government_key": null,
    "address": "3200 Providence Drive, Anchorage, AK 99508",
    "phone": "(907) 562-2211",
    "email": null,
    "website": null,
    "detail": "Ownership: Voluntary non-profit - Church · Emergency services: Yes · CMS overall rating 3 of 5",
    "latitude": 61.1900188999999983252564561553299427032470703125,
    "longitude": -149.819246300000003202512743882834911346435546875,
    "source_key": "cms-hospitals",
    "freshness": "fresh",
    "confidence": 45
  },
  "meta": {
    "release": 14
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

404 Not Found No such record.

{
  "message": "No facility matches \"unknown\"."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

Meta #

The live release and this document.

The live release, record counts, plans and sources #

GET /api/v1/meta

The live release number, when it was built, the record counts, the plan limits and every data source with its terms.

Returns

  • data object
    Show 6 child fieldsHide child fields
    • release integer
      The live release number.
    • built_at string (date-time) or null
      When the release was built.
    • license string or null
      The licence of the data, CC0-1.0.
    • counts object
      Records per entity in the release.
    • plans object
      Requests per minute and per day on each plan; null is unlimited.
    • sources array of object
      Every data source with its publisher, vintage and terms.
Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/meta"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/meta");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/meta",
    # 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/meta');

$body = $response->json();
Response

200 OK Release details.

{
  "data": {
    "release": 14,
    "built_at": "2026-11-26T17:44:18+00:00",
    "license": "CC0-1.0",
    "counts": {
      "states": 52,
      "counties": 3222,
      "places": 55765,
      "governments": 0,
      "offices": 43780,
      "officials": 18386,
      "facilities": 168117
    },
    "plans": {
      "anonymous": {
        "per_minute": 30,
        "per_day": 1000
      },
      "free": {
        "per_minute": 60,
        "per_day": 5000
      },
      "developer": {
        "per_minute": 300,
        "per_day": 100000
      },
      "business": {
        "per_minute": 1200,
        "per_day": 2000000
      },
      "partner": {
        "per_minute": null,
        "per_day": null
      }
    },
    "sources": [
      {
        "key": "ak-dcced-officials",
        "name": "Alaska Community Database — city and borough mayors",
        "publisher": "State of Alaska, Department of Commerce, Community, and Economic Development (DCCED)",
        "vintage": "Live service on the retrieval date (each record carries its own as-of date)",
        "license": "Public government information (State of Alaska).",
        "url": "https://maps.commerce.alaska.gov/server/rest/services/Govt_Related/Govt_Elected_Officials/MapServer"
      },
      {
        "key": "census-cb-2025",
        "name": "2025 Cartographic Boundary Files — Counties, County Subdivisions and Places 1:500,000",
        "publisher": "U.S. Census Bureau, Geography Division",
        "vintage": "2025 (geography as of January 1, 2025)",
        "license": "Public domain (U.S. Government work).",
        "url": "https://www.census.gov/geographies/mapping-files/time-series/geo/cartographic-boundary.2025.html"
      },
      {
        "key": "census-gazetteer-2026",
        "name": "2026 U.S. Gazetteer Files — Counties, County Subdivisions, Places",
        "publisher": "U.S. Census Bureau, Geography Division",
        "vintage": "2026 (geography as of January 1, 2026)",
        "license": "Public domain (U.S. Government work).",
        "url": "https://www.census.gov/geographies/reference-files/time-series/geo/gazetteer-files.2026.html"
      }
    ]
  }
}
Response headers
X-OpenData-Releaseinteger Number of the release the answer was read from.
X-RateLimit-Limitstring Requests allowed in the current window, normally the minute, or "unlimited" on the partner plan.
X-RateLimit-Remaininginteger 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."
}

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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger 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."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
Try it Called from your browser, without a key

This document #

GET /api/v1/openapi.json

This API description as OpenAPI 3.1 JSON, for Postman, code generators and other tools.

Request
# For higher limits (optional): -H "X-Api-Key: YOUR_API_KEY"
curl "https://opendatamaps.com/api/v1/openapi.json"
// For higher limits (optional): fetch(url, { headers: { "X-Api-Key": "YOUR_API_KEY" } })
const response = await fetch("https://opendatamaps.com/api/v1/openapi.json");
const body = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/openapi.json",
    # 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/openapi.json');

$body = $response->json();
Response

200 OK The OpenAPI 3.1 description of this API.

{
  "openapi": "3.1.0",
  "info": {
    "title": "OpenData API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ],
  "paths": {
    "/states": {
      "get": {
        "summary": "List states and territories"
      }
    }
  }
}
Try it Called from your browser, without a key

Partner write API #

Create, read and update records with an API token issued on the admin profile page. Writes go through the same checks, provenance and revisions as the admin form, and reach the public API with the next release.

These endpoints need a partner token: an API token issued on the admin profile page, sent as Authorization: Bearer …, with the records:read or records:write ability. Your account's permissions apply on top. They allow 120 requests a minute and have no Try it.

Create a record #

POST /api/v1/records/{entity} Partner token

Creates a record from attributes, naming the source of the facts. The same operation as the admin form: the same validation, provenance and revision. Needs a token with the records:write ability and an account that may create this record type.

Parameters

entity string path required

The record type.

One of offices officials states counties places boundaries facilities facility-kinds sources

Example offices

Request body

  • attributes object required
    Field values to set, by field name. Unknown fields are ignored.
  • source_key string required
    The source of these facts: a key from the sources list, such as official-website.
  • retrieved string (date) or null
    When the facts were read from the source (YYYY-MM-DD, not in the future).
  • evidence_url string (uri) or null
    A page that shows the facts.
  • reason string or null
    Why the change was made, up to 500 characters. Defaults to "Entered through the API".

Returns

  • entity string
    The record type.
  • id integer
    The database id.
  • key string
    The record key.
  • attributes object
    The record's editable fields.
  • provenance object
    For each field with a known source: source_key, retrieved, url, qid, note, details and, when an admin pinned it, pinned.
  • admin_url string
    The record in the admin.
Request
curl -X POST \
  "https://opendatamaps.com/api/v1/records/offices" \
  -H "Authorization: Bearer YOUR_PARTNER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"attributes":{"website":"https://www.autaugaco.org/"},"source_key":"official-website","retrieved":"2026-11-20","evidence_url":"https://www.autaugaco.org/","reason":"The county site moved to HTTPS"}'
const response = await fetch("https://opendatamaps.com/api/v1/records/offices", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_PARTNER_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "attributes": {
      "website": "https://www.autaugaco.org/"
    },
    "source_key": "official-website",
    "retrieved": "2026-11-20",
    "evidence_url": "https://www.autaugaco.org/",
    "reason": "The county site moved to HTTPS"
  }),
});
const record = await response.json();
import requests

response = requests.post(
    "https://opendatamaps.com/api/v1/records/offices",
    headers={"Authorization": "Bearer YOUR_PARTNER_TOKEN"},
    json={
        "attributes": {
            "website": "https://www.autaugaco.org/",
        },
        "source_key": "official-website",
        "retrieved": "2026-11-20",
        "evidence_url": "https://www.autaugaco.org/",
        "reason": "The county site moved to HTTPS",
    },
    timeout=30,
)
response.raise_for_status()
record = response.json()
use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_PARTNER_TOKEN')
    ->post('https://opendatamaps.com/api/v1/records/offices', [
        'attributes' => [
            'website' => 'https://www.autaugaco.org/',
        ],
        'source_key' => 'official-website',
        'retrieved' => '2026-11-20',
        'evidence_url' => 'https://www.autaugaco.org/',
        'reason' => 'The county site moved to HTTPS',
    ]);

$record = $response->json();
Response

201 Created The new record.

{
  "entity": "offices",
  "id": 1,
  "key": "gus:100001",
  "attributes": {
    "office_key": "gus:100001",
    "name": "Autauga County",
    "level": "county",
    "state_code": "AL",
    "county_geoid": "01001",
    "website": "https://www.autaugaco.org/"
  },
  "provenance": {
    "website": {
      "source_key": "official-website",
      "retrieved": "2026-11-20",
      "url": "https://www.autaugaco.org/",
      "qid": null,
      "note": null,
      "details": null
    }
  },
  "admin_url": "https://opendatamaps.com/admin/offices/1"
}

401 Unauthorized No token, or the token is unknown, expired or its owner is suspended.

{
  "message": "A valid API token is required."
}

403 Forbidden The token lacks records:write, or its owner may not create this record type. Also 403 while edits need review (Settings › Publishing › Require review of edits) and the owner cannot review proposals: "Review is required for your account; use the admin screens."

{
  "message": "This token does not have the records:write ability."
}

404 Not Found Unknown record type.

{
  "message": "The route api/v1/records/widgets could not be found."
}

422 Unprocessable Content The body is not valid.

{
  "message": "Name the source of this fact.",
  "errors": {
    "source_key": [
      "Name the source of this fact."
    ]
  }
}

429 Too Many Requests More than 120 requests in a minute. Retry-After says when to retry.

{
  "message": "Too Many Attempts."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger When the limit resets, as a Unix timestamp.

Read a record #

GET /api/v1/records/{entity}/{key} Partner token

A record as the database holds it now (not the release), with the provenance of each field. Needs a token with the records:read ability.

Parameters

entity string path required

The record type.

One of offices officials states counties places boundaries facilities facility-kinds sources

Example offices

key string path required

The record key, as the admin shows it: an office key such as gus:100001, a state code or a GEOID.

Example gus:100001

Returns

  • entity string
    The record type.
  • id integer
    The database id.
  • key string
    The record key.
  • attributes object
    The record's editable fields.
  • provenance object
    For each field with a known source: source_key, retrieved, url, qid, note, details and, when an admin pinned it, pinned.
  • admin_url string
    The record in the admin.
Request
curl \
  "https://opendatamaps.com/api/v1/records/offices/gus:100001" \
  -H "Authorization: Bearer YOUR_PARTNER_TOKEN"
const response = await fetch("https://opendatamaps.com/api/v1/records/offices/gus:100001", {
  method: "GET",
  headers: {
    Authorization: "Bearer YOUR_PARTNER_TOKEN",
  },
});
const record = await response.json();
import requests

response = requests.get(
    "https://opendatamaps.com/api/v1/records/offices/gus:100001",
    headers={"Authorization": "Bearer YOUR_PARTNER_TOKEN"},
    timeout=30,
)
response.raise_for_status()
record = response.json()
use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_PARTNER_TOKEN')
    ->get('https://opendatamaps.com/api/v1/records/offices/gus:100001');

$record = $response->json();
Response

200 OK The record.

{
  "entity": "offices",
  "id": 1,
  "key": "gus:100001",
  "attributes": {
    "office_key": "gus:100001",
    "name": "Autauga County",
    "level": "county",
    "state_code": "AL",
    "county_geoid": "01001",
    "website": "https://www.autaugaco.org/"
  },
  "provenance": {
    "website": {
      "source_key": "official-website",
      "retrieved": "2026-11-20",
      "url": "https://www.autaugaco.org/",
      "qid": null,
      "note": null,
      "details": null
    }
  },
  "admin_url": "https://opendatamaps.com/admin/offices/1"
}

401 Unauthorized No token, or the token is unknown, expired or its owner is suspended.

{
  "message": "A valid API token is required."
}

403 Forbidden The token lacks records:read, or its owner may not view this record type.

{
  "message": "This token does not have the records:read ability."
}

404 Not Found No record has that key.

{
  "message": "No record has that key."
}

429 Too Many Requests More than 120 requests in a minute. Retry-After says when to retry.

{
  "message": "Too Many Attempts."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger When the limit resets, as a Unix timestamp.

Update a record #

PATCH /api/v1/records/{entity}/{key} Partner token

Changes only the attributes sent. The key cannot change. Needs a token with the records:write ability and an account that may update this record type.

Parameters

entity string path required

The record type.

One of offices officials states counties places boundaries facilities facility-kinds sources

Example offices

key string path required

The record key, as the admin shows it: an office key such as gus:100001, a state code or a GEOID.

Example gus:100001

Request body

  • attributes object required
    Field values to set, by field name. Unknown fields are ignored.
  • source_key string required
    The source of these facts: a key from the sources list, such as official-website.
  • retrieved string (date) or null
    When the facts were read from the source (YYYY-MM-DD, not in the future).
  • evidence_url string (uri) or null
    A page that shows the facts.
  • reason string or null
    Why the change was made, up to 500 characters. Defaults to "Entered through the API".

Returns

  • entity string
    The record type.
  • id integer
    The database id.
  • key string
    The record key.
  • attributes object
    The record's editable fields.
  • provenance object
    For each field with a known source: source_key, retrieved, url, qid, note, details and, when an admin pinned it, pinned.
  • admin_url string
    The record in the admin.
Request
curl -X PATCH \
  "https://opendatamaps.com/api/v1/records/offices/gus:100001" \
  -H "Authorization: Bearer YOUR_PARTNER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"attributes":{"website":"https://www.autaugaco.org/"},"source_key":"official-website","retrieved":"2026-11-20","evidence_url":"https://www.autaugaco.org/","reason":"The county site moved to HTTPS"}'
const response = await fetch("https://opendatamaps.com/api/v1/records/offices/gus:100001", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer YOUR_PARTNER_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "attributes": {
      "website": "https://www.autaugaco.org/"
    },
    "source_key": "official-website",
    "retrieved": "2026-11-20",
    "evidence_url": "https://www.autaugaco.org/",
    "reason": "The county site moved to HTTPS"
  }),
});
const record = await response.json();
import requests

response = requests.patch(
    "https://opendatamaps.com/api/v1/records/offices/gus:100001",
    headers={"Authorization": "Bearer YOUR_PARTNER_TOKEN"},
    json={
        "attributes": {
            "website": "https://www.autaugaco.org/",
        },
        "source_key": "official-website",
        "retrieved": "2026-11-20",
        "evidence_url": "https://www.autaugaco.org/",
        "reason": "The county site moved to HTTPS",
    },
    timeout=30,
)
response.raise_for_status()
record = response.json()
use Illuminate\Support\Facades\Http;

$response = Http::withToken('YOUR_PARTNER_TOKEN')
    ->patch('https://opendatamaps.com/api/v1/records/offices/gus:100001', [
        'attributes' => [
            'website' => 'https://www.autaugaco.org/',
        ],
        'source_key' => 'official-website',
        'retrieved' => '2026-11-20',
        'evidence_url' => 'https://www.autaugaco.org/',
        'reason' => 'The county site moved to HTTPS',
    ]);

$record = $response->json();
Response

200 OK The updated record.

{
  "entity": "offices",
  "id": 1,
  "key": "gus:100001",
  "attributes": {
    "office_key": "gus:100001",
    "name": "Autauga County",
    "level": "county",
    "state_code": "AL",
    "county_geoid": "01001",
    "website": "https://www.autaugaco.org/"
  },
  "provenance": {
    "website": {
      "source_key": "official-website",
      "retrieved": "2026-11-20",
      "url": "https://www.autaugaco.org/",
      "qid": null,
      "note": null,
      "details": null
    }
  },
  "admin_url": "https://opendatamaps.com/admin/offices/1"
}

401 Unauthorized No token, or the token is unknown, expired or its owner is suspended.

{
  "message": "A valid API token is required."
}

403 Forbidden The token lacks records:write, or its owner may not update this record type. Also 403 while edits need review (Settings › Publishing › Require review of edits) and the owner cannot review proposals: "Review is required for your account; use the admin screens."

{
  "message": "This token does not have the records:write ability."
}

404 Not Found No record has that key.

{
  "message": "No record has that key."
}

422 Unprocessable Content The body is not valid.

{
  "message": "Name the source of this fact.",
  "errors": {
    "source_key": [
      "Name the source of this fact."
    ]
  }
}

429 Too Many Requests More than 120 requests in a minute. Retry-After says when to retry.

{
  "message": "Too Many Attempts."
}
Response headers
Retry-Afterinteger Seconds to wait before trying again.
X-RateLimit-Resetinteger When the limit resets, as a Unix timestamp.