# Capitol Trade Ledger — Congress Stock Trades & Disclosures (`crawlyth-forge/congress-stock-trades-scraper`) Actor

Follow US House and Senate stock trades from the official STOCK Act filings: parsed House PTR PDFs, Senate eFD PTR tables, annual disclosures, party, district, committee memberships, amount bands and late-filing flags. No login or API key.

- **URL**: https://apify.com/crawlyth-forge/congress-stock-trades-scraper.md
- **Developed by:** [crawlyth forge](https://apify.com/crawlyth-forge) (community)
- **Categories:** Automation, Developer tools, News
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## Capitol Trade Ledger — Congress Stock Trades & Disclosures

Follow what members of the U.S. House and Senate buy, sell and hold, straight from the
official STOCK Act filings. The actor reads the Clerk of the House disclosure index and the
Senate Electronic Financial Disclosure (eFD) system, parses the filings, and returns one flat
row per trade, annual holding, filing or member.

No login, cookies, API key or proxy setup is required. Every record links to the government
document it came from.

### What you get

| Record type | What it represents |
|---|---|
| `transaction` | One reported purchase, sale, partial sale or exchange from a House PTR or Senate PTR (including PTR transactions listed in a Senate annual report) |
| `holding` | One asset from a Senate annual report (Part 3), with value and income ranges |
| `filing` | One disclosure filing (PTR, annual, amendment, candidate, termination, extension, etc.) with its official document link |
| `member` | One member of Congress from the public member directory |

Each row carries the member, chamber, party, state, district, filing ID, filing date,
document URL, transaction date, owner, ticker, asset name and type, amount range, and the
days between the trade and disclosure; PTR trades also carry a 45-day late-filing flag.

House annual reports expose their Schedule B transactions. Senate annual reports expose Part 3 holdings and Part 4b transactions. The member records carry
current committee and subcommittee memberships, so a trade can be read next to the committees
that oversee the sector.

### Modes

| Mode | Coverage |
|---|---|
| **House PTR trades** (`housePtr`) | Every periodic transaction report in the House Clerk's yearly index, parsed from the PDF text layer |
| **Senate PTR trades** (`senatePtr`) | Senate eFD periodic transaction reports, parsed from the electronic HTML tables |
| **House annual + Schedule B trades** (`houseAnnual`) | House annual reports and amendments (codes O and A), each filed with its Schedule B transactions |
| **Senate annual reports** (`senateAnnual`) | Senate annual reports, amendments, their asset tables and Part 4b trades |
| **House filing index** (`houseFilings`) | Every House filing type: PTR, annual, amendment, candidate, termination, withdrawal, extension, new filer and the other Clerk codes |
| **Ticker search** (`tickerSearch`) | Scans PTRs from one or both chambers for one or more tickers |
| **Member directory** (`members`) | Search current (or former) members by chamber, state, district, party or name |

### Filters

- Member name, state, House district and party.
- Filing year range and exact filed or transaction date ranges.
- One or more tickers, or free text on the asset name.
- Transaction direction: purchase, sale, partial sale, exchange or other.
- Owner: self, spouse, joint or dependent.
- Amount bands from `$1 - $1,000` through `Over $50,000,000`, plus numeric minimum and maximum.
- Late filings only, with a configurable threshold (default 45 days).
- Senate filer types: senators, candidates, former senators or all.
- House filing-type selection for the filing-index mode.

### Inputs

| Input | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `housePtr` | What to collect. housePtr parses House periodic transaction reports, senatePtr parses Senate eFD PTRs, houseAnnual and senateAnnual return annual filings (Senate holdings and Part 4b trades are parsed too), houseFilings returns the House filing index, tickerSearch scans both chambers for one or more tickers, and members searches the member directory. |
| `chamber` | string | `both` | Used by tickerSearch and members. PTR and annual modes imply their chamber. |
| `memberName` | string | – | Case-insensitive text match on the member's name (e.g. `Pelosi`, `Nancy Pelosi`). Empty = all members. |
| `state` | string | `all` | Two-letter state or territory code. Empty = all states. |
| `district` | integer | – | House district number, 0 for at-large. Leave empty for every district. |
| `party` | string | `all` | Filter by party (joined from the public congress-legislators member list). |
| `filingYearFrom` | integer | `2025` | First report year to include (House index year; Senate received-date year when no exact dates are set). |
| `filingYearTo` | integer | `2025` | Last report year to include. |
| `filedFrom` | string | – | Exact filing-date lower bound in YYYY-MM-DD format. Empty = no lower bound. |
| `filedTo` | string | – | Exact filing-date upper bound in YYYY-MM-DD format. Empty = no upper bound. |
| `transactionFrom` | string | – | Keep trades executed on or after this YYYY-MM-DD date. Annual holdings have no transaction date and are excluded when this is set. |
| `transactionTo` | string | – | Keep trades executed on or before this YYYY-MM-DD date. |
| `ticker` | string | – | One or more tickers separated by commas or spaces (e.g. `NVDA,AAPL`). Empty = all assets. Required for tickerSearch mode. |
| `assetKeyword` | string | – | Case-insensitive text match on the asset name (e.g. `NVIDIA`, `Treasury`, `Palantir`). |
| `transactionTypes` | array | – | Keep any of the selected directions. Empty = purchases, sales, exchanges and other. |
| `owners` | array | – | Keep trades held by any of the selected owners. Empty = self, spouse, joint and dependent. |
| `amountBands` | array | – | Keep trades whose disclosed amount range matches any selected band. Empty = all bands. |
| `minAmount` | integer | – | Keep rows whose disclosed range reaches at least this value. |
| `maxAmount` | integer | – | Keep rows whose disclosed range starts at or below this value. |
| `lateOnly` | boolean | `false` | Only return trades disclosed later than the STOCK Act window. |
| `lateFilingDays` | integer | `45` | Days between the transaction and the filing before a row is flagged as late. The STOCK Act outer limit is 45 days. |
| `includeAmendments` | boolean | `true` | Include amended annual filings (House code A). House PTRs are published under code P only. |
| `houseFilingTypes` | array | – | Restrict the House filing index to any of these Clerk codes. Empty = every code. |
| `senateFilerTypes` | array | `["senator"]` | Who to include on the Senate eFD search. Empty = senators. `all` lets the portal return every filer type. |
| `includeFilingRecords` | boolean | `false` | Emit one filing record per PTR before its transaction rows. Annual modes always emit the filing record. |
| `includeCommittees` | boolean | `true` | Attach the member's current committee and subcommittee names from the public congress-legislators dataset. |
| `flagScanned` | boolean | `true` | Check annual PDFs for a text layer and flag paper-only scans with ocrRequired. PTRs are always checked. |
| `includeFormerMembers` | boolean | `false` | Include former members in the member directory search. |
| `maxItems` | integer | `100` | Hard cap on emitted records. The default prefill uses 3. |
| `maxFilingsScanned` | integer | `1000` | Safety cap on filings downloaded or opened in one run. |

### Example inputs

A small House PTR run:

```json
{
  "mode": "housePtr",
  "filingYearFrom": 2025,
  "filingYearTo": 2025,
  "memberName": "Allen",
  "maxItems": 25
}
```

Senate annual holdings and trades for one state:

```json
{
  "mode": "senateAnnual",
  "state": "GA",
  "filingYearFrom": 2025,
  "filingYearTo": 2025,
  "maxItems": 100
}
```

A two-chamber ticker search:

```json
{
  "mode": "tickerSearch",
  "chamber": "both",
  "ticker": "NVDA,AAPL",
  "filingYearFrom": 2025,
  "filingYearTo": 2025,
  "transactionTypes": ["purchase"],
  "maxItems": 50
}
```

### Output fields

Common fields: `recordType`, `chamber`, `memberName`, `firstName`, `lastName`, `party`,
`partyName`, `state`, `district`, `districtLabel`, `bioguideId`, `committees`,
`committeeCount`, `filingId`, `filingType`, `filingTypeCode`, `filingDate`, `filingYear`,
`filingUrl`, `documentFormat`, `isAmendment`, `sourceUrl`, `scrapedAt`.

Transactions add: `rowNumber`, `transactionDate`, `notificationDate`, `owner`, `ticker`, `assetName`,
`assetType`, `assetTypeCode`, `assetIdentifier`, `transactionType`, `transactionTypeLabel`,
`amountRange`, `amountLow`, `amountHigh`, `comment`, `daysToDisclosure`, `lateFiling`.

Holdings add: `rowNumber`, `owner`, `ticker`, `assetName`, `assetType`, `assetTypeCode`, `assetIdentifier`,
`valueRange`, `valueLow`, `valueHigh`, `incomeType`, `incomeRange`, `incomeLow`, `incomeHigh`.

Filings add: `ocrRequired`, `parseStatus`, `transactionCount`, `holdingCount`.

Members add: `photoUrl`, `termStart`, `termEnd`, `birthday`, `gender`.

Empty values are omitted; no field is ever null, `""`, `[]` or `{}`.

### How it works

1. The actor loads the public `unitedstates/congress-legislators` member, term and committee
   files once per run and joins each filing to the member's party, state, district, bioguide ID
   and current committee seats.
2. **House:** downloads the Clerk's yearly index XML, filters it, fetches the PDFs, and parses
   the transaction table from the PDF text layer. Paper filings with no text layer are returned
   as a filing row with `ocrRequired: true` and `parseStatus: "scannedPdf"`; nothing is guessed
   from images.
3. **Senate:** accepts the eFD public-use agreement, obtains a session, queries the search
   endpoint, and parses the electronic PTR and annual report pages. Paper filings are flagged
   the same way as scanned House PDFs.
4. The actor normalizes both chambers into one schema, applies the filters, and pushes records
   until `maxItems` or the source is exhausted.

### Coverage and honest limits

- **House:** filing years 2012 to the current year. Electronic PTRs begin in 2014; earlier
  reports and a minority of later reports are scanned paper filings. Annual Schedule B trades
  are parsed from the text layer.
- **Senate:** electronic filings from 2012 onward. Senators who file on paper are flagged, not
  parsed. House annual asset/holding tables are not normalized; their Schedule B trades are.
- Amounts are the disclosed ranges, never exact prices or share counts. The actor exposes the
  range and, when the form gives one, the low and high bounds.
- The 45-day late-filing flag measures the filing date against the transaction date on PTRs.
  For amendments, the amendment's filing date is used, so the flag describes that filing.
  Annual Schedule B and Part 4b rows carry `daysToDisclosure` but no `lateFiling` flag because
  annual reports are not PTR filings.
- Party, state, district and committees come from the public member dataset. Candidates who
  never served in Congress have no party or committee match.
- Ticker search reads filings until `maxItems` matches or `maxFilingsScanned` is reached. A very
  rare ticker in a wide year range may need a larger scan cap.
- `maxItems` is a hard cap. Scanned-filing notices are emitted after parsed trades in a batch so
  they do not crowd out real transaction rows.

### FAQ

**Do I need an Apify proxy or a Senate account?** No. The actor uses the public House Clerk site
and the public Senate eFD search. The Senate portal only accepts requests from U.S. addresses;
the actor runs on the Apify platform and obtains its own eFD session.

**Why is a filing marked `ocrRequired`?** The member filed on paper or the PDF is an image
scan. The row still gives the filing metadata and the official document URL.

**Can I get exact dollar amounts?** No. Congress discloses ranges. Use `amountLow` and
`amountHigh` for sorting and filtering.

**Does this include state legislators?** No. It covers the U.S. House and Senate.

**How current is the data?** The House index is refreshed by the Clerk during the day; Senate
eFD is live. A filing appears after the member files it.

# Actor input Schema

## `mode` (type: `string`):

What to collect. housePtr parses House periodic transaction reports, senatePtr parses Senate eFD PTRs, houseAnnual returns annual filings and their Schedule B trades, senateAnnual returns annual filings with Part 3 holdings and Part 4b trades, houseFilings returns the House filing index, tickerSearch scans both chambers for one or more tickers, and members searches the member directory.

## `chamber` (type: `string`):

Used by tickerSearch and members. PTR and annual modes imply their chamber.

## `memberName` (type: `string`):

Case-insensitive text match on the member's name (e.g. `Pelosi`, `Nancy Pelosi`). Empty = all members.

## `state` (type: `string`):

Two-letter state or territory code. Empty = all states.

## `district` (type: `integer`):

House district number, 0 for at-large. Leave empty for every district.

## `party` (type: `string`):

Filter by party (joined from the public congress-legislators member list).

## `filingYearFrom` (type: `integer`):

First report year to include (House index year; Senate received-date year when no exact dates are set).

## `filingYearTo` (type: `integer`):

Last report year to include.

## `filedFrom` (type: `string`):

Exact filing-date lower bound in YYYY-MM-DD format. Empty = no lower bound.

## `filedTo` (type: `string`):

Exact filing-date upper bound in YYYY-MM-DD format. Empty = no upper bound.

## `transactionFrom` (type: `string`):

Keep trades executed on or after this YYYY-MM-DD date. Annual holdings have no transaction date and are excluded when this is set.

## `transactionTo` (type: `string`):

Keep trades executed on or before this YYYY-MM-DD date.

## `ticker` (type: `string`):

One or more tickers separated by commas or spaces (e.g. `NVDA,AAPL`). Empty = all assets. Required for tickerSearch mode.

## `assetKeyword` (type: `string`):

Case-insensitive text match on the asset name (e.g. `NVIDIA`, `Treasury`, `Palantir`).

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

Keep any of the selected directions. Empty = purchases, sales, exchanges and other.

## `owners` (type: `array`):

Keep trades held by any of the selected owners. Empty = self, spouse, joint and dependent.

## `amountBands` (type: `array`):

Keep trades whose disclosed amount range matches any selected band. Empty = all bands.

## `minAmount` (type: `integer`):

Keep rows whose disclosed range reaches at least this value.

## `maxAmount` (type: `integer`):

Keep rows whose disclosed range starts at or below this value.

## `lateOnly` (type: `boolean`):

Only return trades disclosed later than the STOCK Act window.

## `lateFilingDays` (type: `integer`):

Days between the transaction and the filing before a row is flagged as late. The STOCK Act outer limit is 45 days.

## `includeAmendments` (type: `boolean`):

Include amended annual filings (House code A). House PTRs are published under code P only.

## `houseFilingTypes` (type: `array`):

Restrict the House filing index to any of these Clerk codes. Empty = every code.

## `senateFilerTypes` (type: `array`):

Who to include on the Senate eFD search. Empty = senators. `all` lets the portal return every filer type.

## `includeFilingRecords` (type: `boolean`):

Emit one filing record per PTR before its transaction rows. Annual modes always emit the filing record.

## `includeCommittees` (type: `boolean`):

Attach the member's current committee and subcommittee names from the public congress-legislators dataset.

## `flagScanned` (type: `boolean`):

Check annual PDFs for a text layer and flag paper-only scans with ocrRequired. PTRs are always checked.

## `includeFormerMembers` (type: `boolean`):

Include former members in the member directory search.

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

Hard cap on emitted records. The default prefill uses 3.

## `maxFilingsScanned` (type: `integer`):

Safety cap on filings downloaded or opened in one run.

## Actor input object example

```json
{
  "mode": "housePtr",
  "chamber": "both",
  "memberName": "Allen",
  "state": "all",
  "party": "all",
  "filingYearFrom": 2025,
  "filingYearTo": 2025,
  "filedFrom": "",
  "filedTo": "",
  "transactionFrom": "",
  "transactionTo": "",
  "ticker": "",
  "assetKeyword": "",
  "transactionTypes": [],
  "owners": [],
  "amountBands": [],
  "lateOnly": false,
  "lateFilingDays": 45,
  "includeAmendments": true,
  "houseFilingTypes": [],
  "senateFilerTypes": [
    "senator"
  ],
  "includeFilingRecords": false,
  "includeCommittees": true,
  "flagScanned": true,
  "includeFormerMembers": false,
  "maxItems": 3,
  "maxFilingsScanned": 1000
}
```

# Actor output Schema

## `records` (type: `string`):

Dataset with one row per transaction, holding, filing or member.

# 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 = {
    "mode": "housePtr",
    "chamber": "both",
    "memberName": "Allen",
    "state": "all",
    "party": "all",
    "filingYearFrom": 2025,
    "filingYearTo": 2025,
    "filedFrom": "",
    "filedTo": "",
    "transactionFrom": "",
    "transactionTo": "",
    "ticker": "",
    "assetKeyword": "",
    "transactionTypes": [],
    "owners": [],
    "amountBands": [],
    "lateOnly": false,
    "lateFilingDays": 45,
    "includeAmendments": true,
    "houseFilingTypes": [],
    "senateFilerTypes": [
        "senator"
    ],
    "includeFilingRecords": false,
    "includeCommittees": true,
    "flagScanned": true,
    "includeFormerMembers": false,
    "maxItems": 3,
    "maxFilingsScanned": 1000
};

