# US Congress Bills Scraper: GovInfo Bill Status (`plainkitbin/pd-us-congress`) Actor

Returns US Congress bill status rows (title, latest action, committees) from the public GovInfo BILLSTATUS bulk data as a JSON dataset. Independent tool, not affiliated with GPO or Congress.

- **URL**: https://apify.com/plainkitbin/pd-us-congress.md
- **Developed by:** [PlainKit bin](https://apify.com/plainkitbin) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.48 / 1,000 govinfo bill records

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/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GovInfo Scraper: US Congress Bill Status Data

`plainkitbin/pd-us-congress`: US Congress bills scraper for GovInfo bill status data with titles, latest actions, policy areas and committees.

GovInfo scraper for US Congress bill status data: policy analysts, government affairs teams, journalists, researchers and civic technology developers get bill rows without downloading and parsing BILLSTATUS XML files by hand. One run reads the GovInfo bulk data files for one Congress and one bill type, newest modified first, and returns dataset rows with the bill title, introduction date, latest action, policy area, committees and the source file address.

### Introduction

The GovInfo Bulk Data Repository publishes one XML file for each bill and resolution. This Actor reads the sitemap of the chosen Congress and bill type, opens the bill files one at a time and turns each into one flat row. You can use the rows to:

- watch which bills changed since a date,
- find bills whose title mentions a topic,
- load committee and latest action data into a spreadsheet, database or AI agent.

This Actor is an independent tool. It is not affiliated with GovInfo Bulk Data Repository (BILLSTATUS collection, XML), the Government Publishing Office or the US Congress.

### Tutorial

1. Choose the `congress` number, for example `119`.
2. Choose the `bill_type`, for example `s` for Senate bills or `hr` for House bills.
3. Optionally set `search` (text in the bill title) or `updated_since` (a date).
4. Set `max_items` and start the run.
5. Open the dataset and export it as JSON, CSV or Excel.

### Pricing

The price is **$0.005** per delivered bill row under the `FREE` tier on Apify Pay-Per-Event (event name: `govinfo-bill`).

- FREE: $0.005 per event
- BRONZE: $0.0045 per event
- SILVER: $0.004 per event
- GOLD: $0.003484 per event
- PLATINUM: $0.003484 per event
- DIAMOND: $0.003334 per event

Each bill row is pushed to the dataset first and charged right after a successful push.
A refused charge stops the run; that row stays delivered and uncharged.
A reached spending limit also stops the run, after that row was charged.
Bill files that cannot be read are skipped and not charged.
If GovInfo refuses a request (HTTP 401, 403 or 429), the run ends with one reason row that is not charged.
If a run is restarted by the platform, bills already in the dataset are not pushed or charged again.

### Input and output examples

#### Example input

```json
{
  "congress": 119,
  "bill_type": "s",
  "max_items": 5
}
```

#### Example output

One row of a run, copied from a GovInfo file read on 2026-11-26:

```json
{
  "bill_id": "119-s-29",
  "bill_number": "29",
  "bill_type": "S",
  "committees": ["Commerce, Science, and Transportation Committee"],
  "congress": "119",
  "introduced_date": "2025-01-07",
  "latest_action_date": "2025-01-07",
  "latest_action_text": "Read twice and referred to the Committee on Commerce, Science, and Transportation.",
  "origin_chamber": "Senate",
  "policy_area": "Science, Technology, Communications",
  "reason_code": "",
  "sitemap_lastmod": "2026-09-08T20:30:08.549Z",
  "source_url": "https://www.govinfo.gov/bulkdata/BILLSTATUS/119/s/BILLSTATUS-119s29.xml",
  "title": "Sunshine Protection Act of 2025",
  "update_date": "2026-09-08T18:03:40Z"
}
```

#### Output fields

| Field | Meaning |
| --- | --- |
| `bill_id` | Congress, bill type and number, for example `119-s-29` |
| `congress`, `bill_type`, `bill_number` | Values from the bill file |
| `title` | Bill title |
| `origin_chamber` | House or Senate |
| `introduced_date` | Date of introduction |
| `latest_action_date`, `latest_action_text` | Latest action recorded in the file |
| `policy_area` | Policy area term, empty when the file has none |
| `committees` | Committee names listed in the file |
| `update_date` | Update date written in the file |
| `sitemap_lastmod` | Modification time of the file in the GovInfo sitemap |
| `source_url` | Address of the XML file |
| `reason_code` | Empty for bill rows; `ACCESS_REFUSED` or `RATE_LIMITED` in a reason row |

A reason row holds only `reason_code`.

#### Input parameters

| Field | Type | Description | Default |
| --- | --- | --- | --- |
| `congress` | Integer (108-130) | Congress number. | `119` |
| `bill_type` | String (select) | `hr`, `s`, `hjres`, `sjres`, `hconres`, `sconres`, `hres` or `sres`. | `"s"` |
| `search` | String | Text that must appear in the title. | `""` |
| `updated_since` | String | Only files modified on or after this date (`YYYY-MM-DD`). | `""` |
| `max_items` | Integer (1-500) | Highest number of bill rows. | `10` |

### Actor recommendations

- Schedule a daily run with `updated_since` set to a recent date to follow changes.
- A title search reads files one by one and stops at a page limit, so it may return fewer rows than `max_items`, or none, even when older bills match. Raise `max_items` to let the search read more files.
- The Actor reads titles, dates, actions and committees. It does not return bill text, summaries, sponsors or votes.

### FAQ and support

**Do I need an API key?** No. The Actor reads public GovInfo bulk data files.

**Where does the data come from?** From `www.govinfo.gov`. Each bill file states that it is in the public domain under Title 17 Section 105 of the United States Code.

**Is the data current?** The rows show what the GovInfo files held at run time. GovInfo may update a file later than the event it records.

**Why did a run return fewer rows than requested?** The sitemap may hold fewer matching bills, a file may be unreadable, or a charge limit may have been reached. The run status message reports the counts.

**Support:** open an issue on the Actor page in Apify.

### Use as an MCP Tool (AI Agents)

Local (stdio):

```bash
APIFY_TOKEN=<YOUR_APIFY_TOKEN> npx -y @apify/actors-mcp-server --actors plainkitbin/pd-us-congress
```

Hosted (streamable HTTP): connect to `https://mcp.apify.com?tools=plainkitbin/pd-us-congress` using OAuth or the header `Authorization: Bearer <YOUR_APIFY_TOKEN>`.

Example tool input:

```json
{"congress": 119, "bill_type": "s", "max_items": 2}
```

# Actor input Schema

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

Number of the US Congress to read, for example 119. GovInfo BILLSTATUS files start at Congress 108.

## `bill_type` (type: `string`):

Kind of measure: House or Senate bill, joint resolution, concurrent resolution or simple resolution.

## `search` (type: `string`):

Optional text that must appear in the bill title (case does not matter). A search reads at most the pages needed for the requested rows plus 200 more bill files.

## `updated_since` (type: `string`):

Optional date (YYYY-MM-DD). Only bill files that the GovInfo sitemap marks as modified on or after this date are read.

## `max_items` (type: `integer`):

Highest number of bill rows to deliver, most recently modified files first (default 10).

## Actor input object example

```json
{
  "congress": 119,
  "bill_type": "s",
  "search": "",
  "updated_since": "",
  "max_items": 10
}
```

# Actor output Schema

## `results` (type: `string`):

Dataset items produced by this run.

# 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 = {
    "congress": 119,
    "bill_type": "s",
    "search": "",
    "updated_since": "",
    "max_items": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("plainkitbin/pd-us-congress").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 = {
    "congress": 119,
    "bill_type": "s",
    "search": "",
    "updated_since": "",
    "max_items": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("plainkitbin/pd-us-congress").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 '{
  "congress": 119,
  "bill_type": "s",
  "search": "",
  "updated_since": "",
  "max_items": 10
}' |
apify call plainkitbin/pd-us-congress --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainkitbin/pd-us-congress"
        }
    }
}
```

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/puKNP2fWxmYqBouHM/builds/cDEcYaMwdPgwg6Yjz/openapi.json
