Reference · Bills/docs/bills

Bills

Page through the bill mirror, or resolve a single bill by id.

GEThttps://api.archivist.dev/bills{id}

Request

The list endpoint at /bills accepts the following query parameters. A specific record can be fetched by appending its id segment.

Request parameters
NameInTypeRequiredDescription
{id}pathstringoptionalBill id in the form {congress}-{type}-{number} — e.g. 118-hr-3076.
congressqueryintegeroptionalFilter to a single Congress number (e.g. 118).
typequerystringoptionalOne of hr, s, hjres, sjres, hconres, sconres, hres, sres.
qquerystringoptionalCase-insensitive substring search on the official title.
cursorquerystringoptionalOpaque pagination cursor returned in the previous response.
limitqueryintegeroptionalPage size, 1–100. Defaults to 25.

Run it — curl

curl···
# Page 1 — most recent bills
curl https://api.archivist.dev/bills \
  -H "Authorization: Bearer $ARCHIVIST_KEY"

# A single bill by stable id
curl https://api.archivist.dev/bills/118-hr-3076 \
  -H "Authorization: Bearer $ARCHIVIST_KEY"

Run it — JavaScript

Plain fetch — no SDK, no runtime dependency. The key reads from env at server startup.

bills.js···
const res = await fetch('https://api.archivist.dev/bills', {
  headers: { Authorization: `Bearer ${process.env.ARCHIVIST_KEY}` },
});
const { items, nextCursor } = await res.json();

for (const bill of items) {
  console.log(`${bill.id} — ${bill.officialTitle}`);
}

Response

Successful responses are 200 OK with the shape below. Errors come back as { "error": "..." } — see the error reference for the full status table.

Response schema
FieldTypeRequiredDescription
itemsBillItem[]
required
Page of bills, ordered by congress DESC, number DESC.
items[].idstring
required
Stable id of the form {congress}-{type}-{number}.
items[].congressinteger
required
Congress number (e.g. 118, 119).
items[].typestring
required
Bill type code: hr, s, hjres, etc.
items[].numberinteger
required
Bill number within that type and Congress.
items[].officialTitlestring
required
The bill’s official short title.
items[].introducedDatestring | null
required
ISO 8601 date the bill was introduced, or null.
items[].memberNamestring | null
required
Latest known sponsor name. Resolved across Congress transitions.
items[].memberBioguideIdstring | nulloptionalBioguide id of the sponsor (e.g. P000197), cross-reference with /members.
items[].memberByCongressKeystring | nulloptionalPer-Congress sponsor key, joins to /members/{id}.
items[].committeeNamesstring
required
Comma-separated committee names currently referred.
items[].sourceUrlstring | nulloptionalCanonical Congress.gov URL.
nextCursorstring | null
required
Pass into the next page; null on the last page.
response···
{
  "items": [
    {
      "id": "118-hr-3076",
      "congress": 118,
      "type": "hr",
      "number": 3076,
      "officialTitle": "Civic Data Continuity Act",
      "introducedDate": "2023-09-12",
      "memberName": "Pelosi, Nancy",
      "memberBioguideId": "P000197",
      "memberByCongressKey": "118-h-P000197",
      "committeeNames": "House Oversight,House Administration",
      "sourceUrl": "https://www.congress.gov/bill/118th-congress/house-bill/3076"
    }
  ],
  "nextCursor": "eyJpZCI6IjExOC1ocy0yMTA0In0="
}

Related endpoints

Notes
  • The list endpoint is idempotent and cursor-paginated; pages remain stable as new bills land at the top.
  • A single bill may be fetched directly at /bills/{id} — the same shape without the items wrapper.