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

Extract SEC EDGAR Form 4 insider transactions by ticker: who bought or sold, shares, price, value, role, 10b5-1 flag, cluster-buy summary. $0.003/transaction + $0.01 start.

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

## Pricing

from $3.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/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 Trades — Form 4 Buys & Sells by Ticker

Get **SEC EDGAR Form 4 insider transactions** for any US-listed company as clean JSON or CSV: who bought or sold, how many shares, at what price, their role (CEO, CFO, director, 10% owner), whether it was under a **10b5-1 trading plan**, and a link to the official filing. No API key, no login, no proxy: the Actor reads the SEC's public EDGAR data.

Insider buying is one of the most-watched public signals for equity research, quant screens and AI finance agents. Raw Form 4 filings are XML and one filing can hold many transactions; this Actor flattens them into one row per transaction.

### What you get

One record per insider transaction:

| Field | Description |
|---|---|
| `ticker`, `issuer_name`, `issuer_cik` | The company whose shares were traded |
| `insider_name`, `insider_cik` | The reporting person |
| `insider_roles`, `officer_title` | `director`, `officer`, `10%_owner`, `other`, plus the officer title (e.g. Chief Executive Officer) |
| `transaction_date`, `filed_on` | When it happened and when it was filed |
| `transaction_code`, `transaction_type` | SEC code (P, S, A, M, F, G…) and a plain-English label |
| `direction` | `acquired` or `disposed` |
| `shares`, `price_per_share`, `value_usd` | Size of the trade (`value_usd` = shares × price) |
| `shares_owned_after`, `ownership` | Holding after the trade, `direct` or `indirect` |
| `is_10b5_1_plan` | `true` when the filer ticked the 10b5-1 plan box |
| `filing_url`, `accession_number` | Link to the SEC filing |

A run also writes a **`SUMMARY`** record to the key-value store with a per-ticker roll-up: open-market buy and sell totals, net value, distinct buyers and sellers, and a `cluster_buy` flag when three or more different insiders bought on the open market in your window. The summary is free.

### Input

| Field | Description |
|---|---|
| `tickers` | US tickers, e.g. `["AAPL", "NVDA"]` (up to 50 tickers and CIKs per run) |
| `ciks` | Optional issuer CIK numbers |
| `daysBack` / `sinceDate` | Filing window (default last 30 days) |
| `transactionCodes` | Codes to keep. Default `["P", "S"]` (open-market buys and sales). Empty keeps all codes |
| `minValueUsd` | Skip small trades |
| `includeDerivatives` | Also return option/RSU rows (Table II) |
| `includeAmendments` | Also return Form 4/A corrections |
| `maxItems` | Cap on delivered (and charged) transactions, newest first |

#### Example: open-market insider buys over $50k in the last 90 days

```json
{
  "tickers": ["PLTR", "COIN", "SOFI"],
  "daysBack": 90,
  "transactionCodes": ["P"],
  "minValueUsd": 50000,
  "maxItems": 200
}
```

### Pricing

Pay per event: **$0.01 per run** plus **$0.003 per transaction** delivered. A 100-transaction pull costs about **$0.31**. You only pay for rows actually delivered, and the run stops at your maximum cost limit.

### Notes

- Source: SEC EDGAR (`data.sec.gov` submissions API and the raw Form 4 XML). Requests are throttled to stay within the SEC's fair-access limits, and each request carries a contact identifier as the SEC requires. Set `contactEmail` to use your own.
- Filings appear on EDGAR within minutes of being filed (insiders have two business days after a trade to file).
- Many officer sales are pre-scheduled under 10b5-1 plans, so check `is_10b5_1_plan` before reading a sale as a signal.
- This is public-record data, not investment advice.

# Actor input Schema

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

US stock tickers to track, e.g. AAPL, NVDA. Up to 50 tickers and CIKs per run.

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

SEC issuer CIK numbers, for companies without a ticker or when you already have the CIK.

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

Only include Form 4 filings from the last N days (1 to 1825). Ignored if 'Since date' is set.

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

Only include filings on or after this date (YYYY-MM-DD). Overrides 'Days back'.

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

SEC transaction codes to keep. P = open-market purchase, S = open-market sale, A = award, M = option exercise, F = tax withholding, G = gift. Leave empty for all codes.

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

Skip transactions worth less than this (shares × price). 0 keeps everything.

## `includeDerivatives` (type: `boolean`):

Also return option, warrant and RSU rows from Table II of the form.

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

Also return corrected filings. They can duplicate the original transaction.

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

The SEC requires API clients to identify themselves. Leave empty to use the default.

## `maxItems` (type: `integer`):

Maximum number of transactions to return (newest first). You are charged per returned transaction.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "NVDA",
    "TSLA"
  ],
  "ciks": [],
  "daysBack": 30,
  "sinceDate": "",
  "transactionCodes": [
    "P",
    "S"
  ],
  "minValueUsd": 0,
  "includeDerivatives": false,
  "includeAmendments": false,
  "contactEmail": "",
  "maxItems": 100
}
```

# Actor output Schema

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

No description

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

No description

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

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

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

```

## MCP server setup

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