// Run the Actor and wait for it to finish
const run = await client.actor("crawlyth-forge/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 = {
    "mode": "housePtr",
    "chamber": "both",
    "memberName": "Allen",
    "state": "all",
    "party": "all",
    "filingYearFrom": 2025,
    "filingYearTo": 2025,
    "filedFrom": "",
    "filedTo": "",
    "transactionFrom": "",
    "transactionTo": "",
    "ticker": "",
    "assetKeyword": "",
    "transactionTypes": [],
    "owners": [],
    "amountBands": [],
    "lateOnly": False,
    "lateFilingDays": 45,
    "includeAmendments": True,
    "houseFilingTypes": [],
    "senateFilerTypes": ["senator"],
    "includeFilingRecords": False,
    "includeCommittees": True,
    "flagScanned": True,
    "includeFormerMembers": False,
    "maxItems": 3,
    "maxFilingsScanned": 1000,
}

# Run the Actor and wait for it to finish
run = client.actor("crawlyth-forge/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 '{
  "mode": "housePtr",
  "chamber": "both",
  "memberName": "Allen",
  "state": "all",
  "party": "all",
  "filingYearFrom": 2025,
  "filingYearTo": 2025,
  "filedFrom": "",
  "filedTo": "",
  "transactionFrom": "",
  "transactionTo": "",
  "ticker": "",
  "assetKeyword": "",
  "transactionTypes": [],
  "owners": [],
  "amountBands": [],
  "lateOnly": false,
  "lateFilingDays": 45,
  "includeAmendments": true,
  "houseFilingTypes": [],
  "senateFilerTypes": [
    "senator"
  ],
  "includeFilingRecords": false,
  "includeCommittees": true,
  "flagScanned": true,
  "includeFormerMembers": false,
  "maxItems": 3,
  "maxFilingsScanned": 1000
}' |
apify call crawlyth-forge/congress-stock-trades-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,crawlyth-forge/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/XynHlLQeGPlr5Ja7Y/builds/R3B7rqC3nxBgTaAzU/openapi.json
