search_packages

Pack: govinfo · Endpoint: https://gateway.pipeworx.io/govinfo/mcp

Full-text + faceted search across GovInfo. Filter by one or more collection codes (BILLS, FR, CFR, USCODE, CHRG, CRPT, CREC, PLAW, USCOURTS…), date range, congress, and free-text query. Several codes search the union of those collections. Returns package IDs, titles, collection and issue dates.

Parameters

NameTypeRequiredDescription
querystringyesFree-text search
collectionsstringnoCollection codes, comma- or space-separated (e.g. “CHRG” or “CHRG,CRPT”). Several codes return the union of those collections — “CHRG,CRPT” gives every package in either. Codes come from list_collections.
congressnumbernoCongress number (e.g., 118) — for BILLS/CHRG/CRPT
date_fromstringnoYYYY-MM-DD
date_tostringnoYYYY-MM-DD
page_sizenumbernoResults per page, 1-100 (default 25). limit works as an alias.
limitnumbernoAlias for page_size, 1-100.
offset_markstringnoPagination cursor from previous response

Example call

Arguments

{
  "query": "climate change"
}

curl

curl -X POST https://gateway.pipeworx.io/govinfo/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_packages","arguments":{"query":"climate change"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_packages', {
  "query": "climate change"
});

More examples

{
  "query": "Cooper",
  "collections": "CHRG,CRPT",
  "limit": 5
}
{
  "query": "environmental protection",
  "collections": "BILLS,FR",
  "congress": 118,
  "date_from": "2023-01-01",
  "date_to": "2024-12-31",
  "page_size": 50
}

Response shape

Always returns: total, returned, results

FieldTypeDescription
totalnumberTotal matching packages
next_offset_markstring | nullPagination cursor for next results
returnednumberNumber of results returned in this response
resultsarraySearch result packages
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total": {
      "type": "number",
      "description": "Total matching packages"
    },
    "next_offset_mark": {
      "type": [
        "string",
        "null"
      ],
      "description": "Pagination cursor for next results"
    },
    "returned": {
      "type": "number",
      "description": "Number of results returned in this response"
    },
    "results": {
      "type": "array",
      "description": "Search result packages",
      "items": {
        "type": "object",
        "properties": {
          "package_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "GovInfo package ID"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Package title"
          },
          "collection": {
            "type": [
              "string",
              "null"
            ],
            "description": "Collection code"
          },
          "collection_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Collection name"
          },
          "date_issued": {
            "type": [
              "string",
              "null"
            ],
            "description": "Issue date (ISO format)"
          },
          "last_modified": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last modified date"
          },
          "package_link": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to package on GovInfo"
          },
          "details_link": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to detailed metadata"
          }
        }
      }
    }
  },
  "required": [
    "total",
    "returned",
    "results"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "govinfo": {
      "url": "https://gateway.pipeworx.io/govinfo/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 10, 2026