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

Scrape US Congress data from GovTrack public API including lawmaker roles (senators / representatives), bills, and roll-call votes with rich biographical metadata (Twitter, YouTube, bioguideid), party, state, district, leadership title, sponsor, current status and more. No API key required.

- **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, 1 monthly users, 100.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Banner](https://github.com/ParseForge/apify-assets/raw/main/banner.jpg)

## 🏛️ GovTrack US Congress Scraper

> 🚀 **Export US Congress data in seconds.** Pull **roles, bills, and roll-call votes** filtered by congress number and chamber. Senators, representatives, committee assignments, contact details, and full legislative metadata. No API key, no registration.

> 🕒 **Last updated:** 2026-05-13 · **📊 3 entity modes** · **🏛️ 119 Congresses** · **🗳️ House + Senate** · **🌐 GovTrack public API**

The **GovTrack US Congress Scraper** queries the [GovTrack.us](https://www.govtrack.us) public REST API and returns rich records across **three entities**: lawmaker roles, bills, and roll-call votes. GovTrack is a non-partisan civic-tech project that has tracked the United States Congress since 2004, archiving every member, bill, amendment, and vote in machine-readable form.

The catalog covers **every congress from the 1st (1789) to the current 119th**, both chambers, and every roll-call vote and bill across more than two centuries of legislative history. This Actor exposes congress and chamber filters at the API level, so chamber-specific or congress-specific exports are fast.

| 🎯 Target Audience | 💡 Primary Use Cases |
|---|---|
| Journalists, policy researchers, advocacy groups, lobbyists, political scientists, civic-tech developers, election analysts, government-affairs teams | Lawmaker contact lists, vote tracking, bill monitoring, committee mapping, longitudinal congressional analysis, civic-app data feeds, accountability dashboards |

---

### 📋 What the GovTrack Scraper does

Three entity modes in a single Actor:

- 👤 **Roles.** Lawmaker roles with person block (name, party, state, district, gender, birthday, bioguide ID, OpenSecrets ID, C-SPAN ID, social IDs), role type (senator / representative), title, leadership position, senator class and rank, start and end dates, current flag, congress numbers, official website, phone, office, mailing address, contact form URL, and RSS feed URL.
- 📜 **Bills.** Bill identifiers, titles, congress, chamber, sponsor, status, introduced and current-status dates, committees, subjects, related bills, summaries, and link to GovTrack and Congress.gov.
- 🗳️ **Votes.** Roll-call votes with chamber, vote number, congress, session, date, result, vote type, related bill or amendment, total counts (Yea / Nay / Present / Not Voting), and individual member positions.

Filter by **congress number** (1 to 119) and **chamber** (House or Senate, `currentOnly` toggle for roles).

> 💡 **Why it matters:** the U.S. Congress publishes data across half a dozen official portals (Congress.gov, GPO, House Clerk, Senate.gov) with no unified API. GovTrack consolidates all of it. This Actor turns that consolidation into a downloadable CSV/JSON in two minutes.

---

### 🎬 Full Demo

_🚧 Coming soon: a 3-minute walkthrough showing how to go from sign-up to a downloaded Congress dataset._

---

### ⚙️ Input

<table>
<thead>
<tr><th>Input</th><th>Type</th><th>Default</th><th>Behavior</th></tr>
</thead>
<tbody>
<tr><td><code>entity</code></td><td>enum</td><td><code>"role"</code></td><td>One of <code>role</code>, <code>bill</code>, <code>vote</code>.</td></tr>
<tr><td><code>maxItems</code></td><td>integer</td><td><code>10</code></td><td>Records to return. Free plan caps at 10, paid plan at 1,000,000.</td></tr>
<tr><td><code>congress</code></td><td>integer</td><td>(empty)</td><td>Congress number (1-119). Empty = all.</td></tr>
<tr><td><code>chamber</code></td><td>string</td><td><code>""</code></td><td>One of <code>house</code> or <code>senate</code>. Empty = both.</td></tr>
<tr><td><code>currentOnly</code></td><td>boolean</td><td><code>true</code></td><td>Roles only: limit to currently sitting members.</td></tr>
</tbody>
</table>

**Example: every current senator.**

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

**Example: bills introduced in the 118th Congress House.**

```json
{
    "entity": "bill",
    "congress": 118,
    "chamber": "house",
    "maxItems": 1000
}
```

> ⚠️ **Good to Know:** chamber routing differs by entity. Roles map `chamber` to `role_type` (`senate` to `senator`, `house` to `representative`). Bills repeat the `bill_type` query parameter four times for the chamber's bill subtypes (e.g. `hr`, `hjres`, `hconres`, `hres` for House). Votes use the `chamber` parameter directly. The Actor handles this routing for you so the same `chamber` input works across all three modes. Senators carry `senator_class` (class1, class2, class3) and `senator_rank` (junior / senior) directly.

***

### 📊 Output

Output shape varies by entity. Each role record carries roughly 30 fields; bills and votes carry their own native schemas.

#### 🧾 Roles schema (selected fields)

| Field | Type | Example |
|---|---|---|
| 🆔 `id` | string | `"C001035"` (bioguide ID) |
| 👤 `person` | object | Full person block (name, gender, birthday, social IDs) |
| 📍 `state` | string | `"ME"` |
| 🎉 `party` | string | `"Republican"` |
| 🏛️ `role_type` | string | `"senator"` or `"representative"` |
| 📜 `title` | string | `"Sen."` |
| 👔 `leadership_title` | string | null | `"Senate Minority Whip"` |
| 🎓 `senator_class` | string | `"class2"` |
| 🏅 `senator_rank` | string | `"senior"` |
| 📅 `startdate` | string | `"2021-01-03"` |
| 🗓️ `enddate` | string | `"2027-01-03"` |
| ✅ `current` | boolean | `true` |
| 🔢 `congress_numbers` | number\[] | `[117, 118, 119]` |
| 🌐 `website` | string | `"https://www.collins.senate.gov"` |
| ☎️ `phone` | string | `"202-224-2523"` |
| 🏢 `office` | string | `"413 Dirksen Senate Office Building"` |
| 📬 `address` | string | full mailing address |
| 📝 `contact_form` | string | URL |
| 📡 `rss_url` | string | URL |
| 🕒 `scrapedAt` | ISO 8601 | `"2026-05-13T22:26:21.663Z"` |

#### 📦 Sample records

<details>
<summary><strong>👤 Senator: Susan Collins (R-ME, Class 2)</strong></summary>

```json
{
    "id": "C001035",
    "person": {
        "firstname": "Susan",
        "lastname": "Collins",
        "name": "Sen. Susan Collins [R-ME]",
        "sortname": "Collins, Susan (Sen.) [R-ME]",
        "gender": "female",
        "birthday": "1952-12-07",
        "twitterid": "SenatorCollins",
        "youtubeid": "SenatorSusanCollins",
        "link": "https://www.govtrack.us/congress/members/susan_collins/300025",
        "bioguideid": "C001035",
        "osid": "N00000491",
        "cspanid": 45738
    },
    "state": "ME",
    "party": "Republican",
    "role_type": "senator",
    "title": "Sen.",
    "description": "Senior Senator for Maine",
    "leadership_title": null,
    "senator_class": "class2",
    "senator_rank": "senior",
    "startdate": "2021-01-03",
    "enddate": "2027-01-03",
    "current": true,
    "congress_numbers": [117, 118, 119],
    "website": "https://www.collins.senate.gov",
    "phone": "202-224-2523",
    "office": "413 Dirksen Senate Office Building",
    "contact_form": "https://www.collins.senate.gov/contact",
    "scrapedAt": "2026-05-13T22:26:21.663Z"
}
```

</details>

<details>
<summary><strong>👤 Senate Minority Whip: Dick Durbin (D-IL)</strong></summary>

```json
{
    "id": "D000563",
    "person": {
        "name": "Sen. Richard Durbin [D-IL]",
        "gender": "male",
        "birthday": "1944-11-21",
        "bioguideid": "D000563",
        "osid": "N00004981"
    },
    "state": "IL",
    "party": "Democrat",
    "role_type": "senator",
    "leadership_title": "Senate Minority Whip",
    "senator_class": "class2",
    "senator_rank": "senior",
    "startdate": "2021-01-03",
    "current": true,
    "congress_numbers": [117, 118, 119],
    "phone": "202-224-2152"
}
```

</details>

<details>
<summary><strong>👤 Senator John Cornyn (R-TX)</strong></summary>

```json
{
    "id": "C001056",
    "person": {
        "name": "Sen. John Cornyn [R-TX]",
        "twitterid": "JohnCornyn",
        "bioguideid": "C001056"
    },
    "state": "TX",
    "party": "Republican",
    "role_type": "senator",
    "senator_class": "class2",
    "senator_rank": "senior",
    "startdate": "2021-01-03",
    "current": true,
    "website": "https://www.cornyn.senate.gov",
    "phone": "202-224-2934"
}
```

</details>

***

### ✨ Why choose this Actor

| | Capability |
|---|---|
| 🏛️ | **Three entities.** Roles, bills, and roll-call votes in one Actor. |
| 🎯 | **Server-side filters.** Congress, chamber, and current-only filters run at the API level. |
| 📞 | **Full contact block.** Phone, office address, contact form URL, official website, and RSS feed for every role. |
| 🎓 | **Senator class + rank.** Class 1/2/3 and junior/senior labels surfaced directly. |
| 👔 | **Leadership titles.** Whip, leader, and chair positions captured as text. |
| ⚡ | **Fast.** REST pagination with offset, page size up to 600 per page. |
| 🚫 | **No authentication.** Works on the public GovTrack API. No login or API key. |

> 📊 GovTrack has tracked Congress since 2004 and is the canonical open-data source for U.S. federal legislative activity.

***

### 📈 How it compares to alternatives

| Approach | Cost | Coverage | Refresh | Filters | Setup |
|---|---|---|---|---|---|
| **⭐ GovTrack Scraper** *(this Actor)* | $5 free credit, then pay-per-use | Full Congress | **Live per run** | congress, chamber, entity | ⚡ 2 min |
| Hand-rolled GovTrack queries | Free | Full | Manual | Manual | 🐢 Days |
| ProPublica Congress API | Free with key | Full | Live | Many | ⏳ Hours |
| Congress.gov manual download | Free | Full | Manual | Limited | 🕒 Variable |

Pick this Actor when you want broad Congress coverage, ready-built role + bill + vote modes, and no pipeline maintenance.

***

### 🚀 How to use

1. 📝 **Sign up.** [Create a free account with $5 credit](https://console.apify.com/sign-up?fpr=vmoqkp) (takes 2 minutes).
2. 🌐 **Open the Actor.** Go to the GovTrack US Congress Scraper page on the Apify Store.
3. 🎯 **Set input.** Pick an entity, set the congress number and chamber, and choose `maxItems`.
4. 🚀 **Run it.** Click **Start** and let the Actor collect your data.
5. 📥 **Download.** Grab your results in the **Dataset** tab as CSV, Excel, JSON, or XML.

> ⏱️ Total time from signup to downloaded dataset: **3-5 minutes.** No coding required.

***

### 💼 Business use cases

<table>
<tr>
<td width="50%" valign="top">

#### 📰 Journalism & Civic Reporting

- Member-of-Congress contact directories
- Vote-tracking dashboards by bill
- Leadership-change monitoring
- Cross-Congress longitudinal stories

</td>
<td width="50%" valign="top">

#### 🏢 Lobbying & Government Affairs

- Outreach lists for advocacy campaigns
- Bill-status feeds for client briefings
- Committee-assignment monitoring
- Constituent-mapping by state and district

</td>
</tr>
<tr>
<td width="50%" valign="top">

#### 🎓 Political Science & Research

- Voting-behavior datasets across decades
- Party-line vs cross-party voting analyses
- Bill-co-sponsorship network analysis
- Demographic trends in Congress

</td>
<td width="50%" valign="top">

#### 🤖 Civic Tech & Public Apps

- Civic-engagement apps with live data feeds
- Citizen-contact widgets with prefilled forms
- Election-prep voter guides
- Accountability dashboards for non-profits

</td>
</tr>
</table>

***

### 🔌 Automating GovTrack Scraper

Control the scraper programmatically for scheduled runs and pipeline integrations:

- 🟢 **Node.js.** Install the `apify-client` NPM package.
- 🐍 **Python.** Use the `apify-client` PyPI package.
- 📚 See the [Apify API documentation](https://docs.apify.com/api/v2) for full details.

The [Apify Schedules feature](https://docs.apify.com/platform/schedules) lets you trigger this Actor on any cron interval. Daily refreshes catch every new bill, every new vote, and every roster change.

***

### 🌟 Beyond business use cases

Data like this powers more than commercial workflows. The same structured records support research, education, civic projects, and personal initiatives.

<table>
<tr>
<td width="50%">

#### 🎓 Research and academia

- Reproducible legislative-behavior studies with versioned dataset pulls
- Teaching datasets for political-science coursework
- Open-source accountability research
- Cross-database joins with FEC and OpenSecrets

</td>
<td width="50%">

#### 🎨 Personal and creative

- Indie civic-engagement apps
- Educational dashboards for high-school civics
- Personal "call your senator" widgets
- Hobbyist Congress-tracking trackers

</td>
</tr>
<tr>
<td width="50%">

#### 🤝 Non-profit and civic

- Voter-engagement campaigns with current lawmaker data
- Accountability tools for advocacy non-profits
- Public-domain legislative-tracking apps
- Civic-transparency dashboards

</td>
<td width="50%">

#### 🧪 Experimentation

- Train voting-prediction models on roll-call data
- Prototype agentic tools that resolve bioguide IDs
- Benchmark NLP libraries on bill text
- Generate Congress embeddings for retrieval apps

</td>
</tr>
</table>

***

### 🤖 Ask an AI assistant about this scraper

Open a ready-to-send prompt about this ParseForge actor in the AI of your choice:

- 💬 [**ChatGPT**](https://chat.openai.com/?q=How%20do%20I%20use%20the%20GovTrack%20US%20Congress%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🧠 [**Claude**](https://claude.ai/new?q=How%20do%20I%20use%20the%20GovTrack%20US%20Congress%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🔍 [**Perplexity**](https://perplexity.ai/search?q=How%20do%20I%20use%20the%20GovTrack%20US%20Congress%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)
- 🅒 [**Copilot**](https://copilot.microsoft.com/?q=How%20do%20I%20use%20the%20GovTrack%20US%20Congress%20Scraper%20by%20ParseForge%20on%20Apify%3F%20Show%20me%20input%20examples%2C%20output%20fields%2C%20common%20use%20cases%2C%20and%20how%20to%20integrate%20it%20into%20a%20workflow.)

***

### ❓ Frequently Asked Questions

#### 🧩 How does it work?

Pick an entity (role / bill / vote), set congress and chamber filters, click Start, and the Actor hits the GovTrack REST API with server-side filters and pagination. Records are emitted as clean JSON ready for download. No browser automation, no captchas, no setup.

#### 🏛️ Where does the data come from?

Directly from the GovTrack.us public API at `www.govtrack.us/api/v2`. GovTrack is operated by Civic Impulse, LLC and has consolidated U.S. federal legislative data since 2004.

#### 🔢 Which Congresses are covered?

Every Congress from the 1st (1789) through the current 119th. Older roles, bills, and votes were back-filled by GovTrack from historical records.

#### 🗳️ Does it include individual votes by member?

Yes, when you query the vote entity. The full voter list (Yea / Nay / Present / Not Voting) is part of each roll-call vote record. The roles entity returns lawmaker biographies; bill and vote entities surface the rest.

#### 📞 Does the role record include phone and office address?

Yes. Currently sitting members carry phone, office, address, contact form URL, and RSS feed. Historical roles may omit some of these depending on when the member served.

#### 🔁 How often is the dataset refreshed?

GovTrack ingests new bills and votes within hours of their official publication and updates member rosters at the start of each Congress. Every run of this Actor pulls live, so your dataset reflects current GovTrack data at run time.

#### 🆔 What ID conventions are used?

Members carry a Library-of-Congress `bioguideid` (e.g. `C001035`), OpenSecrets `osid`, and C-SPAN `cspanid`. Bills carry GovTrack IDs of the form `hr123-118`. Votes carry chamber + congress + session + vote number tuples.

#### ⏰ Can I schedule regular runs?

Yes. Use Apify Schedules to run this Actor on any cron interval (hourly, daily) and keep a downstream civic database in sync.

#### ⚖️ Is this data legal to use?

Yes. U.S. federal legislative data is in the public domain. GovTrack republishes it under permissive terms. Review GovTrack's terms of service for your specific use case, especially for commercial redistribution at scale.

#### 💳 Do I need a paid Apify plan to use this Actor?

No. The free Apify plan is enough for testing and small runs (10 records per run). A paid plan lifts the limit and unlocks scheduling, higher concurrency, and larger datasets.

#### 🧪 What if I need state-level legislative data?

This Actor covers only the U.S. Congress. For state legislatures, reach out via the contact form below to request a companion state-level scraper.

#### 🆘 What if I need help?

Our support team is here to help. Contact us through the Apify platform or use the Tally form linked below.

***

### 🔌 Integrate with any app

GovTrack Scraper connects to any cloud service via [Apify integrations](https://apify.com/integrations):

- [**Make**](https://docs.apify.com/platform/integrations/make) - Automate multi-step workflows
- [**Zapier**](https://docs.apify.com/platform/integrations/zapier) - Connect with 5,000+ apps
- [**Slack**](https://docs.apify.com/platform/integrations/slack) - Get vote and bill alerts in your channels
- [**Airbyte**](https://docs.apify.com/platform/integrations/airbyte) - Pipe Congress data into your warehouse
- [**GitHub**](https://docs.apify.com/platform/integrations/github) - Trigger runs from commits and releases
- [**Google Drive**](https://docs.apify.com/platform/integrations/drive) - Export datasets straight to Sheets

You can also use webhooks to trigger downstream actions when a run finishes. Push fresh roll-call vote data into your accountability dashboard, or alert your team in Slack when a watched bill moves.

***

### 🔗 Recommended Actors

- [**🏥 FINRA BrokerCheck Scraper**](https://apify.com/parseforge/finra-brokercheck-scraper) - U.S. broker and firm regulatory disclosures
- [**🛠️ Texas State Licensed Contractor Scraper**](https://apify.com/parseforge/tdlr-texas-scraper) - Texas TDLR contractor licenses
- [**🏗️ California CSLB Contractor Scraper**](https://apify.com/parseforge/cslb-california-scraper) - California State Licensing Board records
- [**📈 Smart Apify Actor Scraper**](https://apify.com/parseforge/smart-apify-actor-scraper) - Apify Store actor metadata and quality signals

> 💡 **Pro Tip:** browse the complete [ParseForge collection](https://apify.com/parseforge) for more reference-data scrapers.

***

**🆘 Need Help?** [**Open our contact form**](https://tally.so/r/BzdKgA) to request a new scraper, propose a custom data project, or report an issue.

***

> **⚠️ Disclaimer:** this Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by GovTrack.us, Civic Impulse LLC, or the United States Congress. All trademarks mentioned are the property of their respective owners. Only publicly available open legislative data is collected.

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=parseforge/govtrack-congress-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "GovTrack US Congress Scraper",
        "description": "Scrape US Congress data from GovTrack public API including lawmaker roles (senators / representatives), bills, and roll-call votes with rich biographical metadata (Twitter, YouTube, bioguideid), party, state, district, leadership title, sponsor, current status and more. No API key required.",
        "version": "0.0",
        "x-build-id": "wxUUxzqPSMVHepHs2"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/parseforge~govtrack-congress-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-parseforge-govtrack-congress-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/parseforge~govtrack-congress-scraper/runs": {
            "post": {
                "operationId": "runs-sync-parseforge-govtrack-congress-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/parseforge~govtrack-congress-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-parseforge-govtrack-congress-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "entity": {
                        "title": "Entity",
                        "enum": [
                            "role",
                            "bill",
                            "vote"
                        ],
                        "type": "string",
                        "description": "Which GovTrack endpoint to scrape.",
                        "default": "role"
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 1,
                        "maximum": 1000000,
                        "type": "integer",
                        "description": "Free users: Limited to 10 items (preview). Paid users: Optional, max 1,000,000"
                    },
                    "congress": {
                        "title": "Congress Number",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Congress number to filter by (e.g. 118 for the 118th Congress). Leave empty for all."
                    },
                    "chamber": {
                        "title": "Chamber",
                        "enum": [
                            "",
                            "house",
                            "senate"
                        ],
                        "type": "string",
                        "description": "Filter by congressional chamber. Applies to roles and votes.",
                        "default": ""
                    },
                    "currentOnly": {
                        "title": "Current Only",
                        "type": "boolean",
                        "description": "For roles: only currently sitting lawmakers. Ignored for bills and votes.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
