# SEC Insider Trading Scraper: Form 4 Buys & Sells (`tidyharvest/sec-insider-trading-scraper`) Actor

Track insider buying and selling from official SEC Form 4 filings: insider name and role, open-market purchase or sale, shares, price, dollar value and 10b5-1 flag. Any tickers, company names or investor CIKs, or the whole market, any date range back to 2003. From $0.80 per 1,000 transactions.

- **URL**: https://apify.com/tidyharvest/sec-insider-trading-scraper.md
- **Developed by:** [TidyHarvest](https://apify.com/tidyharvest) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 insider transactions

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/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

## SEC Insider Trading Scraper: Form 4 Buys & Sells

Track **insider buying and selling** straight from official **SEC EDGAR Form 4** filings: who traded (CEO, CFO, director, 10% owner), **open-market purchase or sale**, shares, price, **dollar value**, holdings after the trade, and whether it was under a **Rule 10b5-1 plan**. Look up any tickers, company names or CIKs (including a person or a fund, e.g. what Berkshire Hathaway bought), or leave the list empty to get **insider trades across the whole market** for any day or date range.

Data comes from SEC's own public endpoints (no third-party site, no login, no proxy), parsed from the filing XML, with a link to every filing.

### What you can do with it

- **Insider-buying alerts:** schedule it daily with transaction type **P** and a minimum value to catch significant open-market purchases.
- **Watchlist monitoring:** follow insider activity at the companies you hold or cover.
- **Research datasets:** build a history of insider trades by company, role or transaction type.
- **Screening:** spot cluster buys (several insiders buying the same stock) across the whole market, today or any past window.
- **Follow an investor:** enter a fund's or a person's CIK to get every trade they reported as an insider of other companies.
- **Compliance and IR:** keep track of executive Section 16 filings at peer companies.

### Input

| Field | What it does |
|---|---|
| `tickers` | Tickers (`BRK.B` or `BRK-B`), exact company names or CIK numbers. **Empty = the whole market.** Unknown ones are listed in the run's SUMMARY and skipped. |
| `daysBack` | Only filings from the last N days (default 30). |
| `filedFrom` / `filedTo` | A filing-date range instead (history back to 2003, per company or market-wide). |
| `transactionCodes` | `P` purchase, `S` sale, `A` award, `M` option exercise, `F` tax withholding, `G` gift, and more. |
| `minValueUsd` | Skip small transactions. |
| `insiderRoles` | Officers, directors and/or 10% owners. |
| `includeDerivatives` | Also output option/RSU rows. |
| `companyRole` | `auto` (default): a listed company returns trades in its own stock, any other CIK (person, fund) its own trades. `insider`: what this company bought or sold in other companies. `both`. |
| `maxFilings` | Filings to read in market-wide mode, newest day first (default 200; a busy day has 400-2,000 Form 4s). |
| `contactEmail` | Optional: your email for SEC's User-Agent policy. |
| `maxItems` | Hard cap on results and cost. |

Example: open-market buys over $100k by officers at two companies in the last 90 days:

```json
{ "tickers": ["AAPL", "NVDA"], "daysBack": 90, "transactionCodes": ["P"], "minValueUsd": 100000, "insiderRoles": ["officer"] }
```

### Output

One item per transaction:

```json
{
  "filingDate": "2026-10-08", "ticker": "AAPL", "issuerName": "Apple Inc.", "issuerCik": "0000320193",
  "insiderName": "Newstead Jennifer", "officerTitle": "SVP, GC and Government Affairs",
  "isOfficer": true, "isDirector": false, "isTenPercentOwner": false,
  "transactionDate": "2026-10-06", "transactionCode": "S", "transactionType": "Open-market sale",
  "acquiredDisposed": "D", "shares": 2399, "pricePerShare": 332.01, "value": 796491.99,
  "sharesOwnedAfter": 39593, "directOrIndirect": "D", "is10b5_1Plan": true,
  "securityTitle": "Common Stock", "isDerivative": false,
  "footnotes": "This transaction was made pursuant to a Rule 10b5-1 trading plan adopted ...",
  "formType": "4", "accessionNumber": "0001140361-26-039158", "matchedAs": "issuer", "query": "AAPL",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126039158/form4.xml"
}
```

### Pricing

Pay per transaction, cheaper on higher Apify plans: **$1.50 per 1,000 transactions** on the free plan, down to **$0.80 per 1,000** on Gold and above. Filters apply before you are charged. Companies with no insider trades in the window return 0 results and cost nothing.

### Limits and notes

- Requests are paced under SEC's limit of 10 per second: about 7 filings per second.
- Per company, any window back to 2003 works.
- Market-wide mode covers every Form 4 and 4/A of each day in the window, including filings made in the last few minutes.
- `matchedAs` says whether a row is a trade in the queried company's stock (`issuer`) or a trade the queried CIK made elsewhere (`insider`).
- Insider names, roles and holdings are public SEC disclosures. Street addresses are not included.
- This is data, not investment advice.

# Actor input Schema

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

Stock tickers (`AAPL`, `NVDA`, `BRK.B`), exact company names (`Lifeway Foods`) or SEC CIK numbers (a company, a fund or a person). **Leave empty to get the latest Form 4 filings across the whole market.**

## `daysBack` (type: `integer`):

Only filings from the last N days. Ignored when 'Filed from' is set.

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

First filing date (YYYY-MM-DD) for history: any date back to 2003 works per company and in market-wide mode. Overrides 'Filed in the last N days'.

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

Last filing date (YYYY-MM-DD). Empty = today.

## `transactionCodes` (type: `array`):

Keep only these codes. Pick **P** and **S** for real open-market buys and sells. Empty = all.

## `minValueUsd` (type: `integer`):

Skip transactions worth less than this (shares x price). Rows without a price count as 0.

## `insiderRoles` (type: `array`):

Keep only insiders with one of these roles. Empty = all.

## `includeDerivatives` (type: `boolean`):

Also output rows from the derivative table (option grants, exercises, conversions).

## `companyRole` (type: `string`):

Berkshire Hathaway's filings include its own purchases of other companies (e.g. Lennar). By default a listed company returns trades in its own stock; pick 'insider' to see what it bought or sold elsewhere. A person's or fund's CIK returns their trades.

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

How many of the newest Form 4 filings to read when no tickers are given.

## `contactEmail` (type: `string`):

SEC's fair-access policy asks automated tools to declare a contact email. Add yours to identify your own traffic; otherwise the actor maintainer's contact is used.

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

Hard cap on results for the whole run (also caps your cost). 0 or empty = no limit.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "NVDA"
  ],
  "daysBack": 30,
  "includeDerivatives": false,
  "companyRole": "auto",
  "maxFilings": 200
}
```

# Actor output Schema

## `transactions` (type: `string`):

One item per transaction.

# 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 = {
    "tickers": [
        "AAPL",
        "NVDA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidyharvest/sec-insider-trading-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 = { "tickers": [
        "AAPL",
        "NVDA",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("tidyharvest/sec-insider-trading-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 '{
  "tickers": [
    "AAPL",
    "NVDA"
  ]
}' |
apify call tidyharvest/sec-insider-trading-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidyharvest/sec-insider-trading-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/1NHyveTUvp4VYuJWs/builds/LkPcIHq1bQFJiJFkT/openapi.json
