GovTrack US Congress Scraper avatar

GovTrack US Congress Scraper

Pricing

Pay per event

Go to Apify Store
GovTrack US Congress Scraper

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

Stas Persiianenko

Maintained by Community

Actor 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

FieldDescription
entityTyperole, bill, or vote
recordIdStable source identifier or derived key
nameMember name for role records
titleRole title, bill title, or vote title
displayNumberBill display number such as S. 948
descriptionGovTrack description/status text
congressCongress number
sessionVote session/year
chamberHouse or Senate where available
stateState abbreviation for member roles
districtHouse district when applicable
partyMember party
roleTypeSenator or representative
currentWhether a role is current
startDateRole start date
endDateRole end date
introducedDateBill introduction date
statusBill status label
statusDateBill status date
sponsorNameBill sponsor name
questionVote question
resultVote result text
passedWhether the vote passed
totalPlusYes/plus vote total
totalMinusNo/minus vote total
totalOtherOther/present/not voting total
phoneCongressional office phone
officeOffice address/room
websiteOfficial website
contactFormContact form URL
govtrackUrlGovTrack public URL
sourceApiUrlExact API page used
scrapedAtExtraction 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, default
  • members β€” alias for roles
  • bills β€” bill metadata
  • votes β€” 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:

  • 119 is the 2025-2027 Congress
  • 118 is 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

  1. Open the actor on Apify.
  2. Choose a dataset mode.
  3. Add filters such as state, role type, Congress, chamber, or query.
  4. Set maxItems.
  5. Run the actor.
  6. Download the dataset as JSON, CSV, Excel, or through the API.
  7. Schedule the actor if you need recurring updates.

Tips for best results

  • Start with roles mode and current: true if you need legislator contacts.
  • Use state plus roleType for small targeted member exports.
  • Use congress for bills and votes.
  • Use query for simple policy keyword matching.
  • Enable includeRaw only when you need fields not yet normalized.
  • Keep maxItems low while testing.
  • Increase maxItems for 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 ApifyClient
import os
client = 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().items
print(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.
  • query is 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.

Explore other automation-lab actors for public data and monitoring workflows:

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.