search_packages
Pack: govinfo · Endpoint: https://gateway.pipeworx.io/govinfo/mcp
Full-text + faceted search across GovInfo. Filter by collection codes (comma-separated), date range, congress, court (for USCOURTS), and free-text query. Returns package IDs and titles.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Free-text search |
collections | string | no | Comma-separated collection codes (e.g., “BILLS,FR”) |
congress | number | no | Congress number (e.g., 118) — for BILLS/CHRG/CRPT |
date_from | string | no | YYYY-MM-DD |
date_to | string | no | YYYY-MM-DD |
page_size | number | no | 1-100 (default 25) |
offset_mark | string | no | Pagination 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": "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
| Field | Type | Description |
|---|---|---|
total | number | Total matching packages |
next_offset_mark | string | null | Pagination cursor for next results |
returned | number | Number of results returned in this response |
results | array | Search 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.