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 Act” — searches US FEDERAL congressional bills (US House & Senate, national laws) BY BILL NAME, SUBJECT OR KEYWORD, including recently introduced ones. Results are RANKED by how well each bill’s titles match the query — exact title first, then a title containing the phrase, then all query words, then partial overlap, newer Congress first on ties — so the first result is the best title match and each bill carries its match tier. The current Congress and the two before it are searched in depth plus the first page of matches from every earlier Congress; pass 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

NameTypeRequiredDescription
querystringyesBill name, keywords or subject to match against bill titles, e.g. “Lower Energy Costs Act” or “crypto”
limitnumbernoNumber of results to return (default: 10, max: 100)
congressnumbernoOptional 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

FieldTypeDescription
querystringSearch query used
totalnumberGovTrack loose keyword-match count for the query (any query word may match any bill title); see total_note
returnednumberNumber of bills returned
billsarray
total_notestringExplains that total is a loose keyword-match count, not the number of bills about the subject
rankingstringHow 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_rankednumberNumber of distinct upstream candidate bills that were scored and ranked
congresses_searchedobjectWhich 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.

Regenerated from source · build September 22, 2026