Congress Bill Search
Pricing
from $2.00 / 1,000 bill fetcheds
Congress Bill Search
Search US Congress bills and legislation via the official Congress.gov API. Filter by congress session, bill type, and date range. Extract sponsors, party, policy areas, and latest actions as structured JSON.
Pricing
from $2.00 / 1,000 bill fetcheds
Rating
0.0
(0)
Developer

ryan clinton
Actor stats
0
Bookmarked
1
Total users
0
Monthly active users
4 hours ago
Last modified
Categories
Share
Search and retrieve US congressional bills and legislation from the official Congress.gov API v3. This Apify actor provides structured, machine-readable data on every bill introduced in the United States Congress, from the 1st Congress in 1789 through the current 119th session. Look up a single bill by number or browse thousands of bills with filtering by congress session, bill type, date range, and sort order -- all with automatic pagination and optional sponsor/policy enrichment.
Why use Congress Bill Search?
Manually browsing Congress.gov is fine for reading one bill, but it falls apart when you need structured data at scale. The raw API requires managing pagination offsets, stitching together list and detail endpoints, and formatting dates correctly. This actor handles all of that for you. It returns clean, flat JSON records with direct Congress.gov links, sponsor metadata, and policy area classifications. You can schedule it to run daily, trigger it from code, or export results to CSV, Google Sheets, or a data warehouse -- no Congress.gov API pagination logic required.
Key features
- Single bill lookup -- Provide a congress number, bill type, and bill number to retrieve full details on one specific piece of legislation in under two seconds.
- Bulk browse mode -- List bills across any congress session with automatic offset-based pagination, fetching up to 500 bills per run.
- All eight bill types -- House Bills (H.R.), Senate Bills (S.), House and Senate Joint Resolutions, Concurrent Resolutions, and Simple Resolutions.
- Date range filtering -- Narrow results to bills updated within a specific time window using ISO date parameters.
- Optional detail enrichment -- Toggle on sponsor name, party affiliation, home state, introduced date, and policy area classification per bill.
- Direct Congress.gov URLs -- Every record includes a constructed link to the bill page on Congress.gov for human reference.
- Automatic pagination -- The actor manages API offsets internally, fetching up to 250 bills per page until your requested limit is reached.
- Graceful error handling -- If a detail lookup fails for a specific bill, the actor falls back to list-level data and continues processing instead of aborting the run.
- Export-ready output -- Flat JSON records with no nested objects, ready for direct export to CSV, Google Sheets, or any tabular format.
How to use Congress Bill Search
- Get a free API key. Sign up at https://api.congress.gov/sign-up/. The key is issued immediately by email and costs nothing. No credit card or government affiliation required.
- Open the actor on Apify. Navigate to Congress Bill Search and click "Try for free" to open the input configuration page.
- Enter your API key. Paste your Congress.gov API key into the "Congress.gov API Key" field. The key is stored securely and never exposed in logs or output.
- Set your filters. Choose a congress session number, bill type, date range, or leave all optional fields empty to browse the most recently updated bills across all sessions.
- Enable details if needed. Check "Include Bill Details" to enrich each result with sponsor name, party, state, introduced date, and policy area classification. This makes one extra API call per bill, so runs take longer.
- Run the actor. Click "Start" and wait for results to appear in the output tab. Download your dataset in JSON, CSV, XML, or Excel format, or access it programmatically via the Apify API.
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
apiKey | string | Yes | -- | Free Congress.gov API key from api.congress.gov/sign-up |
congress | integer | No | All | Congress session number (e.g., 119 for current, 118 for previous) |
billType | string | No | All Types | Bill type code: hr, s, hjres, sjres, hconres, sconres, hres, sres |
billNumber | integer | No | -- | Specific bill number (requires both congress and billType) |
fromDate | string | No | -- | Start date for update-date filtering (YYYY-MM-DD) |
toDate | string | No | -- | End date for update-date filtering (YYYY-MM-DD) |
sortOrder | string | No | updateDate+desc | Sort order: updateDate+desc (newest first) or updateDate+asc (oldest first) |
includeDetails | boolean | No | false | Fetch sponsor, party, state, policy area, and introduced date per bill |
maxResults | integer | No | 50 | Maximum bills to return (1--500) |
Bill type reference:
| Code | Full Name | Chamber |
|---|---|---|
hr | House Bill (H.R.) | House |
s | Senate Bill (S.) | Senate |
hjres | House Joint Resolution (H.J.Res.) | House |
sjres | Senate Joint Resolution (S.J.Res.) | Senate |
hconres | House Concurrent Resolution (H.Con.Res.) | House |
sconres | Senate Concurrent Resolution (S.Con.Res.) | Senate |
hres | House Simple Resolution (H.Res.) | House |
sres | Senate Simple Resolution (S.Res.) | Senate |
Input example
{"apiKey": "YOUR_FREE_API_KEY","congress": 119,"billType": "hr","fromDate": "2025-01-01","toDate": "2025-12-31","sortOrder": "updateDate+desc","includeDetails": true,"maxResults": 100}
Tips for best results
- Start without details. Run with
includeDetailsset tofalsefirst for faster results. Enable it only when you need sponsor and policy area data. - Use date ranges to limit scope. Setting
fromDateavoids pulling the entire history of a congress session and keeps runs fast. - Combine congress and bill type. Specifying both narrows the API path and reduces unnecessary data transfer.
- Single bill lookup is instant. When you know the exact congress, type, and number, the actor returns in under two seconds with full details -- no need to browse.
- Schedule regular runs. Use Apify Schedules to run the actor daily or weekly to build a continuously updated legislative monitoring dataset.
- Use CSV export for spreadsheets. The flat output structure (no nested objects) exports cleanly to CSV for use in Excel, Google Sheets, or any tabular analysis tool.
- Chain with other actors. Combine this actor with the Federal Register Search or FEC Campaign Finance Search to build comprehensive government data pipelines.
Output
Each bill in the output dataset is a flat JSON object with 16 fields. When includeDetails is disabled, five fields (sponsor, sponsorParty, sponsorState, introducedDate, policyArea) return null because the list endpoint does not include this data.
Output example
{"billId": "HR-1234-119","congress": 119,"billType": "HR","billNumber": "1234","title": "To amend the Internal Revenue Code of 1986 to provide tax relief for middle-income families.","originChamber": "House","introducedDate": "2025-02-15","latestActionDate": "2025-03-10","latestActionText": "Referred to the Committee on Ways and Means.","sponsor": "Rep. Smith, John [R-TX-3]","sponsorParty": "R","sponsorState": "TX","policyArea": "Taxation","updateDate": "2025-03-10T14:30:00Z","congressGovUrl": "https://www.congress.gov/bill/119th-congress/house-bill/1234","extractedAt": "2025-03-15T12:00:00.000Z"}
Output fields
| Field | Type | Description |
|---|---|---|
billId | string | Composite identifier in format {TYPE}-{NUMBER}-{CONGRESS} (e.g., HR-1234-119) |
congress | integer | Congress session number |
billType | string | Legislation type code (HR, S, HJRES, SJRES, HCONRES, SCONRES, HRES, SRES) |
billNumber | string | Bill number within its type and congress |
title | string | Official bill title |
originChamber | string | Chamber where the bill was introduced (House or Senate) |
introducedDate | string/null | Date the bill was introduced (YYYY-MM-DD). Null unless includeDetails is enabled. |
latestActionDate | string | Date of the most recent action on the bill |
latestActionText | string | Description of the most recent action |
sponsor | string/null | Primary sponsor name and identifier. Null unless includeDetails is enabled. |
sponsorParty | string/null | Sponsor party affiliation (R, D, I). Null unless includeDetails is enabled. |
sponsorState | string/null | Sponsor state abbreviation. Null unless includeDetails is enabled. |
policyArea | string/null | Policy area classification (e.g., Taxation, Health). Null unless includeDetails is enabled. |
updateDate | string | ISO 8601 timestamp of the last update |
congressGovUrl | string | Direct link to the bill page on Congress.gov |
extractedAt | string | ISO 8601 timestamp of when the data was extracted |
Use cases
- Policy research -- Academics and think tanks can build structured datasets of legislation by session, sponsor, or policy area for longitudinal trend analysis across decades of congressional activity.
- Government affairs monitoring -- Lobbyists and advocacy organizations can schedule daily runs to track new bills by chamber, type, or date range and stay ahead of regulatory changes before they gain momentum.
- Civic tech applications -- Developers building legislative dashboards, voter education platforms, or government transparency tools can use this actor as a reliable, structured data pipeline with direct Congress.gov links.
- Data journalism -- Reporters can quickly assemble datasets of bills by sponsor, party, or chamber for investigative stories on legislative productivity, partisan patterns, or policy focus areas.
- Competitive intelligence -- Companies in regulated industries (healthcare, finance, energy, tech) can monitor legislation relevant to their sector by combining policy area data with date range filtering.
- Academic research -- Political scientists studying legislative behavior, partisan dynamics, or institutional productivity can build longitudinal datasets spanning multiple congresses from a single, repeatable workflow.
API and integration
You can trigger this actor programmatically using the Apify API, any of the official Apify client libraries (Python, JavaScript), or via direct HTTP calls. The actor ID is 9fFHwTkD3V1HOyhYd.
Python
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run = client.actor("ryanclinton/congress-bill-search").call(run_input={"apiKey": "YOUR_CONGRESS_API_KEY","congress": 119,"billType": "hr","includeDetails": True,"maxResults": 100,})for item in client.dataset(run["defaultDatasetId"]).iterate_items():print(item["billId"], item["title"], item["sponsor"])
JavaScript
import { ApifyClient } from "apify-client";const client = new ApifyClient({ token: "YOUR_APIFY_TOKEN" });const run = await client.actor("ryanclinton/congress-bill-search").call({apiKey: "YOUR_CONGRESS_API_KEY",congress: 119,billType: "hr",includeDetails: true,maxResults: 100,});const { items } = await client.dataset(run.defaultDatasetId).listItems();items.forEach((item) => {console.log(item.billId, item.title, item.sponsor);});
cURL
curl "https://api.apify.com/v2/acts/ryanclinton~congress-bill-search/runs" \-X POST \-H "Content-Type: application/json" \-H "Authorization: Bearer YOUR_APIFY_TOKEN" \-d '{"apiKey": "YOUR_CONGRESS_API_KEY","congress": 119,"billType": "hr","includeDetails": true,"maxResults": 100}'
Integrations
- Google Sheets -- Export dataset results directly to a spreadsheet for collaborative analysis and sharing.
- Webhooks -- Send results to your own endpoints automatically when a run completes for real-time pipeline integration.
- Zapier / Make -- Connect actor output to hundreds of other apps via the Apify integration for no-code automation.
- Slack / Email -- Set up Apify notifications to alert your team when new bills matching your criteria appear.
- Data warehouses -- Push results to BigQuery, Snowflake, or PostgreSQL using Apify dataset export features.
- Apify Schedules -- Run the actor on a daily, weekly, or custom cron schedule to maintain an up-to-date legislative dataset.
How it works
Congress Bill Search -- Processing PipelineInput Config API Layer Output+----------------+ +---------------------+ +----------------+| | | | | || apiKey |---->| Congress.gov API v3 |---->| Apify Dataset || congress | | api.congress.gov/v3 | | (JSON/CSV/XML) || billType | | | | || billNumber | +---------------------+ +----------------+| fromDate/toDate| | || sortOrder | v v| includeDetails | +---------+ +---------+| maxResults | | /bill | | /bill/ |+----------------+ | (list) | | {id} || endpoint| | (detail)|+---------+ +---------+| |v v+------------+ +-------------+|buildList | |buildDetail ||Output() | |Output() ||(basic 11 | |(full 16 || fields) | | fields) |+------------+ +-------------+| |v v+---------------------+| Actor.pushData() || Flat JSON records || with Congress.gov || URLs |+---------------------+
- The actor reads your input configuration and validates the API key is present.
- If
congress,billType, andbillNumberare all provided, it enters single bill lookup mode, calling the detail endpoint/bill/{congress}/{type}/{number}and returning one fully enriched record. - Otherwise, it enters bulk browse mode, building the list endpoint path from optional congress and bill type filters (e.g.,
/bill,/bill/119, or/bill/119/hr). - Date parameters are formatted with ISO timestamps --
fromDatebecomes{date}T00:00:00ZandtoDatebecomes{date}T23:59:59Z-- for precise filtering. - The actor paginates through the list endpoint using offset-based pagination (up to 250 bills per API page) until
maxResultsis reached or no more results exist. - If
includeDetailsis enabled, each bill in the list gets an additional API call to the detail endpoint for sponsor name, party, state, introduced date, and policy area. Failed detail lookups fall back gracefully to list-level data. - Congress.gov URLs are constructed using ordinal formatting (e.g., "119th-congress") and chamber codes for human-readable links.
- All results are pushed to the Apify dataset as flat JSON objects, ready for export in JSON, CSV, XML, or Excel.
Performance and cost
| Scenario | Bills | Details | Est. Time | Est. Cost (Apify credits) |
|---|---|---|---|---|
| Single bill lookup | 1 | Always included | ~2 seconds | < $0.001 |
| Quick browse | 50 | Off | ~10 seconds | ~$0.002 |
| Browse with details | 50 | On | ~30 seconds | ~$0.005 |
| Large batch | 250 | Off | ~20 seconds | ~$0.005 |
| Large batch with details | 250 | On | ~2 minutes | ~$0.02 |
| Maximum run | 500 | On | ~3 minutes | ~$0.04 |
The actor uses 256 MB of memory. The Congress.gov API key is completely free with no published rate limits, though the actor makes requests sequentially to be a respectful API consumer. The Apify free tier includes enough monthly credits to run this actor hundreds of times at no cost. Even heavy daily usage with maximum bill counts and detail enrichment will stay well within standard paid plan limits.
Limitations
- No keyword search. The Congress.gov list endpoint does not support full-text search. Filtering is limited to congress session, bill type, and date range. For keyword matching, filter bill titles in your downstream processing.
- 500-bill cap per run. The actor limits output to 500 bills. For larger datasets, run multiple times with non-overlapping date ranges.
- Detail enrichment is sequential. When
includeDetailsis enabled, each bill requires a separate API call. Large runs with details enabled will be slower. - Date filtering uses update date only. The
fromDateandtoDateparameters filter by the date a bill was last updated, not the date it was introduced. - API key required. You must obtain a free API key from Congress.gov before using the actor. No anonymous access is available.
- No amendment or vote data. This actor returns bill metadata and latest actions. It does not fetch amendment text, roll call votes, cosponsors, or full bill text.
- Sponsor data is first sponsor only. When
includeDetailsis enabled, the actor returns the primary sponsor. Cosponsors are not included in the output. - Congress.gov URL construction. URLs are constructed from chamber codes and ordinal congress numbers. In rare cases where chamber code data is missing or unexpected, the URL may not resolve correctly.
Responsible use
This actor accesses official US government data through the Congress.gov API, which is a public, free, and open resource maintained by the Library of Congress. All data returned is a matter of public record.
- Follow the Congress.gov API terms of service, including making requests at a reasonable rate. The actor handles this by default through sequential request processing.
- Do not use the data to misrepresent legislative actions, fabricate bill information, or create misleading narratives about congressional activity.
- Respect the intent of the open data program by using the data for legitimate research, journalism, civic engagement, or business purposes.
- If you redistribute the data, attribute it to Congress.gov and the Library of Congress as the original source.
FAQ
Do I need to pay for the Congress.gov API key? No. The API key is completely free. Sign up at https://api.congress.gov/sign-up/ and receive your key immediately.
What is a "congress number"? Each two-year term of the US Congress is numbered sequentially. The 119th Congress began in January 2025. The 118th Congress covered 2023--2024. The numbering goes all the way back to the 1st Congress in 1789.
What bill types are available? All eight legislative types are supported: House Bills (H.R.), Senate Bills (S.), House Joint Resolutions (H.J.Res.), Senate Joint Resolutions (S.J.Res.), House Concurrent Resolutions (H.Con.Res.), Senate Concurrent Resolutions (S.Con.Res.), House Simple Resolutions (H.Res.), and Senate Simple Resolutions (S.Res.).
Why are some fields null in my results?
The fields sponsor, sponsorParty, sponsorState, introducedDate, and policyArea require the detail endpoint. Set includeDetails to true to populate them. Without it, these fields return null because the list endpoint does not include that data.
Can I search for bills by keyword or topic? Not directly. The Congress.gov list endpoint does not support full-text search. You can filter by congress session, bill type, and date range, then search the returned titles in your own code or spreadsheet.
How often is the Congress.gov data updated?
Congress.gov updates bill data throughout the day as new actions occur. Running the actor with sortOrder set to updateDate+desc returns the most recently changed bills first.
Can I get data from historical congresses?
Yes. The Congress.gov API provides data going back to the 1st Congress (1789). Set the congress parameter to any session number to retrieve historical legislation. For example, set it to 100 for the 100th Congress (1987--1988).
What happens if a detail lookup fails for one bill?
The actor catches the error, logs a warning, and falls back to the list-level data for that bill. Your run continues and the remaining bills are still processed. The affected bill will have null in the detail-only fields.
Related actors
| Actor | Description | Link |
|---|---|---|
| FEC Campaign Finance Search | Search Federal Election Commission data on contributions and expenditures | View on Apify |
| Federal Register Search | Search the Federal Register for rules, notices, and presidential documents | View on Apify |
| Congressional Stock Trade Tracker | Track stock trades disclosed by members of Congress | View on Apify |
| SAM.gov Contract Monitor | Monitor federal contract opportunities and awards | View on Apify |
| Grants.gov Federal Grant Search | Search for federal grant opportunities across all agencies | View on Apify |
| USAspending Federal Spending | Explore federal spending data including contracts, grants, and loans | View on Apify |
| SEC EDGAR Filing Analyzer | Analyze SEC filings for public company disclosures | View on Apify |
| OFAC Sanctions Search | Search the US Treasury OFAC sanctions list | View on Apify |