UnGovr Entities API

The Entities API from UnGovr, for entities.

GitHub OpenAPI

Operations 16

GET /entities/index.json List all countries with entity counts #
HEAD /entities/index.json Headers of the GET, without the body #
GET /entities/{cc}.json Entities for one country #
HEAD /entities/{cc}.json Headers of the GET, without the body #
GET /entities/{cc}/{state}.json Entities for one state/province #
HEAD /entities/{cc}/{state}.json Headers of the GET, without the body #
GET /entities/{cc}/all.json Full-depth search index for one country #
HEAD /entities/{cc}/all.json Headers of the GET, without the body #
GET /entities/{cc}/{state}/all.json Full-depth search index for one state/province #
HEAD /entities/{cc}/{state}/all.json Headers of the GET, without the body #
GET /entities/detail/{slug}.json Full entity detail #
HEAD /entities/detail/{slug}.json Headers of the GET, without the body #
GET /entities/children/{slug}.json Child entities list #
HEAD /entities/children/{slug}.json Headers of the GET, without the body #
GET /entities/boundaries/{slug}.geojson Geographic boundary (GeoJSON Feature) #
HEAD /entities/boundaries/{slug}.geojson Headers of the GET, without the body #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ungovr-org:ungovr-org-entities-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ungovr-org-entities-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: UnGovr Open Data Entities API
  version: '1.0'
  description: 'Free, read-only access to 327,114+ government entities,

    6,177+ California Grand Jury reports, and an AI and scraping

    law research corpus (the /ai-laws/ paths below).


    Every path answers GET and HEAD (the GET''s status and headers with no

    body) and OPTIONS for CORS preflight. Any other method is 405 with an

    Allow header naming those three.


    The license below (CC BY 4.0) covers every path except /ai-laws/*. The

    AI-law corpus is licensed separately and non-exclusively, by agreement;

    every /ai-laws/* path names this in its own x-ungovr-license extension.

    Full terms: https://www.ungovr.org/open-data/license.


    The entity and report counts above are a snapshot from the build that

    generated this description, and the corpus rebuilds daily, so two reads

    a day apart can disagree. For the count as of right now, read entities

    and cgj_reports in https://data.ungovr.org/v1/meta/last-updated.json,

    whose built_at field names the build they belong to.


    This source repository is private. To report an error in the data,

    email api@ungovr.org naming the entity or report and what looks wrong.'
  contact:
    email: api@ungovr.org
  license:
    name: CC BY 4.0
    url: https://creativecommons.org/licenses/by/4.0/
servers:
- url: https://data.ungovr.org/v1
tags:
- name: Entities
paths:
  /entities/index.json:
    get:
      summary: List all countries with entity counts
      responses:
        '200':
          description: Country list with entity counts and navigation URLs
      tags:
      - Entities
      operationId: getEntitiesIndexJson
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesIndexJson
      x-operation-id-source: derived
  /entities/{cc}.json:
    get:
      summary: Entities for one country
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
          minLength: 2
          maxLength: 2
      responses:
        '200':
          description: Country entity slice
      tags:
      - Entities
      operationId: getEntities{cc}Json
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
          minLength: 2
          maxLength: 2
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntities{cc}Json
      x-operation-id-source: derived
  /entities/{cc}/{state}.json:
    get:
      summary: Entities for one state/province
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      - name: state
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: State entity slice
      tags:
      - Entities
      operationId: getEntitiesByCc{state}Json
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      - name: state
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesByCc{state}Json
      x-operation-id-source: derived
  /entities/{cc}/all.json:
    get:
      summary: Full-depth search index for one country
      description: Every descendant of the country, not just its direct children, in a compact record ({slug, name, type, parent_slug?, population?}). Absent for countries above the publishing cap; name a state instead.
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Search index with scope=full
      tags:
      - Entities
      operationId: getEntitiesByCcAllJson
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesByCcAllJson
      x-operation-id-source: derived
  /entities/{cc}/{state}/all.json:
    get:
      summary: Full-depth search index for one state/province
      description: Every descendant of the state, including cities, school districts and special districts that the {cc}/{state}.json slice omits because they are not direct children of the state.
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      - name: state
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Search index with scope=full
      tags:
      - Entities
      operationId: getEntitiesByCcByStateAllJson
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: cc
        in: path
        required: true
        schema:
          type: string
      - name: state
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesByCcByStateAllJson
      x-operation-id-source: derived
  /entities/detail/{slug}.json:
    get:
      summary: Full entity detail
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca--ventura')
        schema:
          type: string
      responses:
        '200':
          description: 'Entity detail record. Carries open_records {law, citation?, jurisdiction, url} when a published open-records law governs the entity: the subnational law where one exists, else the national one; url resolves to /laws/records/{jurisdiction}.json. Absent for tribal governments, interstate and international bodies, and jurisdictions with no published law. Carries identifiers, an array of {registry, label, authority, identifier, url?}, for every crosswalk id UnGovr holds on the entity (Wikidata, OCD, FIPS, GeoNames and others); url is present only where the registry''s own site resolves it. Coverage is partial across the corpus and the key is absent, never an empty array, for an entity with no crosswalk. Field shapes are in /meta/schema.json.'
      tags:
      - Entities
      operationId: getEntitiesDetail{slug}Json
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca--ventura')
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesDetail{slug}Json
      x-operation-id-source: derived
  /entities/children/{slug}.json:
    get:
      summary: Child entities list
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca')
        schema:
          type: string
      responses:
        '200':
          description: Children list with parent info
      tags:
      - Entities
      operationId: getEntitiesChildren{slug}Json
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca')
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesChildren{slug}Json
      x-operation-id-source: derived
  /entities/boundaries/{slug}.geojson:
    get:
      summary: Geographic boundary (GeoJSON Feature)
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca--ventura')
        schema:
          type: string
      responses:
        '200':
          description: GeoJSON Feature with boundary geometry
      tags:
      - Entities
      operationId: getEntitiesBoundaries{slug}Geojson
      x-operation-id-source: derived
    head:
      summary: Headers of the GET, without the body
      description: 'The status and headers the GET would send (ETag, Content-Type, Cache-Control, Content-Length, the X-Quota set on a gated path) and no body. Metered exactly like the GET: a HEAD on a key-gated path counts against the same daily cap.'
      parameters:
      - name: slug
        in: path
        required: true
        description: Entity slug with '/' replaced by '--' (e.g. 'us--ca--ventura')
        schema:
          type: string
      responses:
        '200':
          description: Headers of the GET 200 response, with no body
      tags:
      - Entities
      operationId: headEntitiesBoundaries{slug}Geojson
      x-operation-id-source: derived
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key