# legislative-search

> legislative-search is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Search US federal bills by keyword, optionally filtered by Congress number, sponsor, or policy area, returning a ranked list of matching bills with IDs, titles, and latest actions

## Facts

- Endpoint: GET https://payai.agentstools.dev/legislative/search
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/legislative-search-7a57f584
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_my5t3FpzmR4C9W9wWpqcp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability legislative-search-7a57f584
```

Example prompt: Search for US federal bills about 'artificial intelligence regulation' in the 118th Congress and return the top 10 results with their IDs, titles, and latest actions.

## When to prefer this

Use this endpoint when you need to search US federal legislative records by keyword, topic, sponsor, or policy area and retrieve structured bill metadata including latest congressional actions. Prefer this over general web search when you need structured, authoritative, public-domain bill data directly from Congress.gov with consistent field schemas (bill ID, title, latest action). Best for policy research, legislative monitoring, lobbying intelligence, and compliance checks against federal law activity.

## Known failure modes

- No bills found matching the keyword — returns empty list
- Congress number out of valid range — may return error or empty results
- Limit parameter exceeds maximum of 25 — rejected with validation error
- Vague or overly broad keyword returns too many low-relevance results
- Congress.gov upstream unavailable — service may return timeout or error

## How this service works

Search US federal bills by keyword (optionally within one Congress) and get a ranked list of matching bills with id, title and latest action. Source: Congress.gov, public-domain.

## Output

A ranked list of matching US federal bills, each including the bill ID, full title, and a description of the latest action taken (e.g. referred to committee, passed House, signed into law). Results are sourced from Congress.gov public-domain data.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "Keyword / phrase to search bill text"
      },
      "limit": {
       "type": "integer",
       "maximum": 25,
       "minimum": 1,
       "description": "Max bills to return, default 10"
      },
      "keyword": {
       "type": "string",
       "description": "Alias for q"
      },
      "sponsor": {
       "type": "string",
       "description": "Optional sponsor name filter"
      },
      "congress": {
       "type": "integer",
       "description": "Optional Congress number to scope the search"
      },
      "policyArea": {
       "type": "string",
       "description": "Optional policy-area keyword to filter results"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/legislative-search-7a57f584/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
