Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- A free Congress.gov API key saved in the CONGRESS_API_KEY environment variable
Official bills, amendments, actions, committees, members, summaries, and legislative relationships for building policy tracking tools.
From source to product signal
The Congress.gov API exposes bills and their actions, sponsors, committees, subjects, summaries, and related records. Start with recently updated bills in the current Congress. An action or sponsor does not predict enactment, and summaries or linked records may arrive after the underlying event.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import os
import pandas as pd
import requests
response = requests.get(
"https://api.congress.gov/v3/bill/119",
params={
"api_key": os.environ["CONGRESS_API_KEY"],
"format": "json",
"limit": 100,
"fromDateTime": "2026-07-01T00:00:00Z",
},
timeout=30,
)
response.raise_for_status()
bills = pd.json_normalize(response.json()["bills"])
print(bills[["congress", "type", "number", "title", "updateDate"]].head(20))Test a useful signal
Identify bills in the 119th Congress updated since July 2026 and group them by bill type.
Library of Congress is a government source. Last verified 2026-08-13. Temporal coverage: coverage varies by legislative collection.