# House Stock Trades Scraper (`automation-lab/house-stock-trades-scraper`) Actor

Extract transaction-level purchases, sales, and exchanges from public U.S. House Periodic Transaction Report PDFs.

- **URL**: https://apify.com/automation-lab/house-stock-trades-scraper.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## House Stock Trades Scraper

Extract transaction-level stock trades from public U.S. House Periodic Transaction Report (PTR) PDFs.

The Actor searches the official House Clerk disclosure portal or accepts known PTR PDF URLs, then returns one structured dataset item per transaction row. Use it to monitor purchases and sales by member, ticker, date, state, or district without manually reading PDFs.

> House-only scope: this Actor does not collect Senate disclosures.

### What does House Stock Trades Scraper do?

House Stock Trades Scraper combines two public House Clerk surfaces:

1. the House financial disclosure search form;
2. the public PTR PDF archive.

It preserves the search session and verification token, discovers matching PTR filings, downloads each unique PDF, extracts machine-readable rows, normalizes dates and transaction types, and applies your filters.

You can also skip discovery and submit one or more official PTR PDF URLs directly.

### Who is it for?

- **Investors and analysts** monitoring disclosed congressional trades by ticker.
- **Journalists** researching a member, filing period, asset, or transaction.
- **Compliance teams** building repeatable political-risk review workflows.
- **Transparency organizations** converting public disclosures into structured data.
- **Data engineers** feeding House transaction records into warehouses or alerts.
- **Researchers** comparing transaction dates, notification dates, ownership, and amount bands.

### Why use this Actor?

- Returns transaction rows rather than only filing metadata.
- Uses the official anonymous House Clerk source.
- Supports both search discovery and explicit PDF input.
- Filters by member name, ticker, transaction type, and transaction date.
- Emits normalized ISO dates and numeric amount bounds.
- Uses direct HTTP without a browser, login, or proxy by default.
- Fails clearly when selected PDFs are image-only instead of pretending that no trades exist.

### What data can you extract?

| Field | Meaning |
| --- | --- |
| `filingId` | House Clerk filing identifier |
| `filingYear` | PTR filing year |
| `pdfUrl` | Official public PTR PDF |
| `sourceSearchUrl` | Discovery search context, or `null` for explicit URLs |
| `filerName` | Name printed on the report |
| `filerStatus` | Filer role, usually Member |
| `state` | Two-letter state or territory code |
| `district` | Congressional district or at-large marker |
| `transactionIndex` | One-based row position in the parsed PDF |
| `owner` | Expanded owner label |
| `ownerCode` | PTR owner code such as `SP`, `JT`, or `DC` |
| `asset` | Asset or security name |
| `ticker` | Ticker printed in the report, when present |
| `assetType` | House asset-type code such as `ST` or `MF` |
| `transactionType` | `purchase`, `sale`, or `exchange` |
| `transactionDate` | Normalized transaction date |
| `notificationDate` | Normalized notification date |
| `amountRange` | Disclosed dollar band |
| `amountMin` | Numeric lower bound |
| `amountMax` | Numeric upper bound, or `null` for open-ended bands |
| `capitalGainsOver200` | Capital-gains marker when text extraction preserves it |
| `filingStatus` | Row status such as New or Amended |
| `description` | Optional row description |
| `scrapedAt` | Extraction timestamp |

Fields can be `null` when the public filing does not provide them or when the PDF text layer does not preserve that column.

### Getting started

1. Open the Actor input page.
2. Choose a filing year and optional state, district, or last name.
3. Optionally add ticker, member, action, or date filters.
4. Set `maxFilings` to bound PDF downloads.
5. Set `maxItems` to bound output rows.
6. Start the run.
7. Open the **Transactions** dataset and export JSON, CSV, Excel, XML, or another supported format.

For a known filing, provide its official House Clerk PTR PDF in `startUrls` and omit discovery fields.

### Input parameters

#### Filing source

