# Congress.gov Bills Scraper - Legislation Tracker API (`pink_comic/congress-gov-legislation-tracker`) Actor

Scrape official Congress.gov data for federal bills, resolutions, sponsors, cosponsors, votes/status updates, and latest actions. Built for government affairs, lobbying intelligence, compliance monitoring, and policy research.

- **URL**: https://apify.com/pink\_comic/congress-gov-legislation-tracker.md
- **Developed by:** [Ava Torres](https://apify.com/pink_comic) (community)
- **Categories:** Developer tools, Business, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Congress.gov - Federal Legislation & Bill Tracker

Search and monitor US federal legislation from Congress.gov. Filter by congress number, bill type, policy area, and keyword. Get bill titles, sponsors, cosponsors, introduced dates, latest actions, and direct Congress.gov links. Results in seconds, not manual archive searches.

No browser automation. Reads directly from the official Congress.gov API.

***

### What You Get

Each result is one federal bill or resolution.

| Field | Type | Description |
|---|---|---|
| `billNumber` | string | Bill number (e.g. 1234) |
| `billType` | string | Bill type: HR, S, HJRES, SJRES, HRES, SRES |
| `congress` | integer | Congress number (e.g. 118 for the 118th Congress, 2023-2025) |
| `billTitle` | string | Full bill title |
| `introducedDate` | string | Date the bill was introduced |
| `latestActionDate` | string | Date of the most recent action |
| `latestActionText` | string | Description of the most recent action |
| `sponsors` | string | Sponsor names (comma-separated) |
| `cosponsorsCount` | integer | Number of cosponsors |
| `policyArea` | string | Assigned policy area (e.g. Energy, Health, Transportation) |
| `originChamber` | string | Originating chamber (House or Senate) |
| `updateDate` | string | Date the record was last updated |
| `url` | string | Direct Congress.gov URL for this bill |

***

### Sample Output

```json
{
  "billNumber": "5376",
  "billType": "HR",
  "congress": 117,
  "billTitle": "Inflation Reduction Act of 2022",
  "introducedDate": "2022-08-12",
  "latestActionDate": "2022-08-16",
  "latestActionText": "Became Public Law No: 117-169.",
  "sponsors": "John Yarmuth",
  "cosponsorsCount": 0,
  "policyArea": "Economics and Public Finance",
  "originChamber": "House",
  "url": "https://www.congress.gov/bill/117th-congress/house-bill/5376"
}
```

***

### Who Uses This

**Government affairs and lobbying teams** tracking legislation relevant to their clients. Search by policy area and keyword to monitor bills from introduction through final action without manually checking Congress.gov each day.

**Compliance and regulatory teams** monitoring legislation that could affect their industry. Filter by policy area (Health, Finance, Energy, Transportation) to catch bills early and build response timelines before they reach final passage.

**Law firms and policy research groups** building structured datasets of legislative activity. Batch-export bills by congress, chamber, and subject for comparative analysis, briefing materials, or academic research.

**Corporate government relations teams** tracking sponsor and cosponsor counts as signals of legislative momentum. High cosponsor counts on bills in your sector indicate political will that warrants early attention.

**Journalists and policy analysts** mapping legislative trends over time. Pull all bills from a given congress in a specific policy area to quantify activity, identify repeat sponsors, and measure how far bills advanced.

***

### How to Use

#### Step 1: Configure your input

**Search by keyword across the current congress:**

```json
{
  "searchTerm": "infrastructure",
  "congress": 118,
  "maxResults": 50
}
```

**Filter by bill type:**

```json
{
  "searchTerm": "climate",
  "congress": 118,
  "billType": "s",
  "maxResults": 25
}
```

**Filter by policy area after keyword search:**

```json
{
  "searchTerm": "healthcare",
  "congress": 118,
  "subject": "Health",
  "maxResults": 100
}
```

**Use your own API key for higher throughput:**

```json
{
  "searchTerm": "energy",
  "congress": 118,
  "apiKey": "YOUR_CONGRESS_GOV_KEY",
  "maxResults": 250
}
```

#### Input reference

| Parameter | Type | Description |
|---|---|---|
| `searchTerm` | string | Keyword to filter bills by title (e.g. climate, healthcare, infrastructure). |
| `congress` | integer | US Congress number (e.g. 118 for 2023-2025, 117 for 2021-2023). Default 118. |
| `billType` | string | Bill type filter: hr, s, hjres, sjres, hres, sres. Leave blank for all types. |
| `subject` | string | Policy area filter applied after fetching details (e.g. Energy, Health, Transportation). |
| `apiKey` | string | Congress.gov API key. Leave blank to use DEMO\_KEY (40 req/hr). Register free at api.congress.gov. |
| `maxResults` | integer | Maximum number of bills to return. Default 20, max 250. |

***

### Cost Estimate

Pricing is $0.002 per result.

| Run size | Estimated cost |
|---|---|
| 20 results | ~$0.04 |
| 100 results | ~$0.20 |
| 250 results | ~$0.50 |

***

### Output Formats

Results are available in JSON, CSV, and Excel from the Apify dataset viewer. Connect to downstream tools via the Apify API or webhooks.

***

### FAQ

**Does this require a paid API key?**
No. The actor uses the free DEMO\_KEY by default, which allows 40 requests per hour. For higher throughput, register a free personal key at api.congress.gov, which provides 5,000 requests per hour.

**What congress numbers are available?**
Congress.gov covers the 93rd Congress (1973) through the current congress. The 118th Congress covers 2023-2025. The 119th Congress began January 2025.

**What bill types are supported?**
HR (House Bill), S (Senate Bill), HJRES (House Joint Resolution), SJRES (Senate Joint Resolution), HRES (House Resolution), SRES (Senate Resolution). Pass the lowercase abbreviation (e.g. `hr`, `s`).

**How does the subject filter work?**
The `subject` field filters by the policy area assigned by the Congressional Research Service. It is applied after the keyword search. Common values include Health, Energy, Finance and Financial Sector, Transportation and Public Works, Environmental Protection, and Armed Forces and National Security.

**Is the data real-time?**
Yes. The actor queries the live Congress.gov API on each run. Results reflect the current state of the database including the latest bill actions and cosponsor counts at the time of the run.

# Actor input Schema

## `searchTerm` (type: `string`):

Keyword to filter bills by title (e.g. "climate", "healthcare", "infrastructure").

## `congress` (type: `integer`):

US Congress number to filter by (e.g. 118 for the 118th Congress, 2023-2025). Leave blank for all congresses.

## `billType` (type: `string`):

Type of legislation: hr (House Bill), s (Senate Bill), hjres (House Joint Resolution), sjres (Senate Joint Resolution), hres (House Resolution), sres (Senate Resolution). Leave blank for all types.

## `subject` (type: `string`):

Filter results by policy area (e.g. "Energy", "Health", "Transportation"). Applied after fetching bill details.

## `apiKey` (type: `string`):

Congress.gov API key. Leave blank to use DEMO\_KEY (rate-limited but functional). Get a free key at api.congress.gov.

## `maxResults` (type: `integer`):

Maximum number of bills to return.

## Actor input object example

```json
{
  "searchTerm": "infrastructure",
  "congress": 119,
  "billType": "hr",
  "subject": "",
  "apiKey": "",
  "maxResults": 20
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchTerm": "infrastructure",
    "congress": 119,
    "billType": "hr",
    "subject": "",
    "apiKey": "",
    "maxResults": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("pink_comic/congress-gov-legislation-tracker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchTerm": "infrastructure",
    "congress": 119,
    "billType": "hr",
    "subject": "",
    "apiKey": "",
    "maxResults": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("pink_comic/congress-gov-legislation-tracker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchTerm": "infrastructure",
  "congress": 119,
  "billType": "hr",
  "subject": "",
  "apiKey": "",
  "maxResults": 20
}' |
apify call pink_comic/congress-gov-legislation-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pink_comic/congress-gov-legislation-tracker"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/dzeC0lhF3k1raoEO6/builds/XSHZL800nW4zkjLT3/openapi.json
