search_bills

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

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
sessionstringnoSession identifier (e.g., “20232024”)
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": "NY",
  "query": "education funding",
  "session": "20232024",
  "classification": "bill",
  "sponsor": "Smith",
  "sort": "updated_desc",
  "per_page": 10
}

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, or use one-click install buttons:

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

See Getting Started for client-specific install steps.

Regenerated from source · build July 6, 2026