- `startUrls` — official URLs matching `https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/{year}/{filingId}.pdf`.
- `filingYears` — filing years from 2008 onward. The current year is used when no URL or year is supplied.

Explicit URLs and discovered filings can be used together. Duplicate URLs are downloaded once.

#### House search filters

- `states` — two-letter postal codes such as `CA`, `NY`, or `PR`.
- `districts` — district numbers or `AL`.
- `lastNames` — names submitted to the House Clerk member search.

Empty arrays mean no restriction for that search dimension.

#### Transaction filters

- `memberNames` — case-insensitive text contained in the parsed filer name.
- `tickers` — exact ticker symbols, normalized to uppercase.
- `transactionTypes` — any combination of `purchase`, `sale`, and `exchange`.
- `transactionDateFrom` — inclusive `YYYY-MM-DD` lower bound.
- `transactionDateTo` — inclusive `YYYY-MM-DD` upper bound.

These filters apply identically to discovered filings and explicit PDF URLs.

#### Limits

- `maxFilings` — maximum unique PDFs inspected, from 1 to 1,000; default 50.
- `maxItems` — maximum matching transaction rows saved, from 1 to 10,000; default 100.

Use a small `maxFilings` while developing a workflow, then increase it for scheduled monitoring.

### Example input: search by member and ticker

```json
{
  "filingYears": [2025],
  "states": ["CA"],
  "lastNames": ["Chu"],
  "memberNames": ["Judy Chu"],
  "tickers": ["ASTH"],
  "transactionTypes": ["purchase"],
  "transactionDateFrom": "2025-08-01",
  "transactionDateTo": "2025-08-31",
  "maxFilings": 10,
  "maxItems": 20
}
```

### Example input: parse one PTR PDF

```json
{
  "startUrls": [
    {
      "url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf"
    }
  ],
  "maxFilings": 1,
  "maxItems": 20
}
```

### Output example

A current public filing produces rows shaped like this:

```json
{
  "filingId": "20031001",
  "filingYear": 2025,
  "pdfUrl": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf",
  "sourceSearchUrl": null,
  "filerName": "Hon. Judy Chu",
  "filerStatus": "Member",
  "state": "CA",
  "district": "28",
  "transactionIndex": 1,
  "owner": "Spouse",
  "ownerCode": "SP",
  "asset": "Astrana Health Inc. - Common Stock",
  "ticker": "ASTH",
  "assetType": "ST",
  "transactionType": "purchase",
  "transactionDate": "2025-08-19",
  "notificationDate": "2025-08-19",
  "amountRange": "$100,001 - $250,000",
  "amountMin": 100001,
  "amountMax": 250000,
  "capitalGainsOver200": null,
  "filingStatus": "New",
  "description": "Stock is solely owned by spouse.",
  "scrapedAt": "2026-07-26T03:15:52.118Z"
}
```

### How much does it cost to extract House stock trades?

The Actor uses pay per event pricing:

- a **$0.005 start fee** per run;
- a tiered fee for each saved transaction row.

| Plan | Price per saved transaction |
| --- | ---: |
| Free | $0.000041071 |
| Bronze | $0.000035714 |
| Silver | $0.000027857 |
| Gold | $0.000021429 |
| Platinum | $0.000014286 |
| Diamond | $0.000010000 |

Examples before platform usage charges:

- 10 rows on Bronze: about **$0.00536** including the start fee.
- 100 rows on Bronze: about **$0.00857** including the start fee.
- 1,000 rows on Gold: about **$0.02643** including the start fee.

You are charged per saved matching transaction, not per rejected row. A search with no matching records incurs only the start fee.

### Monitoring and automation workflows

#### Scheduled ticker watch

Schedule a daily run for the current filing year, provide a ticker list, and send the dataset to a webhook or data warehouse. Store `filingId` plus `transactionIndex` as a downstream deduplication key.

#### Member research

Use `lastNames` to narrow the House search, then `memberNames` to enforce the parsed filer name. Export CSV for review or JSON for analysis.

#### Compliance date window

