Open Publica Documents API

Adopted general-plan and budget documents.

GitHub OpenAPI

Operations 5

GET /v1/governments/{id}/documents Adopted plan and budget documents #
GET /v1/governments/{id}/plan The whole general plan as one markdown file #
GET /v1/documents/search Word search over page-cited document text #
GET /v1/documents/{id} One document's metadata #
GET /v1/documents/{id}/text Read a page range as markdown #

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/openpublica-com:openpublica-com-documents-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

openpublica-com-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OpenPublica Documents API
  version: 1.0.0
  summary: Search US local-government meetings and adopted planning documents.
  description: 'Public, unauthenticated GET routes over stored local-government meetings and documents. Successful responses use {data, meta}, except the raw Markdown plan download and this document. Coverage, source availability and recording completeness vary. LLM clients may use https://api.openpublica.com/mcp. Internal CloudWatch request logs include raw source IP and user agent; coarse usage metrics are aggregates. Send a descriptive User-Agent and Accept-Encoding: gzip. See the repository API/search/visibility guides for evidence and release limits.'
  contact:
    name: OpenPublica
    url: https://www.openpublica.com
servers:
- url: https://api.openpublica.com
  description: Production
tags:
- name: Documents
  description: Adopted general-plan and budget documents.
paths:
  /v1/governments/{id}/documents:
    get:
      operationId: listGovernmentDocuments
      tags:
      - Documents
      summary: Adopted plan and budget documents
      parameters:
      - $ref: '#/components/parameters/governmentIdPath'
      - name: include_superseded
        in: query
        schema:
          type: boolean
          default: false
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50
      responses:
        '200':
          description: Held documents. An empty list with coverage `not_reviewed` is a statement about OpenPublica, not about the government.
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Document'
                  meta:
                    type: object
                    additionalProperties: true
                    properties:
                      count:
                        type: integer
                      coverage:
                        $ref: '#/components/schemas/DocumentCoverage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/governments/{id}/plan:
    get:
      operationId: getGovernmentPlan
      tags:
      - Documents
      summary: The whole general plan as one markdown file
      description: 'Returns raw `text/markdown` — a deliberate exception to the envelope, because the point of the route is to hand you a file. Sections are ordered as a plan is bound (Gov Code §65302), not alphabetically. Budgets are not included.


        NOT suitable for a model context window: 27k–179k tokens depending on the city. The read path for an agent is `/v1/documents/search` then `/v1/documents/{id}/text`.'
      parameters:
      - $ref: '#/components/parameters/governmentIdPath'
      responses:
        '200':
          description: The assembled plan
          content:
            text/markdown:
              schema:
                type: string
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/documents/search:
    get:
      operationId: searchDocuments
      tags:
      - Documents
      summary: Word search over page-cited document text
      description: '`$text` matching, NOT semantic search. Retired and unreadable documents are not searchable, so an empty result is not evidence of absence — check the listing.'
      parameters:
      - name: q
        in: query
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/governmentIdQuery'
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50
          default: 10
      responses:
        '200':
          description: Page-cited excerpts
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DocumentExcerpt'
                  meta:
                    type: object
                    additionalProperties: true
                    properties:
                      count:
                        type: integer
                      limit:
                        type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/documents/{id}:
    get:
      operationId: getDocument
      tags:
      - Documents
      summary: One document's metadata
      parameters:
      - $ref: '#/components/parameters/documentIdPath'
      responses:
        '200':
          description: The document
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    $ref: '#/components/schemas/Document'
                  meta:
                    type: object
                    additionalProperties: true
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
  /v1/documents/{id}/text:
    get:
      operationId: getDocumentText
      tags:
      - Documents
      summary: Read a page range as markdown
      description: 'Bounded to 40 pages and 120k characters, CLAMPED rather than rejected. Text is assembled from the page windows overlapping the range, so `covered` may differ from `requested` — cite `covered`.


        Pages are transcribed from rendered pixels, not the PDF text layer, so scanned tables come through as text and an unreadable page is a marked hole, never a silent omission.'
      parameters:
      - $ref: '#/components/parameters/documentIdPath'
      - name: first_page
        in: query
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: last_page
        in: query
        description: Defaults to first_page + 39.
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: The markdown for the covered range
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      text:
                        type: string
                      requested:
                        type: object
                        properties:
                          first_page:
                            type: integer
                          last_page:
                            type: integer
                      covered:
                        type: object
                        properties:
                          first_page:
                            type: integer
                          last_page:
                            type: integer
                  meta:
                    type: object
                    additionalProperties: true
                    properties:
                      max_page_span:
                        type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    DocumentCoverage:
      type:
      - object
      - 'null'
      description: What the registry knows about this government — it is what makes an empty `data` readable. `null` means the government was added since the projection last ran, which is not the same claim as `not_reviewed`.
      properties:
        state:
          type: string
          enum:
          - pinned
          - reviewed_none_pinned
          - unavailable
          - not_reviewed
        reason:
          type:
          - string
          - 'null'
    DocumentExcerpt:
      type: object
      properties:
        document_id:
          type: string
        government_id:
          type: string
        title:
          type: string
        text:
          type: string
          description: A short passage around the match joined with `…`, not the whole page window.
        first_page:
          type: integer
        last_page:
          type: integer
        source_url:
          type: string
          format: uri
        document_complete:
          type: boolean
    Document:
      type: object
      properties:
        document_id:
          type: string
        government_id:
          type: string
        title:
          type: string
        status:
          type: string
          enum:
          - converted
          - superseded
          - failed
          description: '`converted` is served and searchable. `superseded` is retired by a newer edition, stored but not searchable. `failed` means WE HOLD THIS PIN AND COULD NOT READ IT — not that the government published nothing.'
        element:
          type:
          - string
          - 'null'
          description: The slot whose pin acquired this document.
        covers:
          type: array
          items:
            type: string
          description: Every slot the document answers for. A city binding one general plan pins it as `combined` and it answers for all eight elements — reading `element` alone makes the rest look unpublished.
        page_count:
          type:
          - integer
          - 'null'
        source_url:
          type: string
          format: uri
          description: Always the government's own copy. Cite it, especially on a failed entry.
        markdown_url:
          type:
          - string
          - 'null'
          format: uri
        availability:
          $ref: '#/components/schemas/DocumentAvailability'
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - message
          properties:
            message:
              type: string
    DocumentAvailability:
      type: object
      description: Present ONLY when something is wrong — a clean document omits it, so its presence is the signal. Read it before quoting figures.
      properties:
        complete:
          type: boolean
        reason:
          type: string
          description: Drawn from a fixed caller-safe set.
        problems:
          type: array
          items:
            type: string
  parameters:
    governmentIdPath:
      name: id
      in: path
      required: true
      description: Government id, e.g. `sacramento-california`.
      schema:
        type: string
    documentIdPath:
      name: id
      in: path
      required: true
      description: Document id.
      schema:
        type: string
    governmentIdQuery:
      name: government_id
      in: query
      description: Scope to one tracked government, e.g. `sacramento-california`.
      schema:
        type: string
      example: sacramento-california
  responses:
    ServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Per-IP rate limit exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such record.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: Malformed or invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
externalDocs:
  description: Prose API reference
  url: https://www.openpublica.com/api-docs