Congress.gov API
Official Congress.gov API for US bills, amendments, members and committee reports back to 1973, with 429,000+ bills. Free key; DEMO_KEY works for testing. Tested example.
Endpoint tested and returned HTTP 200 on 2026-08-21
What is the Congress.gov API?
The Congress.gov API is the official Library of Congress interface to US federal legislation, covering more than 429,000 bills from the 93rd Congress onward plus amendments, members, committee reports and the Congressional Record. It needs an API key, though the shared DEMO_KEY works for evaluation.
Congress.gov is the authoritative source — it is run by the Library of Congress and is the same system that powers the public legislative website, so the data matches the official record rather than a third-party reconstruction. Bills are addressed by congress number, type and number (`/bill/110/hconres/10`), which mirrors how legislation is cited in practice, and every list response carries a `pagination.next` URL so you never have to build offsets yourself.
Register for your own free key rather than relying on DEMO_KEY. DEMO_KEY is shared globally across every api.data.gov consumer and throttles to roughly 30 requests per hour per IP address, which the `x-ratelimit-limit: 10` header on this endpoint reflects — you will exhaust it almost immediately in any real use, and you will be competing with everyone else on your network. Registration takes a form and an email confirmation and lifts the limit to 5,000 requests per hour. Note that a plain bill list is ordered by internal update date, so the newest legislation is not what comes back first.
Quick facts
- Base URL
https://api.congress.gov/v3- Authentication
- A free key from api.data.gov is required. DEMO_KEY works for a handful of test calls but is shared globally and capped at roughly 30 requests per hour per IP — register your own key before building anything.
- Rate limit
- 5,000 requests per hour with a registered key. DEMO_KEY is capped far lower and shared with every other anonymous caller from your IP.
- Pricing
- Free. US government works are in the public domain.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Congress.gov 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 a bill from the Congress.gov API
GET https://api.congress.gov/v3/bill?api_key=DEMO_KEY&limit=1
curl 'https://api.congress.gov/v3/bill?api_key=DEMO_KEY&limit=1'const res = await fetch("https://api.congress.gov/v3/bill?api_key=DEMO_KEY&limit=1");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.congress.gov/v3/bill?api_key=DEMO_KEY&limit=1", timeout=20)
res.raise_for_status()
print(res.json()){
"bills": [
{
"congress": 110,
"introducedDate": "2007-01-04",
"latestAction": {
"actionDate": "2007-04-26",
"text": "Sponsor introductory remarks on measure. (CR H4200)"
},
"number": "10",
"originChamber": "House",
"originChamberCode": "H",
"title": "Expressing the sense of the Congress that the tax give away since 2001 to the wealthiest 5 percent of Americans should be repealed and those monies instead invested in vital programs to relieve the growing burden on the working poor and to alleviate poverty in America.",
"type": "HCONRES",
"updateDate": "2024-02-07",
"updateDateIncludingText": "2024-02-07",
"url": "https://api.congress.gov/v3/bill/110/hconres/10?format=json"
}
],
"pagination": {
"count": 429666,
"next": "https://api.congress.gov/v3/bill?offset=1&limit=1&format=json"
},
"request": {
"contentType": "application/json",
"format": "json"
}
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | query | Required | Your api.data.gov key. `DEMO_KEY` works for evaluation only. DEMO_KEY |
limit | query | Optional | Records per page, up to 250. 1 |
offset | query | Optional | Pagination offset. `pagination.next` supplies a ready-made URL. 20 |
fromDateTime / toDateTime | query | Optional | Restrict to records updated within a window, in ISO 8601. 2026-01-01T00:00:00Z |
/bill/{congress}/{type}/{number} | path | Optional | One specific bill by congress, type and number. /bill/110/hconres/10 |
format | query | Optional | `json` or `xml`. json |
Response fields
billsarray- The bills. Other endpoints return their own top-level key, such as `members` or `amendments`.
bills[].congressinteger- Congress number — 110 is 2007-2008. Part of the bill's identity, not metadata.
bills[].type / numberstring- Bill type such as `HCONRES` or `HR`, plus its number. Together with `congress` these form the citation.
bills[].titlestring- Official title, which for resolutions can run to a full paragraph.
bills[].originChamber / originChamberCodestring- `House` or `Senate`, with a single-letter code alongside.
bills[].introducedDatestring- When the bill was introduced.
bills[].latestActionobject- Most recent action with `actionDate` and `text` — the fastest way to see where a bill stands.
bills[].updateDate / updateDateIncludingTextstring- Two update stamps; the second also moves when the bill text changes.
bills[].urlstring- Absolute link to that bill's own detail resource.
pagination.count / pagination.nextinteger and string- Total matches and a ready-made next-page URL.
What you can build with the Congress.gov API
- Track a bill's progress through Congress
- Monitor newly introduced legislation on a topic
- Build a legislative alerting service
- Cross-reference bills with sponsors and committee reports
- Archive the official text and actions for a bill
Common errors and how to fix them
429 or OVER_RATE_LIMIT
DEMO_KEY's shared quota is exhausted.
Fix: Register a free key at api.data.gov — DEMO_KEY is capped at roughly 30 requests per hour per IP and shared with every other anonymous caller.
403 API_KEY_INVALID
The key is missing, mistyped or not yet activated.
Fix: Confirm the key from your api.data.gov confirmation email and pass it as `api_key` in the query string.
Newest bills not returned first
Default ordering follows internal update date.
Fix: Filter with `fromDateTime`, or sort by `introducedDate` in your own code after fetching.
404 on a bill path
The type segment must be lowercase.
Fix: Use `/bill/110/hconres/10`, not `HCONRES`. Congress number and bill number are both required.
Congress.gov API — frequently asked questions
Do I need an API key for Congress.gov?
Yes, a free one from api.data.gov. DEMO_KEY works for a few evaluation calls, but it is shared globally and throttles at around 30 requests per hour per IP, so register your own before building anything.
How far back does the data go?
To the 93rd Congress, 1973, for bill data — over 429,000 bills. Earlier material is available in more limited form, and coverage of amendments and committee reports varies by era.
Is this the same as GovTrack?
No. Congress.gov is the Library of Congress's official system and is the authoritative record. GovTrack is an independent site that reprocesses similar source data and adds its own analysis, so the two can differ in structure and timing.
What is the difference between the two update dates?
`updateDate` moves when any structured metadata changes, while `updateDateIncludingText` also moves when the bill text itself is revised. Use the latter if you are caching full text.
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.
Text Compare
Compare two texts online free and highlight every difference. A private text comparison tool that finds matches and changes right in your browser.
Congress.gov 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.