Combine `transactionDateFrom`, `transactionDateTo`, and `transactionTypes` to inspect purchases or sales in a defined period.

#### Parse filings from another pipeline

Feed PTR PDF URLs found by another system into `startUrls`. The Actor applies the same transaction filters and output contract as discovery mode.

### Using the Apify API with cURL

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/automation-lab~house-stock-trades-scraper/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "filingYears": [2025],
    "states": ["CA"],
    "tickers": ["ASTH"],
    "maxFilings": 10,
    "maxItems": 20
  }'
```

Add `waitForFinish=120` when a synchronous integration should wait for completion.

### Using JavaScript

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('automation-lab/house-stock-trades-scraper').call({
    filingYears: [2025],
    states: ['CA'],
    transactionTypes: ['purchase'],
    maxFilings: 10,
    maxItems: 50,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Using Python

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('automation-lab/house-stock-trades-scraper').call(run_input={
    'filingYears': [2025],
    'states': ['CA'],
    'tickers': ['ASTH'],
    'maxFilings': 10,
    'maxItems': 50,
})

items = client.dataset(run['defaultDatasetId']).list_items().items
print(items)
```

### Use with MCP and AI agents

Add the Actor to Claude Code:

```bash
claude mcp add --transport http apify \
  "https://mcp.apify.com?tools=automation-lab/house-stock-trades-scraper"
```

