Skip to content

politiclaw_search_bills

  • Label: Search recent federal bills
  • Group: Bills and votes
  • Source file: packages/politiclaw-plugin/src/tools/bills.ts

Description

List recent federal bills from api.congress.gov (tier 1). Filter by congress, billType, updateDate range, and title substring. Requires plugins.entries.politiclaw.config.apiKeys.apiDataGov. Cached for 6h; pass refresh=true to re-fetch.

Parameters

NameRequiredTypeDescription
congressnointegerCongress number. Defaults to the 119th (2025-2027).
billTypenostringBill type (HR, S, HJRES, SJRES, HCONRES, SCONRES, HRES, SRES).
titleContainsnostringCase-insensitive substring match on bill title.
fromDateTimenostringISO-8601 lower bound on bill updateDate. Example: 2026-01-01T00:00:00Z.
toDateTimenostringISO-8601 upper bound on bill updateDate.
limitnointegerMax bills to return (1-50).
refreshnobooleanWhen true, bypass the cache and re-fetch.

Raw Schema

json
{
  "type": "object",
  "properties": {
    "congress": {
      "minimum": 1,
      "description": "Congress number. Defaults to the 119th (2025-2027).",
      "type": "integer"
    },
    "billType": {
      "description": "Bill type (HR, S, HJRES, SJRES, HCONRES, SCONRES, HRES, SRES).",
      "type": "string"
    },
    "titleContains": {
      "description": "Case-insensitive substring match on bill title.",
      "type": "string"
    },
    "fromDateTime": {
      "description": "ISO-8601 lower bound on bill updateDate. Example: 2026-01-01T00:00:00Z.",
      "type": "string"
    },
    "toDateTime": {
      "description": "ISO-8601 upper bound on bill updateDate.",
      "type": "string"
    },
    "limit": {
      "minimum": 1,
      "maximum": 50,
      "description": "Max bills to return (1-50).",
      "type": "integer"
    },
    "refresh": {
      "description": "When true, bypass the cache and re-fetch.",
      "type": "boolean"
    }
  }
}

Built for people who want local-first political tooling.