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
| Name | Type | Required | Description |
|---|---|---|---|
jurisdiction | string | yes | 2-letter state code or jurisdiction name |
query | string | no | Free-text search across title/summary |
session | string | no | Session identifier (e.g., “20232024”) |
classification | string | no | bill | resolution | constitutional amendment | etc. |
sponsor | string | no | Legislator name filter |
sort | string | no | updated_desc | updated_asc | first_action_desc | first_action_asc | latest_action_desc | latest_action_asc |
per_page | number | no | 1-50 (default 20) |
page | number | no | 1-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
| Field | Type | Description |
|---|---|---|
total | number | Total matching bills across all pages |
page | number | null | Current page number |
total_pages | number | null | Total number of pages |
returned | number | Number of bills in this response |
bills | array |
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.