# 🏛️ Congress.gov Intelligence - Bills, Members & Votes (`benthepythondev/congress-intelligence`) Actor

Extract US Congressional data from official Congress.gov API. Get bills, amendments, members, committees, hearings, nominations, treaties & CRS reports. Filter by congress, chamber, state, date. Includes AI relevance scoring. Perfect for political research, lobbying & legal compliance.

- **URL**: https://apify.com/benthepythondev/congress-intelligence.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** AI, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Intelligence — Bills, Members, Votes & Legislation Data

Track **US Congressional activity** straight from the official Congress.gov API — bills, amendments, members, committees, hearings, nominations, treaties, CRS reports, House roll-call votes and the Congressional Record. Filter by Congress, chamber, bill type, state, keyword or date range, pull full sponsor and action details, and get an AI relevance score on every item so the important legislation rises to the top. API-based and reliable — no bot blocks, no broken scrapers. Export to JSON/CSV/Excel, run on a schedule, call via API, or connect to Make, Zapier or n8n.

### 📜 What is the Congress.gov Intelligence?

It turns the official Library of Congress data feed into a structured dataset for policy work. Pick a `data_type` (bills, members, votes and more), add optional filters, and it returns every matching record with clean fields — titles, sponsors, latest actions, statuses, subjects and direct Congress.gov links — plus an optional full-details mode that fetches sponsors, cosponsors, summaries, actions and bill-text links. Lobbyists, journalists, researchers and compliance teams get accurate legislative data without scraping or manual lookups.

#### What data does it extract?

- **Bills & resolutions** — title, type/number, congress, origin chamber, **latest action** and date, **sponsor** (name, party, state, bioguide id), **cosponsor count**, **summary**, **subjects** and policy area
- **Amendments** — purpose, type/number, chamber and latest action
- **Members of Congress** — name, party, **state**, district, chamber and term years
- **Committees, hearings, nominations and treaties** — names, dates, status and topics
- **CRS research reports** and the **Congressional Record**
- **House roll-call votes (Beta)** — question, result and member votes
- **AI relevance score (0–100)** on every item, plus **Congress.gov URLs** and a `scraped_at` timestamp
- Optional **full-text links** (PDF, XML, HTML) for bills and amendments

### ⬇️ Input

Choose a data type, add filters, then run (a free Congress.gov key is required):

| Field | Description |
|-------|-------------|
| `api_key` | Your free Congress.gov API key — get one at api.congress.gov/sign-up |
| `data_type` | `bills`, `amendments`, `members`, `committees`, `hearings`, `nominations`, `treaties`, `crs_reports`, `house_votes`, `congressional_record` |
| `congress` | Filter by Congress number, e.g. `118` (2023–2025) |
| `bill_type` | Bills only: `hr`, `s`, `hjres`, `sjres`, `hconres`, `sconres`, `hres`, `sres` |
| `chamber` | `house` or `senate` |
| `state_code` | Members only: 2-letter state, e.g. `CA`, `TX`, `NY` |
| `search_query` | Keywords in titles/descriptions, e.g. `climate change` |
| `from_date` / `to_date` | Date range filter (YYYY-MM-DD) |
| `include_details` | Fetch sponsors, cosponsors, actions and summaries (slower) |
| `include_text` | Include full-text links (bills & amendments) |
| `max_results` | Maximum results (1–10000, default 100; paginates automatically) |
| `enable_scoring` | Calculate AI relevance scores 0–100 (default `true`) |

#### Example input

```json
{
  "api_key": "YOUR_API_KEY",
  "data_type": "bills",
  "congress": 118,
  "search_query": "climate change",
  "include_details": true,
  "max_results": 100,
  "enable_scoring": true
}
```

### ⬆️ Output

Every item is one clean row (view as a **table**, or export **JSON / CSV / Excel**):

```json
{
  "type": "bill",
  "data_source": "congress.gov",
  "bill_type": "HR",
  "number": "1234",
  "congress": 118,
  "title": "Clean Energy Innovation Act",
  "origin_chamber": "House",
  "latest_action": "Referred to the Committee on Energy and Commerce.",
  "latest_action_date": "2024-03-15",
  "sponsor": {
    "name": "Rep. Smith, John [D-CA-12]",
    "party": "D",
    "state": "CA",
    "bioguide_id": "S001234"
  },
  "cosponsor_count": 45,
  "summary": {
    "text": "This bill promotes clean energy innovation and research...",
    "action_date": "2024-03-15",
    "action_desc": "Introduced in House"
  },
  "subjects": ["Energy", "Climate Change", "Research"],
  "policy_area": "Energy",
  "relevance_score": 85,
  "url": "https://api.congress.gov/v3/bill/118/hr/1234",
  "congress_gov_url": "https://www.congress.gov/bill/118th-congress/house-bill/1234",
  "scraped_at": "2026-06-26T15:30:00+00:00"
}
```

