# US Congress Stock Trades Scraper – STOCK Act Disclosures (`rowfeed/congress-stock-trades-scraper`) Actor

Every House member stock trade disclosed under the STOCK Act, one row per transaction, parsed from the Clerk's official Periodic Transaction Report PDFs. Sitting members only, no candidate filings.

- **URL**: https://apify.com/rowfeed/congress-stock-trades-scraper.md
- **Developed by:** [Rowfeed](https://apify.com/rowfeed) (community)
- **Categories:** News, Developer tools, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 transactions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-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

## US Congress Stock Trades Scraper – STOCK Act Disclosures

Get every stock trade a **sitting US House member** disclosed under the STOCK Act, one clean JSON row per transaction. Built for retail-investing dashboards, journalists, and researchers and AI agents who want to track congressional trading without downloading and parsing PDFs by hand. Source: the [Clerk of the House's own financial-disclosures site](https://disclosures-clerk.house.gov/) — the STOCK Act requires this data to be published, and it is US government work, not copyrighted.

- **One row per transaction** – member, asset, ticker, transaction type (purchase/sale/exchange), dates, and the legally required amount band, parsed straight out of the Clerk's Periodic Transaction Report (PTR) PDFs with `pypdf`, no OCR.
- **Sitting members only, verified per filing** – the Clerk's index also lists candidate filings (private citizens running for office); this Actor never fetches or emits those. Every filing is additionally checked for `Status: Member` inside the PDF text itself before its rows are emitted, and a filing that fails that check is skipped and counted, not guessed at.
- **Defensive parsing** – a transaction row the PDF layout makes genuinely unparseable is never crashed on or invented; it is skipped and reported as an uncharged error row so you can see exactly what was dropped and why. Measured on the September 2026 filings: about 3-4 % of transaction rows hit this, plus roughly one filing in eight that the House published as a scan with no extractable text at all (reported as `no_text`). You are never charged for either.

### Sample row

One purchase from a September 2026 filing (`maxFilings: 50`, default input):

```json
{
  "member_name": "Josh Gottheimer",
  "member_prefix": "Hon.",
  "state_district": "NJ05",
  "doc_id": "20035455",
  "filing_date": "2026-09-14",
  "owner_code": "JT",
  "asset_name": "Applied Materials, Inc. - Common Stock",
  "ticker": "AMAT",
  "asset_type_code": "ST",
  "transaction_type": "P",
  "transaction_type_raw": "P",
  "transaction_date": "2026-08-06",
  "notification_date": "2026-09-14",
  "amount_min": 1001,
  "amount_max": 15000,
  "amount_range_raw": "$1,001 - $15,000",
  "cap_gains_over_200": null,
  "pdf_url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2026/20035455.pdf",
  "source_url": "https://disclosures-clerk.house.gov/public_disc/financial-pdfs/2026FD.zip",
  "scraped_at": "2026-09-16T11:54:40+00:00"
}
```

`owner_code` is `SP` (spouse), `DC` (dependent child), `JT` (joint) or `null` (the member). Family members are **never** identified by name, even when one appears in the PDF's free text — this Actor only ever emits the owner code the House form itself uses.

### Filters

| Input | Default | What it does |
|---|---|---|
| `year` | `2026` | The Clerk's financial-disclosures index year to scan. A year with no published index becomes one clean error row; the run still succeeds. |
| `sinceFilingDate` | – | Only filings submitted on or after this date (`YYYY-MM-DD`). |
| `members` | `[]` | Only filings whose member surname contains one of these (case-insensitive), e.g. `["Pelosi"]`. Empty = every sitting member. |
| `maxFilings` | `50` | Stop after fetching this many filings (PDFs). Each filing is one PDF fetch and can produce several transaction rows — keep this low to keep runs cheap. |
| `transactionTypes` | `[]` | Keep only `P` (purchase), `S` (sale) and/or `E` (exchange). Empty = every type. |

### Pricing

Pay per event, no subscription: **$2 per 1,000 transaction rows** (`$0.002` each). A default run (50 filings) typically produces 300–400 transaction rows, so around $0.60–$0.80. Set a maximum charge on the run and the Actor stops cleanly when it is reached, charging only for rows actually saved.

### What this Actor does and does not cover

- **Sitting House members' Periodic Transaction Reports (PTRs) only.** Candidate filings (private citizens running for office, `FilingType C` in the Clerk's own index) are deliberately excluded — this Actor never fetches their PDFs.
- **The House only.** The Senate discloses separately at efdsearch.senate.gov, whose search interface blocks automated access; this Actor does not cover it.
- **Owner codes, never names.** Spouse and dependent-child holdings appear only as `SP`/`DC` (or `JT` for joint) — this Actor never emits a family member's name, even where one appears in the PDF's free-text fields, and it never emits addresses or birth dates.
- **The legally required amount bands, not exact figures.** The STOCK Act requires members to disclose a *range* (e.g. `$1,001 - $15,000`), not an exact dollar amount, and that is exactly what `amount_min`/`amount_max`/`amount_range_raw` reflect. A handful of spouse/dependent-child holdings above the top closed band are disclosed as an open-ended "Over $X" — `amount_max` is `null` for those rows rather than a guessed ceiling.
- **This is public-record data, not investment advice.** It shows what was legally disclosed, not what to do with it.

### Details

- **Source**: the Clerk's own `disclosures-clerk.house.gov` — the annual `<year>FD.zip` filing index (tab-separated) and each filing's `ptr-pdfs/<year>/<docId>.pdf`. No login, no API key, no robots.txt restriction, US government work (not copyrighted).
- **Reliability**: retries with exponential backoff on 429/5xx/network errors (5 tries), a request paused at least 0.5s apart, and one bad filing never stops the run — a PDF that 404s or has no extractable text becomes an uncharged error row (`error`, `errorMessage`) and the rest continues. A run fails only when it produced zero rows *and* hit real request errors; a filter that simply matches nothing is a successful, empty run.
- **Run stats**: the `STATS` record in the run's key-value store holds filings fetched, filings skipped (Status ≠ Member), transaction rows that failed to parse, and request/error counts by category.
- **Output**: export as JSON, CSV or Excel, fetch through the Apify API, or schedule runs and pipe rows into Google Sheets, Make, Zapier, n8n, or your own code. Eligible for agentic use via Apify's MCP server — an AI agent can pull a member's recent trades mid-task and pay only per row it reads.

Not affiliated with the U.S. House of Representatives or the Clerk of the House. Data comes from the Clerk's own public financial-disclosures site.

# Actor input Schema

## `year` (type: `integer`):

The Clerk's financial-disclosures index year to scan, e.g. 2026. Each year has its own index ZIP; a year with no published index (too old or not yet published) becomes a single clean error row and the run still succeeds.

## `sinceFilingDate` (type: `string`):

Only include filings submitted on or after this date (YYYY-MM-DD). Leave blank for no lower bound.

## `members` (type: `array`):

Only include filings whose member surname contains one of these (case-insensitive), e.g. "Pelosi". Leave empty for every sitting member.

## `maxFilings` (type: `integer`):

Stop after fetching this many filings (PDFs). Each filing is one PDF fetch and can produce several transaction rows. Keep this low to keep runs cheap.

## `transactionTypes` (type: `array`):

Keep only these transaction types: P (purchase), S (sale), E (exchange). Leave empty for every type.

## Actor input object example

```json
{
  "year": 2026,
  "members": [
    "Pelosi",
    "Green"
  ],
  "maxFilings": 50,
  "transactionTypes": [
    "P",
    "S"
  ]
}
```

# Actor output Schema

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

No description

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("rowfeed/congress-stock-trades-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("rowfeed/congress-stock-trades-scraper").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 '{}' |
apify call rowfeed/congress-stock-trades-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rowfeed/congress-stock-trades-scraper"
        }
    }
}
```

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/DE9nS0erlSdlvIDtf/builds/VtvsoqascCM3VPeiy/openapi.json
