search_bills

Pack: openstates · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

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.

Search bills in any US statehouse. Pass jurisdiction as a 2-letter state code (e.g., “CA”, “NY”, “TX”) or full name. Returns bill identifiers, titles, classifications, last action, sponsors, and OpenStates IDs for use with get_bill.

Parameters

NameTypeRequiredDescription
jurisdictionstringyes2-letter state code or jurisdiction name
querystringnoFree-text search across title/summary
sessionstringnoOptional. Session identifiers are PER STATE (Ohio “136”, California “20252026”, Texas “89”). Omit to search every session. A year or year range (“2025”, “2025-2026”) is resolved to the state’s own session by date; an unknown session is refused with the valid list.
classificationstringnobill | resolution | constitutional amendment | etc.
sponsorstringnoLegislator name filter
sortstringnoupdated_desc | updated_asc | first_action_desc | first_action_asc | latest_action_desc | latest_action_asc
per_pagenumberno1-50 (default 20)
pagenumberno1-based page (default 1)

Example call

Arguments

{
  "jurisdiction": "CA",
  "query": "healthcare"
}

curl

curl -X POST https://gateway.pipeworx.io/openstates/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_bills","arguments":{"jurisdiction":"CA","query":"healthcare"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('search_bills', {
  "jurisdiction": "CA",
  "query": "healthcare"
});

More examples

{
  "jurisdiction": "OH",
  "query": "noncompete",
  "session": "136"
}
{
  "jurisdiction": "TX",
  "query": "property tax relief",
  "session": "2025"
}

Response shape

Always returns: total, page, total_pages, returned, bills

FieldTypeDescription
totalnumberTotal matching bills across all pages
pagenumber | nullCurrent page number
total_pagesnumber | nullTotal number of pages
returnednumberNumber of bills in this response
billsarray
Full JSON Schema
{
  "type": "object",
  "properties": {
    "total": {
      "type": "number",
      "description": "Total matching bills across all pages"
    },
    "page": {
      "type": [
        "number",
        "null"
      ],
      "description": "Current page number"
    },
    "total_pages": {
      "type": [
        "number",
        "null"
      ],
      "description": "Total number of pages"
    },
    "returned": {
      "type": "number",
      "description": "Number of bills in this response"
    },
    "bills": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "openstates_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "OpenStates bill ID"
          },
          "identifier": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bill identifier (e.g., AB-123)"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bill title"
          },
          "jurisdiction": {
            "type": [
              "string",
              "null"
            ],
            "description": "State or jurisdiction name"
          },
          "session": {
            "type": [
              "string",
              "null"
            ],
            "description": "Legislative session"
          },
          "classification": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Bill type classifications"
          },
          "subject": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subject tags"
          },
          "chamber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Chamber (upper/lower) or organization"
          },
          "latest_action_date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date of latest action"
          },
          "latest_action": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of latest action"
          },
          "openstates_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Link to OpenStates page"
          }
        }
      }
    }
  },
  "required": [
    "total",
    "page",
    "total_pages",
    "returned",
    "bills"
  ]
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the openstates pack
{
  "mcpServers": {
    "openstates": {
      "url": "https://gateway.pipeworx.io/openstates/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 5, 2026