# SEC Insider Trading Scraper: Form 4 Buys & Sells (`digital_influx/sec-insider-trades`) Actor

Insider purchases and sales from SEC Form 4 filings on EDGAR: director, officer and 10% owner trades with shares, price, value, holdings after and the 10b5-1 plan flag. Filter by ticker, transaction type and value.

- **URL**: https://apify.com/digital_influx/sec-insider-trades.md
- **Developed by:** [Bruno Petrelli](https://apify.com/digital_influx) (community)
- **Categories:** Business, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 insider transaction saveds

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

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

**Every insider purchase and sale reported to the SEC on Form 4**, read straight from EDGAR: directors, officers and 10% owners of US public companies, with the shares, price, total value, the holdings after the trade and whether it was made under a Rule 10b5-1 plan.

No account, no API key, no proxies: the Actor reads EDGAR's daily form index and the Form 4 XML of each filing, as the SEC documents for automated access (declared User-Agent, under 10 requests a second).

### Who uses it

- **Investors and analysts:** insider buying in the companies they follow, cluster buys, large discretionary sales.
- **Trading and research tools:** a clean daily feed of Form 4 transactions with codes, prices and values.
- **Journalists and compliance teams:** who sold what, when, and whether it was pre-planned.

### What you get

One row per transaction (Table I of the Form 4; Table II too with *Include derivative transactions*):

| Field | Example |
|---|---|
| `filedAt`, `transactionDate`, `periodOfReport` | 2026-10-01, 2026-09-29 |
| `ticker`, `issuerName`, `issuerCik` | AAPL, Apple Inc., 320193 |
| `insiderName`, `insiderCik`, `insiderRoles` | Newstead Jennifer, SVP, GC and Government Affairs |
| `isDirector`, `isOfficer`, `officerTitle`, `isTenPercentOwner`, `isOther` | The insider's relationship to the company |
| `transactionCode`, `transactionType` | `S`, Open market or private sale |
| `shares`, `pricePerShare`, `value` | 2399, 336.18, 806495.82 (shares × price) |
| `acquiredOrDisposed`, `sharesOwnedAfter`, `ownership`, `ownershipNature` | `D`, 41992, `direct` (or `indirect`, "By Trust") |
| `planned10b5_1` | `true` when the filer checked the Rule 10b5-1 plan box |
| `securityTitle`, `table` | Common Stock, `non-derivative` |
| `otherReportingOwners` | Other filers of a joint Form 4 (funds and their managers) |
| `accessionNumber`, `filingUrl`, `retrievedAt` | The filing on EDGAR |

The **OUTPUT** record has the days read, the totals, the count by transaction code and any request that failed.

### Input

Insider sales and purchases at eight large tech companies in the last two weeks:

```json
{
  "tickers": ["NVDA", "AAPL", "MSFT", "AMZN", "META", "GOOGL", "TSLA", "AVGO"],
  "filedWithinDays": 14,
  "maxResults": 50
}
```

Open market purchases of USD 100,000 or more by any insider yesterday, without 10b5-1 plans:

```json
{
  "transactionCodes": ["P"],
  "minValue": 100000,
  "excludePlannedTrades": true,
  "filedWithinDays": 1
}
```

Every transaction of the directors of two companies in the last month, options included:

```json
{
  "tickers": ["JPM", "XOM"],
  "transactionCodes": [],
  "roles": ["director"],
  "includeDerivative": true,
  "filedWithinDays": 30
}
```

| Field | What it does |
|---|---|
| `tickers` | Only these companies' Form 4 filings are opened (fast). Empty = every Form 4 of the days, about 750 a day. |
| `filedWithinDays` | The days of filings to read (1 by default, up to 30). |
| `transactionCodes` | P and S by default; an empty list keeps every code. The codes are those of the Form 4 instructions (General Instruction 8). |
| `roles` | Director, officer, 10% owner or other. |
| `minValue` | Minimum shares × price in USD. |
| `excludePlannedTrades` | Leave out trades made under a Rule 10b5-1 plan. |
| `includeDerivative`, `includeAmendments` | Table II rows (options, RSUs) and Form 4/A amendments. |
| `maxResults` | Transactions saved in the run (1,000 by default). |
| `onlyNew` + `memoryName` | For daily runs: skip the filings earlier runs of the same search saved. The memory lives in a key-value store named `sec-insider-trades-state`. |

### How much it costs

Pay per event: **only for the transactions saved**. Transactions left out by your filters are free. Measured on 2026-10-02: eight large tech tickers over 14 days took 39 requests and about 13 seconds, and gave 48 sales (46 of them under 10b5-1 plans). Without tickers, one day of Form 4 filings is about 750 filings, read at 5 a second: about 2 to 3 minutes per day.

### Use it from AI agents (MCP)

Claude, ChatGPT, Cursor and any other MCP client can run this Actor as a tool: add `https://mcp.apify.com?tools=digital_influx/sec-insider-trades` as a remote MCP server and sign in with your Apify account. It is also one of the tools of Company Research MCP (`digital_influx/company-research-mcp`), by the same author, made for agents.

### Good to know

- **Filings, not trades in real time.** Insiders have two business days to file; EDGAR publishes each day's index after the day ends, so today's filings appear tomorrow.
- **One row per transaction.** A filing with several trades (sales at different prices) gives several rows; the value of each is its shares × price. Prices are what the filer reported, often a weighted average explained in a footnote.
- **Joint filings** (a fund and its managers) list the first reporting owner as the insider and the others in `otherReportingOwners`.
- **Some Form 4 filings have no Table I rows** (only options): they give rows only with *Include derivative transactions*.
- **Requests:** at most 5 a second, half of the 10 the SEC allows, so two runs from the same address still fit. After 3 refusals in a row the run stops and says to try again in about 10 minutes.

### Source

U.S. Securities and Exchange Commission, EDGAR: the daily form index and the Form 4 filings (ownership XML). EDGAR data is public domain. The SEC does not endorse this Actor.

# Actor input Schema

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

Company tickers, e.g. NVDA, AAPL. Only their Form 4 filings are opened, which is fast. Empty = every Form 4 of the days (about 750 a day, a few minutes per day).

## `filedWithinDays` (type: `integer`):

Form 4 filings of the last N days (EDGAR publishes each day's index after the day ends).

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

Form 4 transaction codes to keep. P and S (open market purchases and sales) by default.

## `roles` (type: `array`):

Keep only transactions by these insiders. Empty = all.

## `minValue` (type: `integer`):

Keep transactions whose shares × price is at least this much. Transactions without a price are left out when this is set.

## `excludePlannedTrades` (type: `boolean`):

Trades made under a pre-arranged Rule 10b5-1 plan are scheduled in advance; the discretionary ones say more about what insiders think.

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

Also the rows of Table II: options, warrants and units granted, exercised or expired.

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

Also read Form 4/A amendments, which correct earlier filings. Off by default, so a corrected trade is not counted twice.

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

Transactions saved in this run, newest filing day first. You also never pay more than the spending limit you set for the run.

## `onlyNew` (type: `boolean`):

Skip the Form 4 filings that earlier runs of this same search saved. Schedule it daily. The memory lives in a key-value store named "sec-insider-trades-state" in your account.

## `memoryName` (type: `string`):

By default each search has its own memory. Give a name to share one memory between tasks, or a new name to start over.

## Actor input object example

```json
{
  "tickers": [
    "NVDA",
    "AAPL",
    "MSFT",
    "AMZN",
    "META",
    "GOOGL",
    "TSLA",
    "AVGO"
  ],
  "filedWithinDays": 14,
  "transactionCodes": [
    "P",
    "S"
  ],
  "excludePlannedTrades": false,
  "includeDerivative": false,
  "includeAmendments": false,
  "maxResults": 50,
  "onlyNew": false
}
```

# Actor output Schema

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

No description

## `summary` (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": [
        "NVDA",
        "AAPL",
        "MSFT",
        "AMZN",
        "META",
        "GOOGL",
        "TSLA",
        "AVGO"
    ],
    "filedWithinDays": 14,
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("digital_influx/sec-insider-trades").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": [
        "NVDA",
        "AAPL",
        "MSFT",
        "AMZN",
        "META",
        "GOOGL",
        "TSLA",
        "AVGO",
    ],
    "filedWithinDays": 14,
    "maxResults": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("digital_influx/sec-insider-trades").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": [
    "NVDA",
    "AAPL",
    "MSFT",
    "AMZN",
    "META",
    "GOOGL",
    "TSLA",
    "AVGO"
  ],
  "filedWithinDays": 14,
  "maxResults": 50
}' |
apify call digital_influx/sec-insider-trades --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digital_influx/sec-insider-trades"
        }
    }
}
```

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/vxJ2hEA4MUPY51CNl/builds/KXcP8rpOK1M7ra1cy/openapi.json
