Legislators

Four endpoints: search the roster across all 52 jurisdictions, fetch one member, and drill into everything that member has voted on or sponsored.

Every path is relative to https://delilah-api.jsv21b.workers.dev and requires an X-API-Key header (Authentication). In the JSON samples the field names are exactly what the API returns; values written as <type> are placeholders.

Two caveats apply to both drill-downs, and it is better to design around them than discover them. The corpus is 2026-forward only, so a member’s record starts there rather than at the beginning of their career. And a few states carry split legislator identities inherited from a retired id-writer — for an affected person the records are partitioned across two ids rather than wrong, so if you hold both ids, fetch both.

List legislators

GET/v1/legislators

Search the roster. Results are ordered by state, then surname, and carry a pagination object.

ParameterTypeRequiredDescription
statestringOptional2-letter postal code (e.g. FL), DC, or US for Congress.
qstringOptionalName search across first name, last name, and the full name string.
partystringOptionalParty name match.
chamberstringOptionalChamber name match.
districtstringOptionalExact district match.
limitintegerOptionalMax rows. Defaults to 100, clamped to 500.
offsetintegerOptionalRow offset. Defaults to 0.
bash
curl "https://delilah-api.jsv21b.workers.dev/v1/legislators?state=FL&chamber=Senate&limit=1" \
  -H "X-API-Key: dk_live_…"
json
{
  "data": [
    {
      "people_id": "<int>",
      "state_id": "<int>",
      "state_abbr": "<string>",
      "role_id": "<int>",
      "chamber": "<string>",
      "party_id": "<int>",
      "party_name": "<string>",
      "name": "<string>",
      "first_name": "<string>",
      "middle_name": "<string>",
      "last_name": "<string>",
      "suffix": "<string>",
      "nickname": "<string>",
      "district": "<string>",
      "ballotpedia": "<string>",
      "followthemoney_eid": "<string>",
      "votesmart_id": "<string>",
      "opensecrets_id": "<string>",
      "updated": "<timestamp>"
    }
  ],
  "pagination": { "limit": 1, "offset": 0, "returned": 1 }
}

first_name and last_nameare always present. A handful of states publish only a single combined name string, so those two fields are derived when the source leaves them blank — honorifics such as “Rep.” and “Sen.” are stripped, and “Lastname, Firstname” ordering is unwound. The ballotpedia, followthemoney_eid, votesmart_id, and opensecrets_id fields are the join keys out to the outside world.

Get one legislator

GET/v1/legislators/{people_id}

The same record fetched by id, as { data: {…} }. Returns 404 not_found when no member carries that id.

ParameterTypeRequiredDescription
people_idinteger, int64 (path)RequiredLegislator identifier. Many exceed int32, so hold it in a 64-bit integer. Non-integer values return 400.
bash
curl "https://delilah-api.jsv21b.workers.dev/v1/legislators/9100012345" \
  -H "X-API-Key: dk_live_…"
json
{
  "data": {
    "people_id": "<int>",
    "state_abbr": "<string>",
    "chamber": "<string>",
    "party_name": "<string>",
    "name": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "district": "<string>",
    "updated": "<timestamp>"
  }
}

Voting history

GET/v1/legislators/{people_id}/votes

Every roll call this member is recorded on, newest first: their individual vote, the roll call’s header tallies, and the bill it belongs to — joined, so a voting-record view is one request rather than three.

ParameterTypeRequiredDescription
people_idinteger, int64 (path)RequiredLegislator identifier. Many exceed int32, so hold it in a 64-bit integer. Non-integer values return 400.
limitintegerOptionalMax rows. Defaults to 50, clamped to 500.
offsetintegerOptionalRow offset. Defaults to 0.
bash
curl "https://delilah-api.jsv21b.workers.dev/v1/legislators/9100012345/votes?limit=50" \
  -H "X-API-Key: dk_live_…"
json
{
  "data": [
    {
      "roll_call_id": "<int>",
      "vote_id": "<int>",
      "vote_name": "<string>",
      "roll_call_date": "<date>",
      "body_id": "<int>",
      "roll_call_desc": "<string>",
      "yea": "<int>",
      "nay": "<int>",
      "nv": "<int>",
      "absent": "<int>",
      "total": "<int>",
      "passed": "<int>",
      "bill_id": "<int>",
      "bill_number": "<string>",
      "title": "<string>",
      "state_abbr": "<string>"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "returned": 50 }
}

vote_idis the member’s own vote — 1 = Yea, 2 = Nay, 3 = Not Voting, 4 = Absent — and vote_name is the readable form. The yea/nay/nv/absent/total fields describe the whole roll call, not this member. Bad ids return 400.

Sponsored bills

GET/v1/legislators/{people_id}/bills

Every bill this member sponsors or cosponsors, most recent status first. sponsor_type_id is 1 for primary and 2 for cosponsor.

ParameterTypeRequiredDescription
people_idinteger, int64 (path)RequiredLegislator identifier. Many exceed int32, so hold it in a 64-bit integer. Non-integer values return 400.
limitintegerOptionalMax rows. Defaults to 50, clamped to 500.
offsetintegerOptionalRow offset. Defaults to 0.
bash
curl "https://delilah-api.jsv21b.workers.dev/v1/legislators/9100012345/bills?limit=50" \
  -H "X-API-Key: dk_live_…"
json
{
  "data": [
    {
      "sponsor_type_id": "<int>",
      "sponsor_order": "<int>",
      "bill_id": "<int>",
      "bill_number": "<string>",
      "title": "<string>",
      "description": "<string>",
      "status": "<int>",
      "status_date": "<date>",
      "state_abbr": "<string>"
    }
  ],
  "pagination": { "limit": 50, "offset": 0, "returned": 50 }
}

status here is the bill’s status id on thisAPI’s ladder, where 5 means Signed into Law — see the ladder on the API Reference overviewbefore mapping it against another provider’s numbers.