### 💡 Use cases

- 🧭 **Lobbying & government affairs:** monitor bills affecting your industry by keyword, committee or sponsor and act on them early.
- 📰 **Journalism & research:** surface newsworthy or high-relevance legislation and pull sponsor, cosponsor and action histories.
- ⚖️ **Legal & compliance:** track regulatory and legislative changes across a Congress, chamber or date range.
- 🎓 **Academic & policy analysis:** build datasets of bills, members, votes and committees for longitudinal study.

### ❓ FAQ

**How do I track bills on a topic?** Set `data_type: "bills"`, add a `search_query` (e.g. `artificial intelligence`) and optionally a `congress` and date range, then run. Turn on `include_details` for sponsors, cosponsors, summaries and actions.

**Do I need an API key?** Yes — a free Congress.gov key, which you get in seconds at api.congress.gov/sign-up by entering your name and email. Paste it into `api_key`. There is no paid tier to subscribe to.

**What data types are supported?** Ten: bills, amendments, members, committees, hearings, nominations, treaties, CRS reports, House roll-call votes (Beta) and the Congressional Record.

**What is the relevance score?** An AI-calculated 0–100 score (when `enable_scoring` is on) based on recency, legislative activity, current-Congress status and importance — so you can sort the most relevant items first.

**Can I get full bill text?** Yes. Set `include_text: true` for bills and amendments to receive links to full-text versions (PDF, XML, HTML).

**Can I filter members by state?** Yes. Set `data_type: "members"` with a `state_code` like `TX` and optionally a `chamber` to list senators or representatives.

**How many results can I pull?** Up to `max_results` (1–10000). The actor respects the API's per-request limit, paginates automatically and retries on rate limits.

**Is the data reliable?** Yes — it comes directly from the official Congress.gov API, so there is no bot protection or scraping to break.

**Can I run it on a schedule or via API?** Yes. Schedule recurring runs in Apify, call it via the API/SDK, or connect it to Make, Zapier or n8n to keep a legislative feed live.

**Is it legal?** It uses the official, public Congress.gov API with your own free key. Use it responsibly and follow Congress.gov's terms and applicable laws.

### 🔗 You might also like

- **[Federal Register Intelligence](https://apify.com/benthepythondev/federal-register-intelligence)** — US federal rules, notices and executive orders
- **[SEC Filings Intelligence](https://apify.com/benthepythondev/sec-filings-intelligence)** — company filings from SEC EDGAR
- **[USASpending Contracts Intelligence](https://apify.com/benthepythondev/usaspending-contracts-intelligence)** — US federal spending and contracts
- **[FDA Recall Intelligence](https://apify.com/benthepythondev/fda-recall-intelligence)** — FDA product recalls

***

**Keywords:** Congress.gov API, congressional data, bill tracking, legislation API, US bills, members of Congress, roll call votes, committee hearings, presidential nominations, treaties, CRS reports, policy tracking, lobbying intelligence, legislative monitoring, government data API.

# Actor input Schema

## `api_key` (type: `string`):

Your Congress.gov API key. Get one free at https://api.congress.gov/sign-up/

## `data_type` (type: `string`):

Type of Congressional data to extract

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

Filter by specific Congress (e.g., 118 for 118th Congress, 2023-2025). Leave empty for all.

## `bill_type` (type: `string`):

Filter bills by type (only for bills data type)

## `chamber` (type: `string`):

Filter by chamber (House or Senate)

## `state_code` (type: `string`):

Filter members by state (2-letter code, e.g., CA, TX, NY). Only for members data type.

## `search_query` (type: `string`):

Keywords to search in titles and descriptions (e.g., 'climate change', 'healthcare')

## `from_date` (type: `string`):

Filter items updated after this date (format: YYYY-MM-DD)

## `to_date` (type: `string`):

Filter items updated before this date (format: YYYY-MM-DD)

## `include_details` (type: `boolean`):

Fetch detailed information for each item (sponsors, cosponsors, actions, summaries). Slower but more comprehensive.

## `include_text` (type: `boolean`):

Include links to full text versions (PDF, XML, HTML). Only for bills and amendments.

## `max_results` (type: `integer`):

Maximum number of results to return (API limit: 250 per request, will paginate for more)

## `enable_scoring` (type: `boolean`):

Calculate relevance scores (0-100) based on recency, activity, and importance

## Actor input object example

```json
{
  "data_type": "bills",
  "bill_type": "",
  "chamber": "",
  "include_details": false,
  "include_text": false,
  "max_results": 100,
  "enable_scoring": true
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/congress-intelligence").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/congress-intelligence").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 '{}' |
apify call benthepythondev/congress-intelligence --silent --output-dataset

```

## MCP server setup

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

```

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/zTYgbgabwEHQXx0H4/builds/4NHaORqqZ3UZ6K8sO/openapi.json
