search_bills
Pack: congress · Endpoint: https://gateway.pipeworx.io/congress/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/search_bills for the schema, then POST the same URL with its arguments for the data.
ANSWERS “what bills about X has Congress introduced” / “recent congressional bills on X” / “federal legislation about X” / “find the congress to search one Congress exhaustively (e.g. a bill from the 111th). Prefer this over a date-sorted recent-bills listing whenever the question names a topic or a bill, since only this tool can filter by it. Returns bill type, number, title, status, sponsor, and introduction date. Use get_bill with congress + bill_type + number for full details. NOTE: this is the US Congress (federal) ONLY — for STATE legislature bills (e.g. California, Texas, New York, or any US state legislation) use legiscan or openstates instead, not this tool.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Bill name, keywords or subject to match against bill titles, e.g. “Lower Energy Costs Act” or “crypto” |
limit | number | no | Number of results to return (default: 10, max: 100) |
congress | number | no | Optional Congress number (e.g. 111) to search exhaustively. Without it the three most recent Congresses are searched in depth and every earlier one only shallowly, so name a Congress when the bill is older than about six years. |
Example call
Arguments
{
"query": "Lower Energy Costs Act",
"limit": 10
}
curl
curl -X POST https://gateway.pipeworx.io/congress/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_bills","arguments":{"query":"Lower Energy Costs Act","limit":10}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_bills', {
"query": "Lower Energy Costs Act",
"limit": 10
});
More examples
{
"query": "crypto",
"limit": 5
}
{
"query": "Patient Protection and Affordable Care Act",
"limit": 5,
"congress": 111
}
Response shape
Always returns: query, total, returned, bills, total_note, ranking, candidates_ranked, congresses_searched
| Field | Type | Description |
|---|---|---|
query | string | Search query used |
total | number | GovTrack loose keyword-match count for the query (any query word may match any bill title); see total_note |
returned | number | Number of bills returned |
bills | array | |
total_note | string | Explains that total is a loose keyword-match count, not the number of bills about the subject |
ranking | string | How the bills are ordered: local title-match re-rank (exact > phrase > all_words > partial, newer Congress first on ties); GovTrack order is not by relevance |
candidates_ranked | number | Number of distinct upstream candidate bills that were scored and ranked |
congresses_searched | object | Which Congresses were searched and how deeply: {in_depth, one_page, plus, hint} by default, or {exhaustive, coverage} when a congress argument was given |
Full JSON Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query used"
},
"total": {
"type": "number",
"description": "GovTrack loose keyword-match count for the query (any query word may match any bill title); see total_note"
},
"returned": {
"type": "number",
"description": "Number of bills returned"
},
"bills": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Bill ID"
},
"bill_type": {
"type": [
"string",
"null"
],
"description": "Bill type code"
},
"bill_type_label": {
"type": [
"string",
"null"
],
"description": "Bill type label"
},
"number": {
"type": [
"number",
"null"
],
"description": "Bill number"
},
"congress": {
"type": [
"number",
"null"
],
"description": "Congress number"
},
"title": {
"type": [
"string",
"null"
],
"description": "Full bill title"
},
"title_without_number": {
"type": [
"string",
"null"
],
"description": "Bill title without number prefix"
},
"status": {
"type": [
"string",
"null"
],
"description": "Current status code"
},
"status_label": {
"type": [
"string",
"null"
],
"description": "Current status label"
},
"status_date": {
"type": [
"string",
"null"
],
"description": "Date of current status"
},
"introduced_date": {
"type": [
"string",
"null"
],
"description": "Bill introduction date"
},
"sponsor_name": {
"type": [
"string",
"null"
],
"description": "Primary sponsor name"
},
"link": {
"type": [
"string",
"null"
],
"description": "GovTrack bill URL"
},
"match": {
"type": "string",
"enum": [
"exact",
"phrase",
"all_words",
"partial",
"none"
],
"description": "How well the bill's titles match the query: exact title, title containing the phrase, all query words present, some words present, or no title-word overlap"
},
"matched_title": {
"type": [
"string",
"null"
],
"description": "The bill title (display, short or official) that produced the match tier, or null"
}
},
"required": [
"id",
"match",
"matched_title"
]
}
},
"total_note": {
"type": "string",
"description": "Explains that total is a loose keyword-match count, not the number of bills about the subject"
},
"ranking": {
"type": "string",
"description": "How the bills are ordered: local title-match re-rank (exact > phrase > all_words > partial, newer Congress first on ties); GovTrack order is not by relevance"
},
"candidates_ranked": {
"type": "number",
"description": "Number of distinct upstream candidate bills that were scored and ranked"
},
"congresses_searched": {
"type": "object",
"description": "Which Congresses were searched and how deeply: {in_depth, one_page, plus, hint} by default, or {exhaustive, coverage} when a congress argument was given"
}
},
"required": [
"query",
"total",
"returned",
"bills",
"total_note",
"ranking",
"candidates_ranked",
"congresses_searched"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"congress": {
"url": "https://gateway.pipeworx.io/congress/mcp"
}
}
}
See Getting Started for client-specific install steps.