# Congress.gov Members Scraper (`parseforge/congress-gov-members-scraper`) Actor

Scrapes member profiles from Congress.gov. Returns each member as a flat row with name, party, chamber, state, district, and official URLs. Filter by state, district, congress number, or current status.

- **URL**: https://apify.com/parseforge/congress-gov-members-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Lead generation, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $19.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.
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

[![ParseForge](https://raw.githubusercontent.com/ParseForge/apify-assets/main/banner.jpg)](https://apify.com/parseforge?fpr=vmoqkp)

### Congress.gov Members Scraper

**Scrape member profiles from Congress.gov by state, district, or congress number, up to a million per run.** Every record returns the member's name, party, chamber, state, district, and official URLs. Export to CSV, JSON, Excel, or XML.

Congress.gov publishes the official biographies and contact details for every sitting and historical member of the U.S. House and Senate, but browsing them one by one takes hours. This Actor reads the member directory directly, letting you pull a clean list filtered by state, district, or congress number. No screen scraping, no manual copy-paste, a structured dataset you can hand off to your team.

| Who uses it | What they scrape Congress.gov for |
|---|---|
| Political researchers | Build a complete roster of members for a specific congress or state. |
| Journalists | Pull contact details and party affiliations for a state delegation ahead of a vote. |
| Advocacy groups | Generate a targeted list of legislators by district for a grassroots campaign. |
| Data analysts | Create a historical dataset of member tenure and party shifts across congresses. |

### What it does

This Actor collects member profiles from Congress.gov and returns each one as a flat row with name, party, chamber, state, district, and official URLs.

- 🗺️ **Filter by state:** pull every member from a single state delegation with the two-letter state code.
- 🏛️ **Filter by congress:** limit results to members who served in a specific congress, like the 118th or 119th.
- 📍 **Filter by district:** target a single House district by number, alone or combined with a state code.
- ⏱️ **Current member toggle:** check one box to return only currently serving members, skipping historical records.
- 🔑 **API key support:** bring your own free congress.gov API key for higher rate limits and faster runs.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with Congress.gov data

**🗳️ Build a state delegation list.**

A campaign staffer sets the state code to TX and the current-member toggle to true, then exports a CSV of every sitting Texas representative and senator with their party and official website.

**📜 Reconstruct a historical congress.**

A political science PhD student sets the congress number to 105 and pulls every member who served in that session to analyze committee assignments and party ratios.

**📰 Find contact details for a news story.**

A reporter sets the state code to OH and the district to 4, gets the member's official URL and party in one row, and uses it to request a comment before deadline.

**📊 Track party representation over time.**

A data analyst runs the Actor for congresses 110 through 118, concatenates the CSVs, and charts the shift in party control by state.

### Why choose this scraper

| | What you get |
|---|---|
| **Official source data** | Every field comes directly from Congress.gov, the authoritative Library of Congress site. |
| **Fixed flat schema** | One row per member, same columns every run, ready for a spreadsheet or database. |
| **No browser needed** | Runs headless on the Apify platform, so you can schedule it and forget it. |
| **Bulk export** | Download as CSV, JSON, Excel, or XML, or pipe the results straight to an API. |

### How it compares

This Actor focuses exclusively on member profiles from Congress.gov, while the competitors below either bundle members with bills and votes or cover a broader set of political data sources.

| Feature | ParseForge | Congress.gov Scraper | Congress.gov Intelligence |
|---|---|---|---|
| Member profiles only (no bills or votes) | Yes, dedicated member scraper | Not listed | Not listed |
| Filter by state code | Yes | Not listed | Yes |
| Filter by district number | Yes | Not listed | Not listed |
| Filter by congress number | Yes | Not listed | Yes |
| Current member only toggle | Yes | Not listed | Not listed |
| Runs without an API key | Yes | Not listed | Not listed |

### Configure the run

Drive the Actor with a state code, congress number, district number, and a current-member toggle, alone or together, and filters run as each member is read so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
 "maxItems": 10
}
```

A larger pull:

```json
{
 "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.021 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $2.10 |
| 1,000 results | $21.00 |
| 10,000 results | $210.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up?fpr=vmoqkp) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up?fpr=vmoqkp).
2. Open the [Congress.gov Members Scraper](https://apify.com/parseforge/congress-gov-members-scraper?fpr=vmoqkp).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to Congress.gov through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=parseforge/congress-gov-members-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

Check that your state code is a valid two-letter abbreviation and that your congress number is correct. If you set both a state code and a district, confirm that district exists in that state. Try removing one filter at a time to see which one is too restrictive.

**The run is slow or timing out.**

Add your free congress.gov API key in the optional field. The key raises the rate limit significantly. Also lower the 'Maximum members' count if you are pulling a very large set.

**I set a district but got a senator in the results.**

The district filter applies only to House members. Senators are returned for the state regardless of the district value. Filter the chamber column in your output to remove Senate rows if you only want House members.

**The 'Currently Serving Only' toggle is not working as expected.**

Make sure you did not also set a past congress number. A congress number from years ago combined with the current-member toggle will return zero results because no one from that old congress is still serving in that same seat.

**My API key is valid but the Actor says it is unauthorized.**

Confirm the key was copied without extra spaces. A new key from api.congress.gov can take a few minutes to activate. Wait a moment and retry.

### FAQ

| Question | Answer |
|---|---|
| Do I need a congress.gov API key? | No, the Actor works without one. Adding your free API key from api.congress.gov raises the rate limit and speeds up large runs. |
| What is a congress number? | Each two-year session of the U.S. Congress gets a number. The 118th Congress ran from 2023 to 2025, and the 119th runs from 2025 to 2027. Leave the field empty to pull members from all available congresses. |
| Can I get only current members? | Yes. Check the 'Currently Serving Only' box and the Actor will skip former members and return only those in office right now. |
| Does this return senators, representatives, or both? | Both. The Actor returns every member of the U.S. House and Senate that matches your filters. The chamber field tells you which one each row belongs to. |
| Can I filter by party? | The input schema does not include a party filter, but the party field is returned in every row. Pull a larger set and filter by party in your spreadsheet or database. |
| What does the district filter do? | It limits results to a single House district number. Senators do not have districts, so a district filter combined with a state code will return only the House member for that district. |
| How many members can I scrape in one run? | You set the maximum with the 'Maximum members' field, up to one million. The Actor stops when it hits that number or runs out of matching members. |
| Can I schedule this to run automatically? | Yes. Apify's scheduler lets you run the Actor daily, weekly, or on a cron expression, so your member list stays current without manual work. |
| What export formats are supported? | CSV, JSON, Excel, and XML. Pick the one your workflow needs, or use the Apify API to push results directly to another system. |
| Is this the same data as the Congress.gov website? | Yes. Every field comes from the official Congress.gov member directory, maintained by the Library of Congress. |

### Related actors

Browse the full [ParseForge collection](https://apify.com/parseforge?fpr=vmoqkp) for more scrapers.

🆘 **Need help?** Email parseforge@protonmail.com with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Library of Congress. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `maxItems` (type: `integer`):

How many members to collect per run.

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

e.g. 118, 119. Leave empty for all.

## `stateCode` (type: `string`):

Two-letter state code (e.g. CA, NY)

## `district` (type: `integer`):

Specific district number

## `currentMember` (type: `boolean`):

Only members currently serving

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

Get a free key at https://api.congress.gov.

## Actor input object example

```json
{
  "maxItems": 10,
  "currentMember": false
}
```

# 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 = {
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/congress-gov-members-scraper").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 = { "maxItems": 10 }

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

```

## MCP server setup

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

```

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/EdKTqoB5IA1eicio5/builds/O1Qvo3x3JAPyKJwzm/openapi.json
