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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| {id} | path | string | optional | Bill id in the form {congress}-{type}-{number} — e.g. 118-hr-3076. |
| congress | query | integer | optional | Filter to a single Congress number (e.g. 118). |
| type | query | string | optional | One of hr, s, hjres, sjres, hconres, sconres, hres, sres. |
| q | query | string | optional | Case-insensitive substring search on the official title. |
| cursor | query | string | optional | Opaque pagination cursor returned in the previous response. |
| limit | query | integer | optional | Page 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
| Field | Type | Required | Description |
|---|---|---|---|
| items | BillItem[] | required | Page of bills, ordered by congress DESC, number DESC. |
| items[].id | string | required | Stable id of the form {congress}-{type}-{number}. |
| items[].congress | integer | required | Congress number (e.g. 118, 119). |
| items[].type | string | required | Bill type code: hr, s, hjres, etc. |
| items[].number | integer | required | Bill number within that type and Congress. |
| items[].officialTitle | string | required | The bill’s official short title. |
| items[].introducedDate | string | null | required | ISO 8601 date the bill was introduced, or null. |
| items[].memberName | string | null | required | Latest known sponsor name. Resolved across Congress transitions. |
| items[].memberBioguideId | string | null | optional | Bioguide id of the sponsor (e.g. P000197), cross-reference with /members. |
| items[].memberByCongressKey | string | null | optional | Per-Congress sponsor key, joins to /members/{id}. |
| items[].committeeNames | string | required | Comma-separated committee names currently referred. |
| items[].sourceUrl | string | null | optional | Canonical Congress.gov URL. |
| nextCursor | string | 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.