GovTrack US Congress Scraper
Pricing
Pay per event
GovTrack US Congress Scraper
Extract U.S. Congress members, official contact details, bill metadata, and vote records from GovTrack for policy monitoring.
Pricing
Pay per event
Rating
0.0
(0)
Developer
Stas Persiianenko
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Extract structured U.S. Congress member roles, legislator contact details, bill metadata, and roll-call vote records from the public GovTrack API.
Use this actor when you need repeatable Congress data exports for public-affairs monitoring, government relations, journalism, civic research, compliance research, CRM enrichment, or policy analytics.
What does GovTrack US Congress Scraper do?
GovTrack US Congress Scraper turns GovTrack's public JSON API into clean Apify datasets.
It can extract:
- πΊπΈ Current or historical member role records
- π§ββοΈ Senator and representative names
- ποΈ State, district, party, role type, and term dates
- βοΈ Office phone numbers and office locations
- π Official websites, contact forms, and GovTrack profile URLs
- π Bill numbers, titles, sponsors, current status, and dates
- π³οΈ Vote questions, results, chamber, session, and totals
- π§Ύ Source API URLs and scrape timestamps for auditing
Who is it for?
This scraper is useful for teams that repeatedly need normalized Congress data.
Common users include:
- π’ Government affairs teams tracking legislators and bills
- π° Journalists building Congress datasets for reporting
- π§ͺ Civic-tech researchers analyzing public legislative data
- βοΈ Compliance teams monitoring legislation by Congress or chamber
- π£ Advocacy teams enriching outreach lists with official contact details
- π Data teams feeding BI dashboards or warehouses
- π€ AI builders creating RAG datasets about Congress
Why use this actor?
GovTrack provides useful public API endpoints, but users still need pagination, filtering, export formatting, and repeatable runs.
This actor handles that operational layer on Apify.
Benefits:
- No browser automation required
- No login or API key required
- Pagination handled automatically
- Clean tabular dataset output
- Optional raw JSON for advanced users
- PPE pricing for pay-per-result workflows
- Easy scheduling and integrations through Apify
Data you can extract
| Field | Description |
|---|---|
entityType | role, bill, or vote |
recordId | Stable source identifier or derived key |
name | Member name for role records |
title | Role title, bill title, or vote title |
displayNumber | Bill display number such as S. 948 |
description | GovTrack description/status text |
congress | Congress number |
session | Vote session/year |
chamber | House or Senate where available |
state | State abbreviation for member roles |
district | House district when applicable |
party | Member party |
roleType | Senator or representative |
current | Whether a role is current |
startDate | Role start date |
endDate | Role end date |
introducedDate | Bill introduction date |
status | Bill status label |
statusDate | Bill status date |
sponsorName | Bill sponsor name |
question | Vote question |
result | Vote result text |
passed | Whether the vote passed |
totalPlus | Yes/plus vote total |
totalMinus | No/minus vote total |
totalOther | Other/present/not voting total |
phone | Congressional office phone |
office | Office address/room |
website | Official website |
contactForm | Contact form URL |
govtrackUrl | GovTrack public URL |
sourceApiUrl | Exact API page used |
scrapedAt | Extraction timestamp |
How much does it cost to scrape GovTrack Congress data?
This actor uses pay-per-event pricing.
There is a small start event for each run and a per-item event for each saved dataset row.
You control cost with maxItems.
Examples:
- A 25-row smoke test is inexpensive.
- A 100-row export validates a realistic workflow.
- A 500+ row run can collect larger bill or vote batches.
Actual billing appears in your Apify run details.
Input options
mode
Choose the GovTrack dataset:
rolesβ member role records, defaultmembersβ alias forrolesbillsβ bill metadatavotesβ vote metadata
maxItems
Maximum dataset rows to save.
Use small numbers for first tests and larger numbers for scheduled exports.
current
For roles mode, set true to return current members only.
state
Filter roles by a two-letter state abbreviation such as CA, TX, NY, or ME.
party
Filter roles by party, for example Democrat, Republican, or Independent.
roleType
Filter roles to senator or representative.
congress
Filter bills or votes by Congress number.
For example:
119is the 2025-2027 Congress118is the 2023-2025 Congress
session
Optional vote session/year, such as 2023 or 2024.
chamber
Optional vote chamber: house or senate.
query
Client-side text match over normalized names, bill titles, vote questions, sponsors, and statuses.
This is useful for narrowing broad API exports without relying on undocumented source search parameters.
includeRaw
Set to true to include the original GovTrack JSON object on every row.
Leave it off for clean spreadsheets.
Example input: current California members
{"mode": "roles","current": true,"state": "CA","maxItems": 60}
Example input: 119th Congress bills
{"mode": "bills","congress": 119,"maxItems": 100}
Example input: Senate votes matching a keyword
{"mode": "votes","congress": 118,"chamber": "senate","query": "nomination","maxItems": 100}
Example output
{"entityType": "role","recordId": "C001035","name": "Sen. Susan Collins [R-ME]","title": "Senator","description": "Senior Senator for Maine","congress": 119,"state": "ME","party": "Republican","roleType": "senator","current": true,"phone": "202-224-2523","website": "https://www.collins.senate.gov","govtrackUrl": "https://www.govtrack.us/congress/members/susan_collins/300025","sourceApiUrl": "https://www.govtrack.us/api/v2/role?...","scrapedAt": "2026-07-02T00:00:00.000Z"}
How to use the scraper
- Open the actor on Apify.
- Choose a dataset mode.
- Add filters such as state, role type, Congress, chamber, or query.
- Set
maxItems. - Run the actor.
- Download the dataset as JSON, CSV, Excel, or through the API.
- Schedule the actor if you need recurring updates.
Tips for best results
- Start with
rolesmode andcurrent: trueif you need legislator contacts. - Use
stateplusroleTypefor small targeted member exports. - Use
congressfor bills and votes. - Use
queryfor simple policy keyword matching. - Enable
includeRawonly when you need fields not yet normalized. - Keep
maxItemslow while testing. - Increase
maxItemsfor production exports.
Integrations
You can connect this actor to:
- Google Sheets for public-affairs contact lists
- Airtable for advocacy operations
- BigQuery or Snowflake for policy analytics
- Slack alerts for scheduled monitoring
- CRM systems for legislator outreach context
- RAG pipelines for Congress-focused AI assistants
- Apify webhooks for downstream automation
API usage with Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('automation-lab/govtrack-congress-scraper').call({mode: 'roles',current: true,state: 'CA',maxItems: 60,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
API usage with Python
from apify_client import ApifyClientimport osclient = ApifyClient(os.environ['APIFY_TOKEN'])run = client.actor('automation-lab/govtrack-congress-scraper').call(run_input={'mode': 'bills','congress': 119,'maxItems': 100,})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items[:3])
API usage with cURL
curl -X POST "https://api.apify.com/v2/acts/automation-lab~govtrack-congress-scraper/runs?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' \-d '{"mode":"votes","congress":118,"chamber":"senate","maxItems":100}'
MCP usage
Use the Apify MCP server to call this actor from Claude Code, Claude Desktop, or another MCP-compatible client.
MCP tool URL:
https://mcp.apify.com/?tools=automation-lab/govtrack-congress-scraper
Claude Code setup:
$claude mcp add apify https://mcp.apify.com/?tools=automation-lab/govtrack-congress-scraper
Claude Desktop JSON config:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?tools=automation-lab/govtrack-congress-scraper"}}}
Example prompts:
- "Run the GovTrack Congress scraper for current California members and summarize party distribution."
- "Extract 100 bills from the 119th Congress and list sponsors with current status."
- "Scrape Senate vote records matching nomination and return a CSV-ready table."
Scheduling workflows
GovTrack data is useful on a recurring schedule.
Suggested schedules:
- Daily bill status export for a tracked Congress
- Weekly current member contact refresh
- Daily vote export during active sessions
- Monthly archive of all current roles by state
Data freshness
The actor reads live public GovTrack API responses at run time.
Freshness therefore depends on GovTrack's own update cadence.
Each row includes scrapedAt so you can audit when your copy was collected.
Limitations
- The actor does not scrape private or authenticated sources.
- It does not guarantee GovTrack API completeness.
- Some optional fields may be missing for older records.
queryis a simple client-side text filter, not semantic search.- Bill and vote endpoint fields may differ across older Congress sessions.
Legality
GovTrack exposes public civic information through public pages and JSON API endpoints.
You should still use the data responsibly, respect GovTrack's terms, avoid abusive request volumes, and comply with laws that apply to your use case.
This actor is designed for moderate, paginated API access and transparent source attribution.
FAQ
Can I scrape current members only?
Yes. Use mode: "roles" with current: true. Add state, party, or roleType to narrow the export.
Can I export bills and votes too?
Yes. Use mode: "bills" with a congress number, or mode: "votes" with congress, session, and chamber filters.
Troubleshooting
I received fewer rows than maxItems
The source endpoint may have fewer matching records, or your filters/query may be narrow.
Try removing query, broadening state/chamber filters, or selecting a different Congress.
My role export has empty district values
Senators do not have House districts, so district is normally null for Senate roles.
I need a GovTrack field not shown in the table
Enable includeRaw to get the full GovTrack JSON object, then map the field in your downstream workflow.
Related scrapers
Explore other automation-lab actors for public data and monitoring workflows:
- https://apify.com/automation-lab/website-contact-finder
- https://apify.com/automation-lab/bulk-url-status-checker
- https://apify.com/automation-lab/google-news-scraper
Support
If you need another GovTrack endpoint, a new normalized field, or a workflow-specific export shape, open an Apify issue on the actor.
Changelog
0.1
Initial version with roles/members, bills, and votes modes.