# Insider Trading API - SEC Form 4 Buys, Sells + Clusters (`martin10291/insider-trading-api`) Actor

Insider trading data from SEC Form 4, no API key: one clean row per insider buy or sell (insider, role, open-market purchase/sale, shares, price, USD value, holdings after, 10b5-1 plan flag, filing link). Filter by ticker, insider, type, minimum value, date. Cluster-buy mode finds 3+ insiders buying

- **URL**: https://apify.com/martin10291/insider-trading-api.md
- **Developed by:** [Martin Petrov](https://apify.com/martin10291) (community)
- **Categories:** Agents, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.70 / 1,000 results

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

## Insider Trading API - SEC Form 4 Buys, Sells + Clusters

**Problem:** "are insiders buying this stock?" The answer is in SEC Form 4 filings, but every filing is a separate XML file on EDGAR with codes, footnotes and several owners. Investors, trading bots, fintech apps, newsletters and AI agents need **one clean row per insider trade**, filtered by ticker, insider and type, and the strong signal: **several insiders buying the same stock at once**.

This API turns SEC Form 4 into one normalized row per transaction. No API key, no login. Usable from AI agents via MCP.

- **One row per trade:** insider name and CIK, role (director / officer / 10% owner) and title, transaction date, SEC code with plain-English meaning (P = open-market purchase, S = open-market sale, A = award, M = option exercise, F = tax withholding, G = gift...), shares, price, **USD value**, shares owned after, direct/indirect, footnotes, link to the filing on sec.gov
- **10b5-1 flag:** pre-planned sales are marked (`is10b5_1Plan`), so you can keep only discretionary trades (`excludePlans`)
- **Cluster buys** (`mode: clusters`): stocks where 3+ different insiders made open-market purchases within 14 days (both adjustable), with total value and filing links. Affiliated owners on one filing count once
- **Filters:** ticker(s), issuer CIK, insider, type (buy / sell / any SEC code), minimum USD value, role, date range, last N days, derivatives on/off
- **Only-new mode** with a Monitor ID: schedule daily for your watch list and get each new insider trade once
- **Coverage:** on the marketplaces (RapidAPI, API.market, x402, MCP) answers come from our index of 800,000+ Form 3/4/5 transactions since 2024-Q4 (SEC Insider Transactions Data Sets + daily Form 4 filings, refreshed hourly), typically in under 0.5 s. This Apify actor reads the newest Form 4 filings live from EDGAR (a ticker answers in ~5 s)

### Quick start (API)

```bash
curl -X POST "https://api.apify.com/v2/acts/martin10291~insider-trading-api/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ticker":"NVDA","type":"sell","limit":20}'
```

Market-wide insider buying over $100k (default input): `{"type":"buy","sinceDays":30,"minValue":100000}`. Cluster buys of one stock: `{"ticker":"BW","mode":"clusters"}`. Daily watch list: `{"ticker":"AAPL,MSFT,TSLA","onlyNew":true,"monitorId":"portfolio"}`.

Example row (real response 2026-11-16, verified against the filing on sec.gov):

```json
{
 "filingDate": "2026-11-13",
 "ticker": "AKAM",
 "issuerName": "AKAMAI TECHNOLOGIES INC",
 "insiderName": "LEIGHTON F THOMSON",
 "insiderRoles": ["director", "officer"],
 "officerTitle": "Chief Executive Officer",
 "transactionDate": "2026-11-13",
 "transactionCode": "P",
 "transactionType": "open-market purchase",
 "acquiredDisposed": "acquired",
 "shares": 30000,
 "pricePerShare": 85.08,
 "valueUsd": 2552400,
 "sharesOwnedAfter": 2559963,
 "ownership": "indirect",
 "is10b5_1Plan": false,
 "filingUrl": "https://www.sec.gov/Archives/edgar/data/1086222/000110623226000012/",
 "source": "SEC EDGAR Form 4"
}
```

### Use from AI agents (MCP)

Add the Apify MCP server with this actor, then ask: "Which insiders bought NVDA shares in the last 90 days?" or "Find cluster insider buying this month over $500k".

```json
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=martin10291/insider-trading-api"}}}
```

### Input

| Field | Meaning |
|---|---|
| `mode` | `trades` (default), `clusters`, `latest` (newest filings by filing date) |
| `ticker` | One or more tickers, comma separated (BRK.B or BRK-B) |
| `cik` / `insider` | Issuer CIK; insider CIK or name part |
| `type` | `buy`, `sell`, `all` or SEC codes `P,S,A,M,F,G...` |
| `minValue` | Minimum USD value (cluster total in clusters mode) |
| `sinceDays`, `since`, `until` | Date filters (transaction date) |
| `role` | `director`, `officer`, `ten_percent_owner` |
| `excludePlans`, `derivatives` | Drop 10b5-1 plan trades; include options/RSU rows |
| `clusterDays`, `minInsiders` | Cluster window (14) and minimum insiders (3) |
| `onlyNew`, `monitorId` | Return each trade once per watch list |

### FAQ

**How fresh is the data?** Insiders must file Form 4 within 2 business days of a trade. The live actor reads EDGAR at run time; the marketplace index adds new filings every hour.

**Why is a price missing or 0?** Awards, gifts and some option exercises have no price; `valueUsd` is then `null` instead of a wrong number.

**What happens on bad input?** An unknown ticker or a wrong date range ends the run cleanly with a clear message in `RUN_SUMMARY.lastError` (no failed run, no charge for empty results).

**What are the limits?** Live mode reads up to 60 newest filings per ticker and up to ~300 filings market-wide per run; market-wide cluster search needs a ticker on Apify.

### Data source and limits

- SEC EDGAR Form 4 filings and the SEC Insider Transactions Data Sets: US Government works, public domain. Read with a declared user agent within SEC fair-access limits (under 5 requests/second). Every row links to the official filing.
- Data is as filed: amendments (4/A) appear as their own rows; prices are what the insider reported (weighted average prices are explained in `footnotes`).
- No personal addresses are returned, only the name, CIK and role that the insider reports publicly.
- Live mode on Apify reads up to 60 newest filings per ticker; for deep history and market-wide clusters use our marketplace API (same rows, 2-year index).
- Not investment advice.

Price: $1.00 per 1,000 rows. Each run also writes `RUN_SUMMARY` (params, rows, seconds, lastError) to the key-value store.

# Actor input Schema

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

trades = one row per insider transaction (newest first); clusters = stocks where several different insiders made open-market purchases within clusterDays (needs a ticker or cik on this Apify version); latest = newest Form 4 filings across the market by filing date.

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

US stock ticker(s), comma separated, e.g. 'NVDA' or 'AAPL,MSFT'. Share classes work with a dot or dash (BRK.B). Empty = whole market.

## `cik` (type: `string`):

Or the SEC CIK number of the company (issuer), e.g. 1045810 for NVIDIA.

## `insider` (type: `string`):

Insider CIK (works market-wide) or a name part (needs a ticker here), e.g. 'Huang'.

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

buy (open-market purchase, code P), sell (open-market sale, code S), all, or SEC codes comma separated (P,S,A,M,F,G,D,C,X,J...). Empty = all.

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

Only transactions worth at least this many US dollars (shares x price). In clusters mode it applies to the cluster total.

## `sinceDays` (type: `integer`):

Only transactions from the last N days.

## `since` (type: `string`):

Only transactions on or after this date, YYYY-MM-DD.

## `until` (type: `string`):

Only transactions on or before this date, YYYY-MM-DD.

## `role` (type: `string`):

director, officer or ten_percent_owner (comma list). Empty = all.

## `excludePlans` (type: `boolean`):

Drop trades made under a pre-arranged Rule 10b5-1 trading plan (scheduled sales say less than discretionary buys).

## `derivatives` (type: `boolean`):

Also return derivative-table rows (options, RSUs, warrants). Default only common-stock (non-derivative) transactions.

## `limit` (type: `integer`):

Maximum rows returned, newest first.

## `clusterDays` (type: `integer`):

Clusters mode: purchases must fall within this many days.

## `minInsiders` (type: `integer`):

Clusters mode: at least this many different insiders buying.

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

Return only trades not returned before by a run with the same Monitor ID. Schedule the actor daily to get alerts for new insider trades.

## `monitorId` (type: `string`):

Name of this watch list for only-new mode, e.g. 'my-portfolio'. Each Monitor ID remembers its own seen trades.

## Actor input object example

```json
{
  "mode": "trades",
  "ticker": "NVDA",
  "excludePlans": false,
  "derivatives": false,
  "limit": 25,
  "clusterDays": 14,
  "minInsiders": 3,
  "onlyNew": false,
  "monitorId": "default"
}
```

# Actor output Schema

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

One row per SEC Form 4 transaction, newest first: filingDate, ticker, issuerName, insiderName, insiderRoles, officerTitle, transactionDate, transactionCode, transactionType, acquiredDisposed, shares, pricePerShare, valueUsd, sharesOwnedAfter, ownership, is10b5_1Plan, footnotes, filingUrl. mode=clusters: one row per cluster (ticker, insiders, insiderNames, firstDate, lastDate, totalShares, totalValueUsd, trades, filings).

## `summary` (type: `string`):

RUN_SUMMARY: params, rows saved, seconds, lastError.

# 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 = {
    "ticker": "NVDA"
};

// Run the Actor and wait for it to finish
const run = await client.actor("martin10291/insider-trading-api").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 = { "ticker": "NVDA" }

# Run the Actor and wait for it to finish
run = client.actor("martin10291/insider-trading-api").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 '{
  "ticker": "NVDA"
}' |
apify call martin10291/insider-trading-api --silent --output-dataset

```

## MCP server setup

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

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/ybLYGBCwAqKf0ZhKG/builds/gGDR8E5vZOrSpOxQY/openapi.json
