Library of Congress Congress.gov API
Library of Congress Congress.gov API
The Congress.gov API returns U.S. legislative data for bills, laws, amendments, members, committees, votes, nominations, treaties, hearings and Congressional Record collections as JSON or XML. List responses include pagination and collection-specific fields such as identifiers, titles, dates, actions and related-resource URLs; a free API key is required.
Coverage
Coverage and update timing vary by Congress.gov collection because records arrive through exchanges with the House and Senate. List endpoints return 20 records by default and at most 250 per request, with offset pagination; the service permits 5,000 requests per hour.
Verdict
This is a structured legislative signal for tracking new measures, actions, sponsors, committee activity and roll-call votes. Different collections begin in different periods and update on schedules documented by Congress.gov, so a missing record is not evidence that an event did not occur. The provider says API data reflects what the chambers delivered and can be missing, inaccurate or incomplete. Store source URLs and update timestamps, paginate above 250 records and monitor the change log for endpoint changes.
Get the free weekly email
Free weekly email of newly verified free data. Unsubscribe by emailing us.
By entering your email and clicking Subscribe, you agree to receive the Signal Lab weekly email from Quantum Data Technologies Ltd., 3200-650 West Georgia Street, Vancouver, BC V6B 4P7, Canada (signal-lab@qdt.ai). You can unsubscribe at any time: reply "unsubscribe" to any email or write to signal-lab@qdt.ai. See our Privacy Policy.
Use in your agent
Load recent Congress.gov bills into pandas and Parquet. Checked against the provider's documentation on Nov 2, 2026.
Access
- Sign up for a free api.data.gov key through the Congress.gov API page.
- Set the key in CONGRESS_API_KEY; the API supports JSON and XML responses.
Request
curl -H "X-Api-Key: $CONGRESS_API_KEY" 'https://api.congress.gov/v3/bill?format=json&limit=250'Format
JSON with a bills array containing Congress and bill numbers, type, title, origin chamber, update date and detail URL, plus request and pagination objects.
Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
"""Recent Congress.gov bills -> pandas -> Parquet. Free API key required."""
import os
import requests
import pandas as pd
URL = "https://api.congress.gov/v3/bill"
headers = {"X-Api-Key": os.environ["CONGRESS_API_KEY"]}
params = {"format": "json", "limit": 250}
r = requests.get(URL, headers=headers, params=params, timeout=60)
r.raise_for_status()
df = pd.json_normalize(r.json()["bills"], sep="_")
df["updateDate"] = pd.to_datetime(df["updateDate"], utc=True)
df.to_parquet("congress_gov_recent_bills.parquet", index=False)
print(len(df), "bills", df["updateDate"].min().isoformat(), "to",
df["updateDate"].max().isoformat())Not run: it needs a free API key.
Limits
- Rate limit: 5,000 requests per hour.
- List endpoints return 20 records by default and at most 250 records per request.
- Use the pagination next URL or offset parameter to retrieve additional records.
Quirks
- Coverage and update timing differ across collections; consult the Congress.gov coverage-dates page for the collection being ingested.
- The updateDate field records a Congress.gov record update, not necessarily the date of the legislative action.
- The provider says its data is what the House and Senate delivered, so late or incomplete chamber data can propagate into the API.
Terms and attribution
- The provider describes the API as a way for the public to view, retrieve and re-use machine-readable Congress.gov data.
- No single named data licence is stated for every underlying collection; check collection-level rights when redistributing content.
Sources
- https://github.com/LibraryOfCongress/api.congress.gov/: “An API key is required for access.”
- https://github.com/LibraryOfCongress/api.congress.gov/: “The rate limit is set to 5,000 requests per hour.”
- https://github.com/LibraryOfCongress/api.congress.gov/: “The 20 results limit can be adjusted up to 250 results.”
- https://github.com/LibraryOfCongress/api.congress.gov/: “While not required, the following citation may be used for attribution:”
Information and education only. Not financial, investment, legal or tax advice. Listings can be inaccurate, incomplete or out of date and are provided "as is". Free tiers, limits and licenses belong to each provider and can change, so check the provider's own terms before you rely on them. Terms & Disclaimer