Quickstart

Make your first authenticated call in a few minutes.

1. Get an API key

Keys are issued by Delilah after a short review — there is no self-serve signup. Request a key and we will get back to you within one business day. Your key looks like dk_live_… — treat it like a password and keep it server-side.

2. Check service health

/v1/health is public and needs no key. Use it to confirm connectivity.

bash
curl https://delilah-api.jsv21b.workers.dev/v1/health
json
{
  "ok": true,
  "service": "delilah-api",
  "version": "v1",
  "ts": "2026-08-12T20:31:54.874Z"
}

3. See how deep the data goes

/v1/coverage is also public. It reports, per state, how many bills we hold and what share of them carry at least one vote, text, or sponsor — plus vs_reference ratios against the legacy commercial provider. Read the ratios rather than the raw percentages: most bills die in committee without a roll call, so a low pct_with_votes usually reflects the legislature, not a gap.

bash
curl https://delilah-api.jsv21b.workers.dev/v1/coverage
json
{
  "generated_at": "2026-08-12T20:31:01.872Z",
  "computed_at": "2026-08-12T18:17:14.118Z",
  "states_total": 50,
  "states_in_session": 18,
  "totals": {
    "bills": 209182,
    "votes": 212035,
    "texts": 544426,
    "sponsors": 1240630,
    "vs_reference": { "bills": 1.006, "votes": 1.212, "texts": 1.736 }
  },
  "per_state": [
    {
      "state": "NY",
      "bills": 25388,
      "pct_with_votes": 22,
      "pct_with_texts": 100,
      "pct_with_sponsors": 100,
      "votes_total": 14576,
      "texts_total": 52880,
      "sponsors_total": 129790,
      "vs_reference": { "bills": 1.006, "votes": 0.989, "texts": 1.774 },
      "has_live_session": true
    }
  ]
}

4. Authenticate

Pass your key in the X-API-Key header — not as a bearer token. Every other /v1/* endpoint requires it.

bash
curl "https://delilah-api.jsv21b.workers.dev/v1/bills?state=FL&limit=1" \
  -H "X-API-Key: dk_live_…"

List responses return a data array plus a pagination object. Bill rows carry bill_id, state_abbr, session_id, bill_number, bill_type_name, status_id, status_date, title, description, last_action, completed, summary, state_url, change_hash, and updated. The full field list is in the API Reference.

json
{
  "data": [
    { /* bill object */ }
  ],
  "pagination": { "limit": 1, "offset": 0, "returned": 1 }
}

5. Drill into one bill

Use the bill_id from any list response. Sub-resources hang off the same path — /sponsors, /history, /texts, /votes, /subjects, /amendments, and more.

bash
curl https://delilah-api.jsv21b.workers.dev/v1/bills/1234567 \
  -H "X-API-Key: dk_live_…"

curl https://delilah-api.jsv21b.workers.dev/v1/bills/1234567/votes \
  -H "X-API-Key: dk_live_…"

6. Get who voted, not just the tally

Take a roll_call_idfrom a bill's votes and ask for the member-level detail.

bash
curl https://delilah-api.jsv21b.workers.dev/v1/votes/98765/details \
  -H "X-API-Key: dk_live_…"
json
{
  "data": [
    { /* people_id, name, party_name, district, vote */ }
  ],
  "summary": { "roll_call_id": 98765, "total": 0 }
}

Next steps