Congress Legislators API
Free, key-free dataset of every current US member of Congress with cross-reference IDs to Bioguide, FEC, OpenSecrets, Wikipedia and more, plus full term history. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Congress Legislators API?
congress-legislators is a public-domain dataset maintained by the @unitedstates project, served as static JSON with no key. It lists every current member of the US House and Senate with their full term history and a block of cross-reference identifiers linking them to Bioguide, FEC, OpenSecrets, Wikipedia, Wikidata and a dozen other systems.
The identifier crosswalk is the whole point. Anyone integrating US political data quickly hits the problem that every source uses a different key — the Bioguide ID in official records, FEC candidate IDs in campaign finance, OpenSecrets IDs in lobbying data, GovTrack IDs in vote records, ICPSR numbers in political science datasets. This file maps all of them onto one person, and it is the reason most American civic tech projects depend on it whether or not they mention it.
It is a static file on GitHub Pages, not a query API, which has real advantages: it never rate-limits, it is versioned in git so you can diff any change back to a commit, and it is public domain. It also means no filtering — you fetch the whole array and select in your own code. The `terms` array carries every term the member has served, with type, chamber, dates, state, district or Senate class and the party at the time, so party switches and chamber moves are all visible rather than flattened to a current value. Sort by term end date to get someone's current role.
Quick facts
- Base URL
https://unitedstates.github.io/congress-legislators- Authentication
- No key. It is a static JSON file served from GitHub Pages, with YAML and CSV variants in the repository.
- Rate limit
- None. Fetch it once a day at most — it changes only when Congress does.
- Pricing
- Free and public domain (CC0). No attribution required, though crediting the project is courteous.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Congress Legislators API
Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.
1. Fetch every current member of Congress
GET https://unitedstates.github.io/congress-legislators/legislators-current.json
curl 'https://unitedstates.github.io/congress-legislators/legislators-current.json'const res = await fetch("https://unitedstates.github.io/congress-legislators/legislators-current.json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://unitedstates.github.io/congress-legislators/legislators-current.json", timeout=20)
res.raise_for_status()
print(res.json())[
{
"id": {
"bioguide": "C000127",
"thomas": "00172",
"lis": "S275",
"govtrack": 300018,
"opensecrets": "N00007836",
"votesmart": 27122,
"fec": [
"S8WA00194",
"H2WA01054"
],
"cspan": 26137,
"wikipedia": "Maria Cantwell",
"house_history": 10608,
"ballotpedia": "Maria Cantwell",
"maplight": 544,
"icpsr": 39310,
"wikidata": "Q22250",
"google_entity_id": "kg:/m/01x68t",
"pictorial": 13398
},
"name": {
"first": "Maria",
"last": "Cantwell",
"official_full": "Maria Cantwell"
},
"bio": {
"birthday": "1958-10-13",
"gender": "F"
},
"terms": [
{
"type": "rep",
"start": "1993-01-05",
"end": "1995-01-03",
"state": "WA",
"district": 1,
"party": "Democrat"
},
{
"type": "sen",
"start": "2001-01-03",
"end": "2007-01-03",
"state": "WA",
"class": 1,
"party": "Democrat",
"url": "http://cantwell.senate.gov"
},
{
"type": "sen",
"start": "2007-01-04",
"end": "2013-01-03",
"state": "WA",
"class": 1,
"party": "Democrat",
"url": "http://cantwell.senate.gov",
"address": "311 HART SENATE OFFICE BUILDING WASHINGTON DC 20510",
"phone": "202-224-3441",
"fax": "202-228-0514",
"contact_form": "http://www.cantwell.senate.gov/contact/",
"office": "311 Hart Senate Office Building"
},
{
"tyParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
legislators-current.json | path | Optional | Sitting members of both chambers. |
legislators-historical.json | path | Optional | Every former member back to the First Congress. |
legislators-district-offices.json | path | Optional | District and state office addresses for current members. |
committees-current.json | path | Optional | Current committees and subcommittees. |
Response fields
(root)array- One object per legislator. No envelope, no pagination.
idobject- The crosswalk: `bioguide`, `fec` (an array — members often have several), `govtrack`, `opensecrets`, `votesmart`, `icpsr`, `wikipedia`, `wikidata`, `ballotpedia` and more.
id.bioguidestring- The Bioguide identifier, the closest thing to a canonical US congressional key.
id.fecarray- FEC candidate IDs — plural, because House and Senate campaigns get separate ones.
nameobject- `first`, `last` and `official_full`. Use `official_full` for display.
bioobject- `birthday` and `gender`.
termsarray- Every term served, with `type` (`rep` or `sen`), dates, `state`, `district` or `class`, `party` and often an official `url`.
terms[].partystring- Party at the time of that term, so switches are visible across the array.
What you can build with the Congress Legislators API
- Join campaign finance data to voting records via the ID crosswalk
- Build a directory of current members with official links
- Track party switches and chamber moves through the terms array
- Resolve a Bioguide ID to a Wikipedia article or FEC candidate
- Seed a civic engagement app with accurate representative data
Common errors and how to fix them
404
The filename is wrong.
Fix: Files are hyphenated and lowercase, for example `legislators-current.json`. The repository README lists every available file.
Only a handful of records
You fetched a district-office or committee file rather than the legislator list.
Fix: Use `legislators-current.json` for members; the other files serve different purposes.
Current party looks wrong
You read `terms[0]`, which is the earliest term.
Fix: Sort by term end date and take the latest; the array is chronological, oldest first.
FEC ID join fails
`id.fec` is an array.
Fix: Iterate it — a member who ran for both House and Senate carries several IDs.
Congress Legislators API — frequently asked questions
Is this an official government dataset?
No. It is maintained by the @unitedstates project, a volunteer effort, from official sources. It is public domain and is the de facto standard crosswalk across US civic tech, but it is not published by Congress itself.
How often is it updated?
Whenever Congress changes — elections, resignations, appointments and party switches are typically reflected within days. Because it lives in git, you can diff any change back to a specific commit.
Can I filter it by state through the API?
No. It is a static file, so fetch it once and filter in your own code. That is also why it never rate-limits you.
What is the id block for?
It maps a legislator across every major US political data system — Bioguide, FEC, OpenSecrets, GovTrack, Wikipedia, Wikidata, ICPSR and others — so you can join campaign finance to votes to biography without maintaining your own crosswalk.
Tools that pair with this API
JSON to CSV Converter
Convert a JSON array of objects to CSV online. Automatic column headers from the union of all keys, delimiter choice and proper quoting — all in-browser.
JSON Path Finder
Evaluate a dot/bracket path against your JSON and list every leaf path for discovery. Free online JSON path finder that runs 100% in your browser.
JSON Flattener
Flatten nested JSON into single-level dot-notation keys online. Choose the separator, bracket or dotted array indexes, and copy or download the result.
Congress Legislators is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.