Claude Desktop, Cursor, and VS Code can use the same MCP server configuration:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=automation-lab/house-stock-trades-scraper"
    }
  }
}
```

Example prompts:

- “Find 2025 California House PTR purchases for ticker ASTH.”
- “Parse this official House PTR PDF and summarize each transaction.”
- “Return House sales in August 2025 as structured JSON.”

### Tips for reliable runs

- Start with a state or last name rather than an all-country search.
- Keep `maxFilings` low until the query is known to return useful PTRs.
- Use ticker filters only when the filing prints a ticker; many assets do not.
- Use `filingId` and `transactionIndex` for downstream row identity.
- Schedule overlapping date windows and deduplicate downstream to avoid missing late filings.
- Inspect `pdfUrl` when a field is null or requires human context.

### Limits and failure behavior

- This Actor covers U.S. House member PTRs only, not Senate disclosures.
- It does not provide investment advice or infer trades that are absent from a filing.
- Current digital PDFs are supported. Some legacy filings are image-only and require OCR.
- An image-only PDF is skipped when other selected filings parse successfully.
- A run fails if every selected filing lacks machine-readable transaction rows.
- Search availability and PDF formatting are controlled by the House Clerk.
- The Actor does not guarantee completeness before the source publishes a filing.
- The capital-gains marker may be `null` when PDF text extraction does not preserve the checkbox.

### Troubleshooting

#### Why did the run return zero rows?

Check whether the House search returned PTR filings, whether your ticker/member/date filters are too narrow, and whether `maxFilings` stopped before the relevant filing. A genuine no-result search succeeds with an empty dataset.

#### Why did the run fail on a PDF?

Confirm that the URL is an official House PTR PDF path. If the log reports no machine-readable rows, the filing is likely image-only and is outside the current no-OCR scope.

#### Why is a ticker null?

The House filing may describe an asset without printing a ticker. The Actor does not guess ticker symbols from company names.

#### Do I need a proxy?

No proxy is required for the supported direct HTTP path. The Actor does not expose an automatic residential fallback.

### Responsible use and legality

House PTRs are public government records, but users remain responsible for their use of the data. Follow applicable laws, source terms, privacy obligations, and journalistic or compliance standards.

Do not present disclosed amount ranges as exact trade values. Verify consequential conclusions against the linked source PDF. Avoid using the output for harassment, identity abuse, or unsupported allegations.

### Related Automation Lab Actors

- [House Financial Disclosures Scraper](https://apify.com/automation-lab/house-financial-disclosures-scraper) — find House member and candidate filing metadata and PDF URLs when you do not need transaction-row parsing.

Choose House Stock Trades Scraper when the job requires normalized PTR transactions. Choose House Financial Disclosures Scraper when the job requires the broader filing index, including non-PTR disclosure metadata.

### FAQ

#### Does it scrape Senate stock trades?

No. The product is intentionally House-only and does not claim equivalent Senate coverage.

#### Can I provide several PTR PDFs?

Yes. Add multiple official URLs to `startUrls`; duplicate URLs are processed once and `maxFilings` still applies.

#### Are amount values exact?

No. House PTRs disclose ranges. `amountMin` and `amountMax` are the numeric bounds of the reported band.

#### Are results real-time?

No. Results reflect records available from the House Clerk at run time. Filing and publication delays are outside the Actor’s control.

#### Can I export the data?

Yes. Apify datasets support JSON, CSV, Excel, XML, RSS, and other export formats.

#### Can I run it on a schedule?

Yes. Use Apify schedules and integrations to monitor new filings repeatedly.

#### How are duplicate filings handled?

The Actor deduplicates identical PTR PDF URLs within a run. Scheduled runs are independent, so downstream systems should deduplicate using filing and row identity.

# Actor input Schema

## `startUrls` (type: `array`):

Optional public House Clerk PTR PDF URLs. These are processed together with any discovery filters below.

## `filingYears` (type: `array`):

House member filing years to search. When no PDF URL is supplied, the current year is used by default.

## `states` (type: `array`):

Optional two-letter postal codes such as CA or NY. Leave empty to search every state.

## `districts` (type: `array`):

Optional district numbers or AL for at-large districts.

## `lastNames` (type: `array`):

Optional House Clerk search names such as Chu or Pelosi.

## `memberNames` (type: `array`):

Keep transactions whose filer name contains one of these values, case-insensitively.

## `tickers` (type: `array`):

Keep only these ticker symbols, for example ASTH or NVDA.

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

Keep purchases, sales, exchanges, or any combination.

## `transactionDateFrom` (type: `string`):

Optional inclusive lower date in YYYY-MM-DD format.

## `transactionDateTo` (type: `string`):

Optional inclusive upper date in YYYY-MM-DD format.

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

Maximum unique PTR PDFs to download and inspect.

## `maxItems` (type: `integer`):

Maximum matching transaction rows to save.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf"
    }
  ],
  "filingYears": [
    2025
  ],
  "states": [
    "CA"
  ],
  "districts": [],
  "lastNames": [
    "Chu"
  ],
  "memberNames": [],
  "tickers": [
    "ASTH"
  ],
  "transactionTypes": [],
  "maxFilings": 10,
  "maxItems": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Default dataset containing one item per PTR transaction row.

# 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 = {
    "startUrls": [
        {
            "url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf"
        }
    ],
    "filingYears": [
        2025
    ],
    "states": [
        "CA"
    ],
    "districts": [],
    "lastNames": [
        "Chu"
    ],
    "memberNames": [],
    "tickers": [
        "ASTH"
    ],
    "transactionTypes": [],
    "maxFilings": 10,
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/house-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 = {
    "startUrls": [{ "url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf" }],
    "filingYears": [2025],
    "states": ["CA"],
    "districts": [],
    "lastNames": ["Chu"],
    "memberNames": [],
    "tickers": ["ASTH"],
    "transactionTypes": [],
    "maxFilings": 10,
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/house-stock-trades-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://disclosures-clerk.house.gov/public_disc/ptr-pdfs/2025/20031001.pdf"
    }
  ],
  "filingYears": [
    2025
  ],
  "states": [
    "CA"
  ],
  "districts": [],
  "lastNames": [
    "Chu"
  ],
  "memberNames": [],
  "tickers": [
    "ASTH"
  ],
  "transactionTypes": [],
  "maxFilings": 10,
  "maxItems": 20
}' |
apify call automation-lab/house-stock-trades-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=automation-lab/house-stock-trades-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/0edFzw64OmhKFAkRQ/builds/C7XDoxbct9WbiJZ6h/openapi.json
