# GovTrack US Congress Scraper (`parseforge/govtrack-congress-scraper`) Actor

Scrapes GovTrack for lawmaker roles, bills, and roll-call votes. Returns flat rows with all public fields. Filter by congress and chamber.

- **URL**: https://apify.com/parseforge/govtrack-congress-scraper.md
- **Developed by:** [ParseForge](https://apify.com/parseforge) (community)
- **Categories:** Business, News, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $29.93 / 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)

### GovTrack US Congress Scraper

**Scrape US Congress data from GovTrack: lawmakers, bills, and roll-call votes, up to a million records per run.** Each record comes in a flat, consistent schema with all public fields. No API key or registration. Export to CSV, JSON, Excel, or XML.

GovTrack's official API was discontinued, and the raw site is built for humans, not data pipelines. This Actor reads the public GovTrack pages directly and returns structured rows for lawmaker roles, legislation, and roll-call votes, filtered by congress number and chamber. It is the fastest way to get congressional data into your spreadsheet or database.

| Who uses it | What they scrape GovTrack for |
|---|---|
| Policy analysts | Tracking which bills are moving in a specific congress |
| Journalists | Getting contact details and voting records for lawmakers |
| Academic researchers | Building datasets of roll-call votes for quantitative analysis |
| Advocacy groups | Monitoring legislation relevant to their cause |

### What it does

This Actor collects lawmaker roles, bills, or roll-call votes from GovTrack and returns each record as a flat row with all public fields.

- 🏛️ **Three entity types:** lawmaker roles, bills, and roll-call votes, each with its own fixed schema.
- 🔢 **Congress filter:** limit results to a specific congress number, from the 1st to the 200th.
- 🏠 **Chamber filter:** choose House, Senate, or both for roles and votes.
- ⏱️ **Current-only toggle:** for roles, return only currently sitting lawmakers.
- 📊 **Flat output:** every record is a single row, ready for CSV, JSON, Excel, or XML.

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

### What you can do with GovTrack data

**📈 Track legislation by congress.**

A policy analyst sets entity to bill and congress to 118 to get every bill introduced in the current session, then filters by chamber to focus on Senate activity.

**🗳️ Analyze roll-call votes.**

A political scientist scrapes all roll-call votes for the 117th Congress and joins them with lawmaker roles to study party discipline.

**📇 Build a lawmaker directory.**

A journalist selects roles with currentOnly true to get a clean list of sitting members, including official contact details for outreach.

**🏛️ Monitor chamber-specific activity.**

An advocacy group filters votes by chamber to track how House members vote on a particular issue, then exports the data for a report.

### Why choose this scraper

|  | What you get |
|---|---|
| **No API key** | GovTrack's API is discontinued; this Actor reads the public site directly. |
| **Up to 1M records** | Paid users can pull up to a million records per run; free users get a 10-record preview. |
| **Consistent schema** | Every entity type returns a flat, predictable row, so you can merge datasets without cleaning. |
| **Export anywhere** | Download as CSV, JSON, Excel, or XML, or push to Apify storage. |

### How it compares

This Actor scrapes GovTrack directly, while the Congress.gov Scraper uses the official Congress.gov API; both return similar congressional data but with different sources and coverage.

| Feature | ParseForge | GovTrack US Congress Scraper | Congress.gov Scraper |
|---|---|---|---|
| Lawmaker roles with contact details | Yes | Yes | Yes |
| Bill metadata | Yes | Yes | Yes |
| Roll-call vote records | Yes | Yes | Not listed |
| Filter by congress number | Yes | Not listed | Not listed |
| Filter by chamber | Yes | Not listed | Not listed |
| Current-only lawmakers | Yes | Not listed | Not listed |
| Committee data | Not listed | Not listed | Yes |

### Configure the run

Drive the Actor by selecting an entity type, then optionally filter by congress number, chamber, and current status. Filters run as each record is read, so only matches reach your dataset. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "entity": "role",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "entity": "role",
  "maxItems": 200
}
```

### Pricing

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

| Results collected | Approximate cost |
|---|---|
| 100 results | $3.99 |
| 1,000 results | $39.90 |
| 10,000 results | $399.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 [GovTrack US Congress Scraper](https://apify.com/parseforge/govtrack-congress-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 GovTrack 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/govtrack-congress-scraper"
```

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

### Troubleshooting

**Why am I getting no results?**

Check your filters. If you set congress to a number that does not exist or chamber to a value that has no records for the selected entity, you will get an empty dataset. Try clearing filters and running again.

**Why did I only get 10 records?**

Free users are limited to 10 records per run as a preview. Upgrade to a paid plan to increase maxItems up to 1,000,000.

**Why is currentOnly ignored for bills?**

The currentOnly filter only applies to lawmaker roles. Bills and votes do not have a current status, so the filter is ignored for those entity types.

**Why does the run fail with a timeout?**

Large requests can take time. Increase the Actor's timeout in the run settings, or reduce maxItems to a smaller number.

**Can I get data from before the 1st Congress?**

No. The congress input has a minimum of 1, which corresponds to the 1st United States Congress (1789-1791).

### FAQ

| Question | Answer |
|---|---|
| Does this Actor use the GovTrack API? | No. GovTrack's API was discontinued, so this Actor scrapes the public GovTrack website directly. You do not need an API key or registration. |
| What is the difference between the three entity types? | Role returns lawmaker roles with contact details and party affiliation. Bill returns legislation metadata like title, sponsor, and status. Vote returns roll-call vote records with totals and individual positions. |
| Can I filter by a specific congress? | Yes. Set the congress input to any number from 1 to 200. Leave it empty to get all congresses. |
| How do I get only current lawmakers? | Set currentOnly to true when entity is role. This returns only currently sitting members. The filter is ignored for bills and votes. |
| What is the maximum number of records I can get? | Free users are limited to 10 records per run as a preview. Paid users can set maxItems up to 1,000,000. |
| Can I filter by chamber? | Yes. Set chamber to house or senate. This applies to roles and votes. Leave it empty for all chambers. |
| What output formats are supported? | You can export the dataset as CSV, JSON, Excel, or XML from the Apify platform. |
| Is the data live? | Yes. Each run scrapes the current GovTrack pages, so you get the latest public information. |
| Can I schedule this Actor to run regularly? | Yes. Use Apify's scheduler to run it daily, weekly, or on a custom cron schedule. |
| Does this Actor handle pagination? | Yes. It automatically follows pagination on GovTrack to collect all matching records up to your maxItems limit. |

### 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 Civic Impulse, LLC. 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

## `entity` (type: `string`):

Which GovTrack endpoint to scrape.

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

Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000

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

Congress number to filter by (e.g. 118 for the 118th Congress). Leave empty for all.

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

Filter by congressional chamber. Applies to roles and votes.

## `currentOnly` (type: `boolean`):

For roles: only currently sitting lawmakers. Ignored for bills and votes.

## Actor input object example

```json
{
  "entity": "role",
  "maxItems": 10,
  "chamber": "",
  "currentOnly": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Overview of scraped data

## `fullData` (type: `string`):

Complete dataset

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

// Run the Actor and wait for it to finish
const run = await client.actor("parseforge/govtrack-congress-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 = {
    "entity": "role",
    "maxItems": 10,
    "chamber": "",
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,parseforge/govtrack-congress-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/p0duGYcsE1eT5bdnu/builds/vT345wIB8uKQPFOqN/openapi.json
