# SEC Form 4 Insider Trading API: Insider Buys & Sells Feed (`clearfeedlabs/form4-insider-trades`) Actor

Insider buys and sells from official SEC EDGAR Form 4 filings: one row per trade with ticker, insider role, code, shares, price, value, 10b5-1 flag, late-filing flag and cluster-buy alerts. Incremental: pay only for new trades.

- **URL**: https://apify.com/clearfeedlabs/form4-insider-trades.md
- **Developed by:** [Clearfeed Labs](https://apify.com/clearfeedlabs) (community)
- **Categories:** Business, 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 trades

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 Form 4 Insider Trading API: Insider Buys & Sells Feed

**Form 4 Insider Trades** turns new SEC Form 4 filings into a clean feed of insider buys and sells: one row per transaction with issuer, ticker, insider name and role, transaction code with a plain-English label, shares, price, dollar value, shares owned after, direct or indirect ownership, a Rule 10b5-1 plan flag, footnotes, a late-filing flag and amendment info. Turn on cluster detection to get an alert when several insiders buy the same stock within days. Run it on a schedule and you only pay for trades you haven't seen before.

### Why use it

Officers, directors and 10%+ owners must report most trades in their company's stock on Form 4 within two business days. Open-market buys by insiders are one of the most-watched signals in investing, but raw EDGAR data is XML spread across thousands of filings a week, full of routine grants, option exercises and tax withholding. This Actor fixes that:

- **Signal trades by default.** Only open-market purchases (P) and sales (S). Switch on `includeAllCodes` for grants, exercises, gifts and the rest.
- **Every field parsed.** Both the non-derivative and derivative tables, including exercise price, expiration and underlying shares.
- **10b5-1 flag.** From the filing's 10b5-1 checkbox (filings after April 2023) and footnote text, plus the plan adoption date when a footnote states it. Exclude planned trades to see discretionary ones.
- **Late-filing flag.** Filed more than 2 business days after the trade.
- **Amendments handled.** 4/A filings are flagged with the original filing date; optionally keep only the amended rows.
- **Cluster buys.** At least 3 distinct insiders (configurable) buying the same issuer within 14 days (configurable).
- **Incremental.** "Since last run" mode returns new filings only, deduplicated by SEC accession number.

### Example runs

Open a ready-made example with real output, then change the filters to fit your watchlist:

- [Insider open-market buys over $100k (SEC Form 4)](https://apify.com/clearfeedlabs/form4-insider-trades/examples/insider-buys-open-market-form-4)
- [CEO and CFO insider sales outside 10b5-1 plans (SEC Form 4)](https://apify.com/clearfeedlabs/form4-insider-trades/examples/ceo-cfo-insider-sales-form-4)
- [Insider cluster buys: 3+ insiders in 14 days (SEC Form 4)](https://apify.com/clearfeedlabs/form4-insider-trades/examples/insider-cluster-buys-form-4)

### Popular uses

- Daily alerts of insider buys over $100k
- CEO and CFO sales outside a 10b5-1 plan
- Cluster insider buying in small caps
- A watchlist of tickers (`tickers: ["NVDA", "TSLA"]`)
- Late filings and large 10% owner moves
- Insider trading data as CSV or JSON for a quant notebook or backtest

### Input examples

Open-market buys of $100k or more in the last 7 days:

```json
{ "lookbackDays": 7, "transactionCodes": ["P"], "minValueUsd": 100000 }
```

Officer sales that were not under a 10b5-1 plan:

```json
{ "lookbackDays": 7, "transactionCodes": ["S"], "roles": ["officer"], "exclude10b5_1": true }
```

Cluster buys, alerts only:

```json
{ "lookbackDays": 14, "transactionCodes": ["P"], "detectClusters": true, "clusterMinInsiders": 3, "clusterWindowDays": 14, "outputTrades": false }
```

Daily watchlist schedule:

```json
{ "mode": "sinceLastRun", "tickers": ["NVDA", "AAPL", "MSFT"], "stateKey": "big-tech" }
```

### Output

Trade row (abridged, real filing):

```json
{
  "rowType": "trade",
  "accessionNumber": "0000897069-26-001877",
  "formType": "4", "isAmendment": false,
  "filedDate": "2026-10-29",
  "issuerCik": "1512499", "issuerName": "LINDBLAD EXPEDITIONS HOLDINGS, INC.", "ticker": "LIND",
  "reportingOwnerName": "Lindblad Sven-Olof", "isDirector": true, "isOfficer": false, "officerTitle": null, "isTenPercentOwner": true,
  "table": "nonDerivative", "securityTitle": "Common Stock",
  "transactionDate": "2026-10-27", "transactionCode": "S", "transactionCodeLabel": "Open-market or private sale",
  "acquiredDisposed": "D", "shares": 83725, "pricePerShare": 35.46, "valueUsd": 2968888.5,
  "sharesOwnedAfter": 10083674, "directOrIndirect": "D", "natureOfOwnership": null,
  "is10b5_1": true, "planAdoptionDate": "2026-06-17", "lateFiling": false,
  "footnotes": [{ "id": "F1", "text": "The reported sale occurred automatically pursuant to a Rule 10b5-1 trading plan adopted by the reporting person on June 17, 2026..." }],
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/1639304/000089706926001877/0000897069-26-001877-index.htm"
}
```

Cluster alert row: `rowType: "cluster"`, issuer, ticker, `insiderCount`, `insiders`, `firstBuyDate`, `lastBuyDate`, `totalValueUsd`, `tradeCount` and the accession numbers.

`ownershipPctChange` is the trade as a percent of the holding before it, when computable. `valueUsd` is shares × price and is empty when no price is reported.

### What to expect

EDGAR receives roughly 1,000 to 1,500 Form 4 filings on a typical business day. Filings are pre-filtered with the SEC's EDGAR full-text search (by date, form and issuer when you give tickers or CIKs), and each filing's XML is then downloaded at no more than 2 requests per second, the SEC's fair-access pace. So a run with tickers takes seconds, while scanning every filing for a whole week can take 10 minutes or more. `maxFilings` (default 1,500, newest first) caps the scan. For market-wide monitoring, schedule a daily `sinceLastRun` run.

### Pricing

Pay per event: $0.002 per trade returned ($2 per 1,000), $0.01 per cluster-buy alert, plus a tiny per-run start fee. In "Since last run" mode, filings already processed with the same state key are never charged again. See the Pricing tab for current prices. Set a maximum cost per run in the run options.

### Use with AI agents (MCP)

This Actor works as a tool for AI agents through the [Apify MCP server](https://mcp.apify.com). Add `clearfeedlabs/form4-insider-trades` to your MCP client (Claude, Cursor, ChatGPT and others) and ask things like "Which insiders bought NVDA in the last month?" or "Show CEO sales over $1M this week that weren't under a 10b5-1 plan." The structured fields (codes, roles, values, flags) make the answers easy for an agent to filter and explain.

### Alerts and integrations

- **Schedule + webhook:** create an Apify schedule (e.g. weekdays 7 pm ET) with `mode: "sinceLastRun"`, then add a webhook on `ACTOR.RUN.SUCCEEDED` that posts the dataset URL to your endpoint.
- **Zapier:** use the Apify app, trigger "Finished Actor Run", then "Fetch dataset items" and send each insider buy to Slack, email or a spreadsheet.
- **Make:** Apify "Watch Actor Runs" → "Get Dataset Items" → filter `valueUsd > 100000` → Slack or Gmail.
- **Google Sheets:** use the Apify Google Sheets integration, or `=IMPORTDATA("https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=csv&view=overview")`.
- **Python:** `pandas.read_json("https://api.apify.com/v2/datasets/<DATASET_ID>/items?format=json")`.

### Also from Clearfeed Labs

Track private raises too: [SEC Form D Funding Feed](https://apify.com/clearfeedlabs/form-d-funding-feed) turns new Form D filings into a feed of companies that just raised private money. Together they cover private raises and insider trades from official EDGAR data.

### Compliance and data use

- Data comes only from the SEC's official public EDGAR system (full-text search, filing archives and company_tickers.json). No logins, no API keys, no CAPTCHA solving and no proxy tricks.
- We follow the SEC's fair-access policy: a declared User-Agent and at most 2 requests per second (the SEC allows 10), honouring HTTP 429 Retry-After, and we stop if the SEC blocks access.
- Reporting owners' addresses are never included.
- EDGAR full-text search is the SEC's own search backend but not a formally documented API; if it changes, the Actor falls back to the SEC's daily form indexes.
- This is public data, not investment advice. Not affiliated with or endorsed by the U.S. SEC.

### FAQ

**Why do I see fewer trades than filings?** By default only P and S codes are returned. Most Form 4s are grants, exercises and tax withholding.

**Is the 10b5-1 flag reliable?** It uses the filer's own checkbox and footnotes. Older filings and some filers don't state it, so treat `false` as "not stated".

**Are holidays counted for the late flag?** Weekends are skipped; federal holidays are not, so a filing right after a holiday may be flagged late.

**What about multiple reporting owners?** The first owner is shown in the main fields; others are in `otherOwners`.

Built by **Clearfeed Labs**: clean, compliant data feeds. Found an issue or want a feature? Open an issue on the Actor's Issues tab with a small example input. If the Actor helped your workflow, an honest review helps other users decide.

***

More Clearfeed Labs tools: [clearfeedlabs.com](https://clearfeedlabs.com/actors/form4-insider-trades/)

# Actor input Schema

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

Since last run returns only filings not seen before (per stateKey), so schedules pay only for new trades.

## `lookbackDays` (type: `integer`):

Used when dateFrom is empty (and on the first sinceLastRun run).

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

Filing date range start. Max 31 days per run.

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

Defaults to today.

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

Issuer tickers, e.g. NVDA. Resolved with SEC's company_tickers.json.

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

Issuer CIK numbers.

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

Keep trades by any of these roles. Empty = all.

## `officerTitleContains` (type: `array`):

e.g. CEO, Chief Financial. Case-insensitive.

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

SEC codes to keep. Default P (open-market buy) and S (open-market sale).

## `includeAllCodes` (type: `boolean`):

Ignore the code list and return grants, exercises, tax withholding, gifts, etc.

## `excludeRoutine` (type: `boolean`):

Drop A, F, M, G, W unless listed explicitly in Transaction codes.

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

Filter by acquired (A) or disposed (D).

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

shares × price. Trades without a price are dropped when set.

## `exclude10b5_1` (type: `boolean`):

Keep only discretionary trades.

## `only10b5_1` (type: `boolean`):

Keep only trades flagged as under a Rule 10b5-1 plan.

## `onlyLateFilings` (type: `boolean`):

Filed more than 2 business days after the trade.

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

Options, RSUs, warrants rows.

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

Form 4, 4/A or both.

## `dedupeAmendments` (type: `boolean`):

When a 4 and its 4/A are both in this run, keep only the 4/A rows.

## `detectClusters` (type: `boolean`):

Emit a cluster alert row when several distinct insiders buy the same issuer on the open market in a short window. Billed as cluster-alert.

## `clusterMinInsiders` (type: `integer`):

Distinct insiders required.

## `clusterWindowDays` (type: `integer`):

Window for the buys (by transaction date).

## `outputTrades` (type: `boolean`):

Turn off to get only cluster alerts.

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

Newest first. Each filing is one SEC request at 2 req/s.

## `maxTrades` (type: `integer`):

Cap on billed trade rows.

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

Separate sinceLastRun memory per watchlist.

## Actor input object example

```json
{
  "mode": "dateRange",
  "lookbackDays": 2,
  "tickers": [],
  "transactionCodes": [
    "P",
    "S"
  ],
  "includeAllCodes": false,
  "excludeRoutine": true,
  "side": "all",
  "exclude10b5_1": false,
  "only10b5_1": false,
  "onlyLateFilings": false,
  "includeDerivative": true,
  "filingType": "all",
  "dedupeAmendments": false,
  "detectClusters": false,
  "clusterMinInsiders": 3,
  "clusterWindowDays": 14,
  "outputTrades": true,
  "maxFilings": 1500,
  "maxTrades": 1000,
  "stateKey": "default"
}
```

# Actor output Schema

## `trades` (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": [],
    "transactionCodes": [
        "P",
        "S"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clearfeedlabs/form4-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": [],
    "transactionCodes": [
        "P",
        "S",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("clearfeedlabs/form4-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": [],
  "transactionCodes": [
    "P",
    "S"
  ]
}' |
apify call clearfeedlabs/form4-insider-trades --silent --output-dataset

```

## MCP server setup

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