# SEC EDGAR Form 4 Insider Trading & C-Suite Trades Scraper (`jaiveda/sec-edgar-insider-trading`) Actor

Real-time institutional and insider trading intelligence from official SEC EDGAR filings. Extract C-Suite (CEO/CFO), Director, and 10% owner stock purchases and sales with dollar values and share counts.

- **URL**: https://apify.com/jaiveda/sec-edgar-insider-trading.md
- **Developed by:** [Bhavadharini](https://apify.com/jaiveda) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 EDGAR Form 4 Insider Trading & C-Suite Trades Scraper

Extract real-time legal insider stock transactions (purchases, sales, option exercises) filed on **Form 4** directly from the official U.S. Securities and Exchange Commission ([SEC EDGAR](https://www.sec.gov/edgar)) database.

When a **CEO, CFO, Director, or 10%+ owner** buys or sells shares in their own company with their personal capital, they are required by federal law to file a Form 4 within two business days. This Actor parses the official machine-readable XML submissions to give you clean, structured financial signals.

***

### ⚡ Key Features

- **Two Powerful Operating Modes:**
  - **Watchlist Mode (`TICKERS`):** Specify exact stock symbols (e.g. `["NVDA", "TSLA", "AAPL", "PLTR"]`) to retrieve recent insider transactions for your portfolio.
  - **Live Market Stream (`LATEST_STREAM`):** Monitor the real-time SEC Atom feed to capture all insider filings happening across the entire US stock market as they are submitted.
- **Signal Filtering for Traders & Quants:**
  - `Open Market Purchases Only`: Isolate high-conviction bullish insider buys where executives spend their own money to accumulate stock.
  - `Open Market Sales Only`: Track insider liquidation, founder cash-outs, and executive disposals.
  - `Minimum Dollar Value`: Filter out small fractional trades, gifts, or automatic tax withholdings (e.g., minimum $50,000 threshold).
- **Rich Executive Metadata:**
  - Officer title (CEO, CFO, COO, General Counsel).
  - Directorship and 10% principal owner flags.
  - Direct vs. Indirect ownership (e.g., owned by Family Trust, LLC, or Spouse).
  - Total transaction value ($) and post-transaction shareholdings.
- **Zero Proxy Cost & High Reliability:** Uses the SEC's official REST and XML interfaces with standard User-Agent compliance. 0% proxy failure rate!

***

### 💡 Commercial Use Cases

1. **Quant & Algorithmic Trading:** Build automated trading signals based on clustering of insider buying (multiple executives buying in the same week).
2. **Financial Newsletters & Alerts:** Send automated daily or weekly alerts to subscribers when notable tech or biotech CEOs buy millions in stock.
3. **M\&A and Investment Research:** Monitor institutional accumulation and founder ownership changes before quarterly earnings.

***

### 📥 Input Parameters

| Field | Type | Description | Default |
|---|---|---|---|
| `mode` | String | `TICKERS` (watchlist) or `LATEST_STREAM` (market-wide). | `TICKERS` |
| `tickers` | Array | Stock ticker symbols (e.g. `["TSLA", "NVDA", "AAPL"]`). | `["TSLA", "NVDA", "AAPL"]` |
| `transactionFilter` | String | `ALL`, `PURCHASES_ONLY` (bullish buys), `SALES_ONLY`. | `ALL` |
| `minTransactionValue` | Integer | Minimum dollar value ($) of the trade to include. | `10000` |
| `maxItems` | Integer | Maximum number of transaction records to output. | `25` |
| `userContactEmail` | String | Contact email for SEC User-Agent compliance. | `data_analyst@quantresearch.io` |

***

### 📤 Sample Output Data

```json
{
  "data_type": "insider_transaction",
  "ticker": "TSLA",
  "company_name": "Tesla, Inc.",
  "company_cik": "0001318605",
  "insider_name": "Taneja Vaibhav",
  "is_officer": true,
  "officer_title": "Chief Financial Officer",
  "is_director": false,
  "is_ten_percent_owner": false,
  "security_title": "Common Stock",
  "transaction_date": "2026-09-08",
  "transaction_code": "S",
  "transaction_type": "Open Market Sale",
  "action": "SELL",
  "shares": 2605.75,
  "price_per_share": 360.13,
  "total_value": 938428.89,
  "shares_owned_after": 105022.0,
  "ownership_nature": "Direct",
  "filing_url": "https://www.sec.gov/Archives/edgar/data/1318605/000110465926106432/0001104659-26-106432-index.htm",
  "scraped_at": "2026-10-02T13:45:00.000000Z"
}
```

***

### 🚀 How to Deploy & Run

#### Deploy to Apify

```bash
cd C:\python\apify\sec-edgar-insider-trading
apify push
```

#### Run Locally

```bash
apify run
```

# Actor input Schema

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

Choose between monitoring specific company tickers or streaming the latest market-wide filings.

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

List of US stock tickers to track (e.g. 'AAPL', 'TSLA', 'NVDA', 'MSFT', 'META'). Used in Watchlist Mode.

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

Filter by Open Market Purchases (bullish insider buying), Sales, or All transactions.

## `minTransactionValue` (type: `integer`):

Filter out small fractional trades or tax withholdings under this dollar threshold.

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

Maximum number of transactions to collect in this run.

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

Optional contact email to include in the SEC-compliant User-Agent header (format: user@domain.com).

## Actor input object example

```json
{
  "mode": "TICKERS",
  "tickers": [
    "TSLA",
    "NVDA",
    "AAPL"
  ],
  "transactionFilter": "ALL",
  "minTransactionValue": 10000,
  "maxItems": 25,
  "userContactEmail": "data_analyst@quantresearch.io"
}
```

# Actor output Schema

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

JSON dataset containing extracted SEC Form 4 insider trading records.

# 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": [
        "TSLA",
        "NVDA",
        "AAPL"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jaiveda/sec-edgar-insider-trading").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": [
        "TSLA",
        "NVDA",
        "AAPL",
    ] }

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

```

## MCP server setup

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

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/cN9KBcdpJJO2qCbNP/builds/FJUd6cxzrQrHi71Bi/openapi.json
