# SEC Insider Trades (Form 4) - Buys & Sells by Ticker (`plainfetch-data/sec-insider-trades`) Actor

Parse SEC Form 4 filings into one row per insider transaction: who (CEO, director, 10% owner), buy or sell, shares, price, dollar value, holdings after and 10b5-1 flag. Filter by ticker, code and size. Net buy/sell summary per company.

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

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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 Trades (Form 4): Buys & Sells by Ticker

Turn SEC **Form 4** filings into one clean row per insider transaction:

- **who** traded (name, CEO/CFO title, director, 10% owner),
- **what** they did (open-market buy, sale, award, option exercise, tax withholding, gift),
- **shares**, **price**, **dollar value** and **holdings after**,
- whether the trade was under a **Rule 10b5-1 plan**,
- a link to the original EDGAR filing.

Each run also returns a per-company summary with buy count, sell count and **net dollar value**.

Built for investors, newsletter writers, quant and fintech apps, IR teams, journalists and AI agents that track insider buying and selling across a watchlist.

### What one row looks like

```json
{"ticker":"NVDA","insiderName":"Teter Timothy S.","officerTitle":"EVP, General Counsel and Sec","transactionDate":"2026-09-21","transactionType":"Open-market sale","shares":12483,"pricePerShare":222.19,"valueUsd":2773637.72,"sharesOwnedAfter":2705637,"filingUrl":"https://www.sec.gov/Archives/edgar/data/1045810/…-index.htm"}
```

### Examples

- Open-market buys only (the classic signal) on a watchlist: `{"tickers":["AAPL","MSFT","NVDA","AMZN"],"transactionCodes":["P"],"daysBack":90}`
- Large sales: `{"tickers":["TSLA","META"],"transactionCodes":["S"],"minValueUsd":1000000}`
- Everything, including option rows: `{"tickers":["PLTR"],"transactionCodes":[],"includeDerivative":true}`

### Codes

P purchase · S sale · A award · M option exercise · F tax withholding · G gift · plus every other SEC code, described in words in `transactionType`.

### Notes

- The filing window uses the **filing date**. Each company's most recent ~1,000 EDGAR filings are scanned.
- The Actor respects SEC fair-access rules: a declared User-Agent and at most ~8 requests per second.
- This isn't investment advice.

### How to use it

Add one or more tickers (or SEC CIKs), pick a filing-date window and the transaction codes you care about, and click **Start**. Results appear in the dataset as a table you can download as CSV, Excel or JSON, and the SUMMARY record in the key-value store has the net buy/sell per company.

### Input

| Field | Name | Type | What it does |
|---|---|---|---|
| `tickers` | Tickers | array | US-listed tickers, e.g. AAPL, NVDA, TSLA. Resolved to SEC CIKs automatically. |
| `ciks` | CIKs (optional) | array | SEC CIK numbers for companies without a ticker. |
| `daysBack` | Filed in the last N days | integer | Form 4 filing-date window. |
| `transactionCodes` | Transaction codes | array | SEC codes to keep: P = open-market buy, S = open-market sale, A = award, M = option exercise, F = tax withholding, G = gift. Empty = all. |
| `minValueUsd` | Minimum value (USD) | integer | Only transactions worth at least this much (shares x price). |
| `includeDerivative` | Include derivative transactions | boolean | Also return option/RSU rows from Table II. |
| `maxFilingsPerCompany` | Max filings per company | integer | Cap on Form 4 filings read per company. |
| `userAgent` | SEC User-Agent (optional) | string | SEC asks for a name and contact email in the User-Agent. Leave empty to use the Actor's default. |

### Output fields

