KeyVex
Congress & government officials

Bills & Legislation

Returns congressional bill metadata from api.congress.gov. Use this when the user asks about: bills introduced this Congress, the status of a specific bill, House vs Senate bill volume, what bills mention a topic, or to bridge from a roll-call vote (legislation_type + legislation_number) to the underlying bill.

EndpointGET /v1/bills
SourceCongress.gov
Authx-api-key — a free key works

What it returns

One record per result. Fields (from a live response):

Filters

bill_idComposite bill identifier ('{congress}-{TYPE}-{number}', e.g., '119-HR-134'). Direct doc lookup, fastest path.
congressCongress number (e.g., 119 = January 2025 onward; 118 = January 2023 - January 2025).
bill_typeType code. HR/S are bills; HRES/SRES are simple resolutions (single-chamber, non-binding); HJRES/SJRES are joint resolutions (both chambers, can…
titleCase-insensitive substring against bill title. Useful for topic searches ('artificial intelligence', 'border security', etc.).
origin_chamberFilter to bills originating in one chamber.
sinceLatest-action date lower bound (ISO YYYY-MM-DD inclusive). Useful for 'what's moved recently'. NOTE: this filters the most-recent floor/committee…
untilLatest-action date upper bound (ISO YYYY-MM-DD inclusive).
introduced_sinceIntroduction-date lower bound (ISO YYYY-MM-DD inclusive). The right filter for 'bills introduced in the last N months' — distinct from since/until,…
introduced_untilIntroduction-date upper bound (ISO YYYY-MM-DD inclusive).
sort_bySort key. Default: latest_action_date (most recently active first). Use introduction_date to sort by when the bill was originally introduced.
sort_orderDefault: desc.
limitMaximum bills to return. Default 50, max 500.

Example request

curl "https://api.keyvex.com/v1/bills?limit=1" \
  -H "x-api-key: YOUR_KEY"

Response

{
  "results": [
    {
      "bill_id": "119-SRES-781",
      "origin_chamber": "Senate",
      "latest_action_date": "2026-06-18",
      "api_url": "https://api.congress.gov/v3/bill/119/sres/781?format=json",
      "congress": 119,
      "introduction_date": "",
      "origin_chamber_code": "S",
      "title": "A resolution commemorating June 19, 2026, as \"Juneteenth National Independence Day\" in recognition of June 19, 1865, the date on which news of the end of slavery reached the slaves in the Southwestern States.",
      "update_date": "2026-06-19",
      "number": "781",
      "bill_type": "SRES",
      "latest_action_text": "Referred to the Committee on the Judiciary.",
      "congress_gov_url": "https://www.congress.gov/bill/119/sres/781",
      "scraped_at": "2026-06-22T11:15:04.752Z"
    }
  ],
  "count": 1,
  "has_more": true
}

Example questions you can answer

Related datasets

Query Bills & Legislation from your AI

Hand any AI your key + the OpenAPI spec and it can pull this dataset directly. Free key = full data, 60 requests/day.

Get a free key OpenAPI spec → REST docs →
← All 60+ datasets