GovInfo Search API

Discover documents on GovInfo using search queries and field operators available in the GovInfo UI

Operations 1

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/govinfo-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

govinfo-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: GovInfo Collections Search API
  description: The GovInfo API provides services for developers and webmasters to access GovInfo content and metadata, including search, packages, granules, collections, related items, and published documents from the U.S. Government Publishing Office. Requires an api.data.gov API key.
  contact:
    name: Developer Hub
    url: https://github.com/usgpo/api
  license:
    name: License
    url: https://github.com/usgpo/api/blob/master/LICENSE.md
  version: '2.0'
servers:
- url: https://api.govinfo.gov
  description: GovInfo API production server
tags:
- name: Search
  description: Discover documents on GovInfo using search queries and field operators available in the GovInfo UI
paths:
  /search:
    post:
      tags:
      - Search
      description: This service can be used to query the GovInfo search engine and return results that are the equivalent to what is returned by the main user interface. You can use field operators, such as congress, publishdate, branch, and others to construct complex queries that will return only matching documents. For additional information, please see our <a href='https://www.govinfo.gov/features/search-service-overview' target='blank' style='text-decoration:underline'>search service overview</a>.
      operationId: search
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchRequest'
            example:
              query: Federal documents
              pageSize: 10
              offsetMark: '*'
              sorts:
              - field: relevancy
                sortOrder: DESC
              historical: true
              resultLevel: default
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '404':
          description: No Content found for a given search criteria
        '400':
          description: When the input request criteria is not following the spec
        '500':
          description: Any system failure while processing the search request /query
      security:
      - apiKeyScheme: []
components:
  schemas:
    SearchResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchResult'
        offsetMark:
          type: string
        count:
          type: integer
          format: int32
    Sort:
      type: object
      properties:
        field:
          type: string
        sortOrder:
          type: string
          enum:
          - ASC
          - DESC
    SearchRequest:
      type: object
      properties:
        query:
          type: string
        pageSize:
          type: integer
          format: int32
        offsetMark:
          type: string
        sorts:
          type: array
          items:
            $ref: '#/components/schemas/Sort'
        historical:
          type: boolean
        resultLevel:
          type: string
    SearchResult:
      type: object
      properties:
        title:
          type: string
        packageId:
          type: string
        granuleId:
          type: string
        lastModified:
          type: string
        governmentAuthor:
          type: array
          items:
            type: string
        dateIssued:
          type: string
        collectionCode:
          type: string
        resultLink:
          type: string
        dateIngested:
          type: string
        download:
          type: object
          additionalProperties:
            type: string
        relatedLink:
          type: string
  securitySchemes:
    apiKeyScheme:
      type: apiKey
      name: api_key
      in: query