| Field | Meaning |
|---|---|
| `ticker` | Issuer ticker |
| `issuerName` | Issuer |
| `issuerCik` | Issuer CIK |
| `insiderName` | Reporting insider |
| `insiderCik` | Insider CIK |
| `insiderRoles` | Director / Officer / 10% owner / Other |
| `officerTitle` | Officer title |
| `additionalReportingOwners` | Other joint filers |
| `form` | 4 or 4/A |
| `filingDate` | Filed with SEC |
| `transactionDate` | Trade date |
| `transactionCode` | SEC transaction code |
| `transactionType` | Code in words |
| `acquiredOrDisposed` | Acquired or Disposed |
| `securityTitle` | Security |
| `isDerivative` | Derivative (Table II) row |
| `shares` | Shares |
| `pricePerShare` | Price per share (USD) |
| `valueUsd` | Shares x price |
| `sharesOwnedAfter` | Holdings after the trade |
| `directOrIndirect` | Direct or Indirect ownership |
| `rule10b5_1Plan` | Filer ticked the Rule 10b5-1 plan box |
| `accessionNumber` | EDGAR accession number |
| `filingUrl` | EDGAR filing index page |
| `source` | Data source |

### Use it from the API

Run it from your own code with the Apify API (replace `$APIFY_TOKEN` with your own token):

```
curl -X POST "https://api.apify.com/v2/acts/plainfetch-data~sec-insider-trades/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tickers":["AAPL","NVDA"],"transactionCodes":["P"],"daysBack":90}'
```

It also works with the Apify Python and JavaScript clients, Make, Zapier, n8n and MCP-based AI agents.

### FAQ

**Is this the same data as the SEC website?**
Yes. Every row is parsed from the Form 4 XML filed on SEC EDGAR, and each row links to the original filing so you can check it.

**How do I see only insider buying?**
Set `transactionCodes` to `["P"]`. P is an open-market purchase, the code most investors watch.

**Can I track a whole watchlist every day?**
Yes. Add your tickers, set `daysBack` to 1 or 2, and schedule the Actor daily in Apify Schedules. Export to CSV, Excel, JSON or Google Sheets, or call it from the API.

**What is the 10b5-1 flag?**
`rule10b5_1Plan` is true when the filing marks the trade as made under a pre-arranged Rule 10b5-1 trading plan. Planned sales usually carry less signal than discretionary ones.

**Does it cover Form 3 and Form 5?**
Not yet. It reads Form 4 and 4/A only.

### Pricing

Free while in beta: you pay only your Apify platform usage. Pay-per-event pricing may be added later, with the advance notice Apify requires.

### Data source

U.S. Securities and Exchange Commission, EDGAR (https://www.sec.gov/edgar). This is public U.S. government data.
Plainfetch is an independent tool. It isn't affiliated with or endorsed by the SEC.

### Local development

```
pip install -r requirements.txt pytest
python -m pytest tests
python -m src   # reads storage/key_value_stores/default/INPUT.json
```

# Actor input Schema

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

US-listed tickers, e.g. AAPL, NVDA, TSLA. Resolved to SEC CIKs automatically.

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

SEC CIK numbers for companies without a ticker.

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

Form 4 filing-date window.

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

SEC codes to keep: P = open-market buy, S = open-market sale, A = award, M = option exercise, F = tax withholding, G = gift. Empty = all.

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

Only transactions worth at least this much (shares x price).

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

Also return option/RSU rows from Table II.

## `maxFilingsPerCompany` (type: `integer`):

Cap on Form 4 filings read per company.

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

SEC asks for a name and contact email in the User-Agent. Leave empty to use the Actor's default.

## Actor input object example

```json
{
  "tickers": [
    "NVDA",
    "AAPL"
  ],
  "daysBack": 30,
  "transactionCodes": [
    "P",
    "S"
  ],
  "includeDerivative": false,
  "maxFilingsPerCompany": 200
}
```

# Actor output Schema

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

One row per transaction, newest first per company.

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

SUMMARY record: buys, sells and net dollar value per company.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,plainfetch-data/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/97m8Ze9Cf0c4IKe8x/builds/M1Z5GD1hUiGf6hS6g/openapi.json
