Microproduct data guidebeginner

Congress.gov Legislation API

Official bills, amendments, actions, committees, members, summaries, and legislative relationships for building policy tracking tools.

At a glance

Difficulty
Beginner — comfortable for a first prototype
Size
Small · ≤0.1 GB
Formats
JSON
Access
API
API key
Required
Provider
Library of Congress
Updates
Daily
Data terms
U.S. Government public data / federal copyright guidance

From source to product signal

Test a product idea in four steps

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.

1

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
2

Access the data

  1. 1.Register for a free Congress.gov API key and save it in the CONGRESS_API_KEY environment variable.
  2. 2.Request one bounded page of bills from the current Congress ordered by update time.
  3. 3.Retain Congress, bill type, bill number, update time, and source URL as the stable identity.
Open official source
3

Run the Python example

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))
4

Test a useful signal

Monitor recently updated legislation

Identify bills in the 119th Congress updated since July 2026 and group them by bill type.

  1. 01Retrieve one bounded page and preserve the complete bill identity and update timestamp.
  2. 02Summarize updates by bill type and follow detail endpoints only for relevant records.
  3. 03Explain why update activity, sponsorship, summaries, and legislative actions do not predict passage.

Dataset details

Library of Congress is a government source. Last verified 2026-08-13. Temporal coverage: coverage varies by legislative collection.

Theme

Government & Policy

Domains

LegislationPublic Policy

Data types

Event DataText

Tasks

Legislative MonitoringAlertingTimeline Analysis

Geography

United States

Formats

JSON

Provider

Library of Congress

Data terms

U.S. Government public data / federal copyright guidance