Congress Members
Resolve a member across Congress-number sessions, normalized into the same bearer-authenticated, cursor-paginated shape as the rest of the Archivist.
Authentication
This endpoint uses the same bearer-token contract as the rest of the Archivist. Pass your key in the Authorization header — send `Authorization: Bearer $ARCHIVIST_KEY` on every request and you’re in. No cookies, no sessions, no CSRF surface.
curl 'https://api.archivist.dev/members?state=CA' \
-H "Authorization: Bearer $ARCHIVIST_KEY" \
-H "Accept: application/json"const res = await fetch(
'https://api.archivist.dev/members?state=CA',
{
headers: {
Authorization: `Bearer ${process.env.ARCHIVIST_KEY}`,
Accept: 'application/json',
},
},
);
if (!res.ok) throw new Error(`Archivist ${res.status}`);
const { items, nextCursor } = await res.json();
const rep = items.find((m) => m.terms[0]?.congress === 118);For full key-handling guidance and the 401 / 403 / 429 status table, see Errors & limits on the authentication page.
Endpoint
Filter by state, chamber, or congress and page through results with cursor and limit.
Page through the member mirror or resolve a single member by stable id — keyed to a Congress, chamber, and party.
Request
The endpoint accepts the following query parameters.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| state | query | string | optional | Two-letter state code (e.g. CA). |
| chamber | query | "house" | "senate" | optional | Filter to one chamber — house or senate. |
| congress | query | integer | optional | Filter to members who served in this Congress (e.g. 118). |
| 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
# All members from California
curl 'https://api.archivist.dev/members?state=CA' \
-H "Authorization: Bearer $ARCHIVIST_KEY"
# A single member by stable id
curl https://api.archivist.dev/members/M000197 \
-H "Authorization: Bearer $ARCHIVIST_KEY"Run it — JavaScript
Plain fetch — no SDK, no runtime dependency. The key reads from env at server startup.
const res = await fetch(
'https://api.archivist.dev/members?state=CA',
{ headers: { Authorization: `Bearer ${process.env.ARCHIVIST_KEY}` } },
);
const { items } = await res.json();
const rep = items.find((m) => m.terms[0]?.congress === 118);
console.log(`${rep?.name} (${rep?.state}) — ${rep?.terms[0]?.party}`);Response
Successful responses are 200 OK with the shape below. Errors come back as { "error": "..." } — see the error reference for the full status table.
| Field | Type | Required | Description |
|---|---|---|---|
| items | MemberItem[] | required | Page of members, ordered by state then name. |
| items[].member_id | string | required | Stable cross-Congress id (M-nnnnnn). |
| items[].bioguide_id | string | required | Library of Congress Bioguide id. |
| items[].name | string | required | Latest known display name. |
| items[].state | string | required | State the member represented most recently. |
| items[].terms | Term[] | required | Ordered list of terms, newest first. |
| items[].terms[].congress | integer | required | Congress number for that term. |
| items[].terms[].chamber | "house" | "senate" | required | house or senate — the chamber the member served in for that term. |
| items[].terms[].party | string | required | Party affiliation as recorded for that term. |
| nextCursor | string | null | required | Pass into the next page; null on the last page. |
{
"items": [
{
"member_id": "M000197",
"bioguide_id": "P000197",
"name": "Pelosi, Nancy",
"state": "CA",
"terms": [
{ "congress": 118, "chamber": "house", "party": "Democrat" },
{ "congress": 117, "chamber": "house", "party": "Democrat" }
]
}
],
"nextCursor": null
}- member_id is stable across Congress transitions — a member changing to a new Congress never gets a new id.
- terms is ordered newest first; the first term is the member’s current term when one exists.
- A single member is fetched directly at /members/{id} — the same shape without the items wrapper.