# SEC Insider Trading (Form 4) Scraper (`b3lch/sec-insider-trading`) Actor

Scrape SEC EDGAR Form 4 insider-trading filings into a clean, enriched dataset: who bought or sold their own company stock, market-wide or by ticker — with dollar values, decoded transaction types, and cluster-buy detection.

- **URL**: https://apify.com/b3lch/sec-insider-trading.md
- **Developed by:** [alfred dias](https://apify.com/b3lch) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.00 / 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.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

### What does the SEC Insider Trading Scraper do?

The **SEC Insider Trading (Form 4) Scraper** turns the U.S. Securities and Exchange
Commission's raw **[Form 4](https://www.sec.gov/about/forms/form4.pdf)** filings into a
clean, enriched feed of exactly **who is buying and selling shares of their own company** —
market-wide or for the specific companies you care about. It runs on the Apify platform,
so you get API access, scheduling, integrations (Slack, Google Sheets, webhooks), and
monitoring out of the box.

### Why use it?

Corporate insiders — CEOs, directors, and 10% owners — must report their trades to the SEC
within two business days. That data is public but **painful to use raw**: no dollar amounts,
cryptic one-letter codes, and ownership buried in XML. This Actor does the cleanup once and
hands you ready-to-analyze rows, including a **cluster-buy flag** that highlights the
strongest signal — multiple insiders buying the same stock at the same time.

Use it for: insider-sentiment screening, investment research, alerting, alternative-data
pipelines, and enriching financial dashboards.

### How to use it

1. Click **Try for free**.
2. Leave the input empty for **yesterday's market-wide feed**, or add **tickers** (e.g. `NVDA`)
   to focus on specific companies.
3. Optionally set a **date range**, a **minimum dollar value**, or **transaction type**.
4. Click **Start**, then download results from the **Output** tab.

### Input

| Field | Description |
|---|---|
| `dateFrom` / `dateTo` | Filing date window (YYYY-MM-DD). Defaults to yesterday→today. |
| `tickers` / `ciks` | Restrict to specific companies. Empty = whole market. |
| `transactionTypes` | Filter to purchases, sales, grants, or option exercises. |
| `minTotalValue` | Hide trades below a dollar threshold. |
| `includeDerivative` | Include options/derivative transactions. |
| `maxResults` | Cap the number of returned rows. |
| `contactEmail` | Used in the SEC-required User-Agent header. |

### Output

Each row is one insider transaction. You can download the dataset in JSON, HTML, CSV, or Excel.

```json
{
  "filedAt": "2026-07-01",
  "ticker": "NVDA",
  "companyName": "NVIDIA CORP",
  "insiderName": "Huang Jen-Hsun",
  "insiderRoles": ["Director", "President and CEO"],
  "transactionType": "Purchase",
  "shares": 10000,
  "pricePerShare": 124.5,
  "totalValue": 1245000,
  "isClusterBuy": false,
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/1045810/0001045810-26-000123.txt"
}
````

### Data table

| Field | Meaning |
|---|---|
| filedAt / transactionDate | When reported / when traded |
| ticker / companyName / cik | The issuer |
| insiderName / insiderRoles | Who traded and their role |
| transactionType / transactionCode | Decoded and raw SEC code |
| shares / pricePerShare / totalValue | Size of the trade (total computed) |
| sharesOwnedAfter / pctOwnershipChange | Resulting position |
| ownershipType | Direct vs indirect holding |
| isDerivative | Derivative-security transaction, e.g. options |
| isClusterBuy | Multiple insiders buying together |
| accessionNumber | SEC filing identifier |

### How much does it cost?

This Actor uses **pay-per-result** pricing with a **free tier** so you can try it before
scaling. Market-wide daily runs return a few hundred to a few thousand rows depending on
market activity; company-filtered runs are much smaller.

### Tips

- Schedule a **daily** run over `dateFrom = yesterday` for a rolling insider feed.
- Filter `transactionTypes` to `purchase` and set `minTotalValue` to surface only meaningful buys.
- Pipe results to Slack or Google Sheets with Apify **Integrations**.

### Known limitations

- If a filing and its amendment (4/A) both fall in the date window, the duplicate transaction
  is collapsed and only reported once (see the transaction-level dedup logic).

### FAQ, disclaimers, and support

- **Is this legal?** Yes — it reads public SEC EDGAR filings and respects SEC fair-access rules.
- **This is not investment advice.** The Actor reports facts from filings; it makes no recommendations.
- Found a bug or want a new field? Use the **Issues** tab. Custom solutions are available on request.

# Actor input Schema

## `dateFrom` (type: `string`):

Earliest filing date to include (YYYY-MM-DD). Defaults to yesterday.

## `dateTo` (type: `string`):

Latest filing date to include (YYYY-MM-DD). Defaults to today.

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

Limit to these ticker symbols (e.g. NVDA). Leave empty for the market-wide feed.

## `ciks` (type: `array`):

Limit to these SEC CIK numbers. Alternative to tickers.

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

Filter to specific types. Empty = all.

## `minTotalValue` (type: `integer`):

Hide transactions below this dollar value. 0 = no filter. Transactions with no reported price (e.g. grants) are excluded when this is set above 0.

## `includeDerivative` (type: `boolean`):

Include options and other derivative-table transactions.

## `maxResults` (type: `integer`):

Maximum number of transactions to return. Set 0 to return no rows.

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

Used in the SEC-required User-Agent header. Strongly recommended.

## Actor input object example

```json
{
  "tickers": [],
  "ciks": [],
  "transactionTypes": [],
  "minTotalValue": 0,
  "includeDerivative": true,
  "maxResults": 1000
}
```

# Actor output Schema

## `dataset` (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 = {
    "tickers": [],
    "ciks": [],
    "transactionTypes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("b3lch/sec-insider-trading").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": [],
    "ciks": [],
    "transactionTypes": [],
}

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=b3lch/sec-insider-trading",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEC Insider Trading (Form 4) Scraper",
        "description": "Scrape SEC EDGAR Form 4 insider-trading filings into a clean, enriched dataset: who bought or sold their own company stock, market-wide or by ticker — with dollar values, decoded transaction types, and cluster-buy detection.",
        "version": "0.2",
        "x-build-id": "LZNEobtBTity741Y7"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/b3lch~sec-insider-trading/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-b3lch-sec-insider-trading",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/b3lch~sec-insider-trading/runs": {
            "post": {
                "operationId": "runs-sync-b3lch-sec-insider-trading",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/b3lch~sec-insider-trading/run-sync": {
            "post": {
                "operationId": "run-sync-b3lch-sec-insider-trading",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "dateFrom": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Earliest filing date to include (YYYY-MM-DD). Defaults to yesterday."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Latest filing date to include (YYYY-MM-DD). Defaults to today."
                    },
                    "tickers": {
                        "title": "Tickers",
                        "type": "array",
                        "description": "Limit to these ticker symbols (e.g. NVDA). Leave empty for the market-wide feed.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ciks": {
                        "title": "CIKs",
                        "type": "array",
                        "description": "Limit to these SEC CIK numbers. Alternative to tickers.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "transactionTypes": {
                        "title": "Transaction types",
                        "type": "array",
                        "description": "Filter to specific types. Empty = all.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "purchase",
                                "sale",
                                "grant",
                                "optionexercise"
                            ],
                            "enumTitles": [
                                "Purchase",
                                "Sale",
                                "Grant",
                                "Option Exercise"
                            ]
                        }
                    },
                    "minTotalValue": {
                        "title": "Minimum total value (USD)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Hide transactions below this dollar value. 0 = no filter. Transactions with no reported price (e.g. grants) are excluded when this is set above 0.",
                        "default": 0
                    },
                    "includeDerivative": {
                        "title": "Include derivative transactions",
                        "type": "boolean",
                        "description": "Include options and other derivative-table transactions.",
                        "default": true
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of transactions to return. Set 0 to return no rows.",
                        "default": 1000
                    },
                    "contactEmail": {
                        "title": "Contact email",
                        "type": "string",
                        "description": "Used in the SEC-required User-Agent header. Strongly recommended."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
