v1 · Congress mirror
/docs/members

Congress Members

Resolve a member across Congress-number sessions, normalized into the same bearer-authenticated, cursor-paginated shape as the rest of the Archivist.

GEThttps://api.archivist.dev/members

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.

GET /members···
curl 'https://api.archivist.dev/members?state=CA' \
  -H "Authorization: Bearer $ARCHIVIST_KEY" \
  -H "Accept: application/json"
node-fetch.js···
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.

Endpoint · Members
Members

Page through the member mirror or resolve a single member by stable id — keyed to a Congress, chamber, and party.

GEThttps://api.archivist.dev/members

Request

The endpoint accepts the following query parameters.

Request parameters
NameInTypeRequiredDescription
statequerystringoptionalTwo-letter state code (e.g. CA).
chamberquery"house" | "senate"optionalFilter to one chamber — house or senate.
congressqueryintegeroptionalFilter to members who served in this Congress (e.g. 118).
cursorquerystringoptionalOpaque pagination cursor returned in the previous response.
limitqueryintegeroptionalPage size, 1–100. Defaults to 25.

Run it — curl

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.

members.js···
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.

Response schema
FieldTypeRequiredDescription
itemsMemberItem[]
required
Page of members, ordered by state then name.
items[].member_idstring
required
Stable cross-Congress id (M-nnnnnn).
items[].bioguide_idstring
required
Library of Congress Bioguide id.
items[].namestring
required
Latest known display name.
items[].statestring
required
State the member represented most recently.
items[].termsTerm[]
required
Ordered list of terms, newest first.
items[].terms[].congressinteger
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[].partystring
required
Party affiliation as recorded for that term.
nextCursorstring | null
required
Pass into the next page; null on the last page.
response···
{
  "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
}
Notes
  • 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.