# SEC Insider Trading Monitor (`constant_quadruped/sec-insider-trading-monitor`) Actor

Scrapes and parses SEC Form 4 filings for corporate insider trading activities.

- **URL**: https://apify.com/constant\_quadruped/sec-insider-trading-monitor.md
- **Developed by:** [CQ](https://apify.com/constant_quadruped) (community)
- **Categories:** News, Automation
- **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/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SEC Insider Trading Monitor

Fetches and parses **lawful SEC Form 3/4/5 insider-ownership filings** for a given
company straight from the official **EDGAR** system, and decodes the Section 16
transaction codes into plain English.

> **"Insider trading" here means the routine, legally-mandated disclosure** that
> corporate directors, officers, and 10%+ owners must file under **Section 16** of
> the Securities Exchange Act. A Form 4 filing is required disclosure and **does not
> imply any wrongdoing.** Illegal insider trading (trading on material non-public
> information) is a separate matter and is **not** what these filings represent.

### Key features

- 🔑 **No API key required** — reads the official SEC EDGAR system, which is free and public.
- 🗣️ **Plain-English transaction codes** — every Section 16 code (`P`, `S`, `A`, `M`, `F`, `G`, …) is decoded into a human-readable meaning.
- 🧾 **One record per transaction** — both non-derivative and derivative lines are parsed, with shares, price, value, and dates.
- 📄 **Form 3, 4, and 5** — choose which Section 16 forms to pull.
- 🤝 **SEC fair-access compliant** — sends the SEC-required `User-Agent` and throttles to ~8 req/s (under SEC's ~10 req/s ceiling) with timeouts and backoff.
- ✅ **Fails fast, never hangs** — a missing ticker or a 403 ends with a clear error instead of partial/garbage output.
- 📦 **Export & integration ready** — flat dataset records drop straight into sheets, dashboards, webhooks, or downstream actors.

### Use cases

- **Watchlist monitoring** — schedule a daily run per ticker and get every new Form 4 as it's filed.
- **Quant / research signals** — track insider buying vs. selling clusters as an input to a trading or research model.
- **Compliance & surveillance reference** — pull a clean, decoded record of a company's routine Section 16 disclosures.
- **Journalism & due diligence** — see exactly which officers/directors transacted, when, how many shares, and at what price.
- **Alerting** — connect the dataset to Slack/email/webhook so a new insider filing pings your channel automatically.

### What it does

1. Resolves your ticker to a CIK via `https://www.sec.gov/files/company_tickers.json`.
2. Reads the company's recent filing history from
   `https://data.sec.gov/submissions/CIK##########.json`.
3. Downloads each matching Form 4 (or 3/5) ownership XML from the EDGAR archive.
4. Parses every non-derivative and derivative transaction and pushes one record
   per transaction to the dataset, including the decoded transaction code.

No API key is required. EDGAR is free.

### Input

| Field        | Type    | Default | Notes |
|--------------|---------|---------|-------|
| `symbol`     | string  | —       | **Required.** Ticker, e.g. `AAPL`. |
| `formTypes`  | array   | `["4"]` | Section 16 forms to fetch (`3`, `4`, `5`). |
| `limit`      | integer | `10`    | Max filings to fetch and parse (1–200). |
| `userAgent`  | string  | generic | **SEC requires a descriptive User-Agent or returns HTTP 403.** Use `Your Company your-email@example.com`. |

### Usage example

Input:

```json
{
  "symbol": "AAPL",
  "formTypes": ["4"],
  "limit": 10,
  "userAgent": "Acme Research jane@acme.com"
}
````

Returns one dataset item per parsed transaction, e.g.:

```json
{
  "ticker": "AAPL",
  "issuer": "Apple Inc.",
  "insider": "Borders Ben",
  "relationship": "Officer",
  "officerTitle": "Principal Accounting Officer",
  "formType": "4",
  "securityTitle": "Common Stock",
  "isDerivative": false,
  "transactionCode": "F",
  "transactionCodeMeaning": "Payment of exercise price or tax liability by delivering/withholding securities",
  "acquiredDisposed": "Disposed",
  "shares": 124,
  "pricePerShare": 296.42,
  "transactionValue": 36756.08,
  "transactionDate": "2026-06-15",
  "filingDate": "2026-06-17",
  "accessionNumber": "0001140361-26-025620",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126025620/form4.xml",
  "source": "SEC EDGAR"
}
```

### Output

One dataset item per insider transaction. Key fields: `insider`, `relationship`,
`transactionCode` + `transactionCodeMeaning`, `acquiredDisposed`, `shares`,
`pricePerShare`, `transactionValue`, `transactionDate`, `filingUrl`. See
`.actor/dataset_schema.json`.

`pricePerShare` and `transactionValue` are `null` when the filing expresses the
price only via a footnote (common for grants/awards and tax-withholding events),
and `shares` is `null` when not numerically reported. If a company has no matching
filings in its recent EDGAR history, a single informational record with a `note`
field is pushed instead.

You can export the dataset as JSON, CSV, Excel, or HTML from the run's **Storage**
tab, fetch it via the [Apify API](https://docs.apify.com/api/v2), or forward it with
an [integration](https://docs.apify.com/platform/integrations) (Make, Zapier, Slack,
webhooks, Google Sheets).

#### Transaction codes (Form 4 instructions)

`P` purchase · `S` sale · `A` grant/award · `M` derivative exercise/conversion ·
`F` shares withheld for tax/exercise price · `G` bona fide gift · `D` disposition
to issuer · `C` conversion · `X`/`O` option exercise · and others. The full table
is embedded in `src/main.js` (`TRANSACTION_CODES`).

### SEC fair access

This actor sets the SEC-required `User-Agent` header and throttles to ~8 requests
per second, under the SEC fair-access ceiling of ~10 req/s. Requests time out at
30s and retry transient (429/5xx) errors with backoff, then **fail fast with a
clear error** rather than hanging.

### Limitations

- **One company per run.** The actor requires a `symbol` (ticker) and fetches
  filings for that single issuer. It does not crawl "all insiders" market-wide.
- **Recent filings only.** It reads EDGAR's `filings.recent` block (the issuer's
  most recent ~1,000 submissions), then keeps the first `limit` that match
  `formTypes`. It does not page into the older historical-filing shards, so very
  old transactions are out of scope.
- **Ticker-resolvable issuers only.** Resolution uses SEC's
  `company_tickers.json`; companies without a ticker in that map cannot be looked
  up by symbol.
- **Parsing is regex-based** over the official EDGAR ownership XML. It targets the
  standard `<ownershipDocument>` schema; an unusually-structured or malformed
  filing may yield no parsed transactions (logged and skipped, not fatal).
- A missing/invalid ticker or a 403 from SEC (generic User-Agent) ends the run
  with a clear error message rather than partial/garbage output.

### FAQ

**Is this legal? Is this "insider trading"?**
Yes, it's fully legal public data. "Insider trading" here means the *routine, legally-required* Section 16 disclosure that officers, directors, and 10%+ owners must file. It does not imply wrongdoing and is unrelated to illegal trading on material non-public information.

**Do I need an API key or login?**
No. SEC EDGAR is free and public. You only need to set a descriptive `userAgent` (SEC requires it).

**Why do I have to provide a User-Agent?**
SEC fair-access rules require a descriptive `User-Agent` (ideally with a contact email). Without one, EDGAR returns HTTP 403. The actor sets a generic default but you should use your own.

**Can I monitor the whole market or many companies at once?**
Each run targets one ticker. To cover a watchlist, run the actor once per symbol (e.g. via multiple scheduled tasks) and combine the datasets.

**How current is the data?**
It reads the issuer's most recent EDGAR submissions. Pair it with an [Apify Schedule](https://docs.apify.com/platform/schedules) to capture new filings as they post.

**Why are `pricePerShare` / `shares` sometimes null?**
Some filings express price only in a footnote (common for grants, awards, and tax-withholding events) or don't report a numeric share count. Those fields are `null` rather than guessed.

**How do I get alerted when a new filing lands?**
Connect the dataset to a [webhook or integration](https://docs.apify.com/platform/integrations) (Slack, email, Make, Zapier) so each scheduled run pushes new transactions to you.

### Disclaimer

This actor only reproduces public EDGAR data. It is not investment advice and makes
no claim about the legality or motivation of any reported transaction.

# Actor input Schema

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

Stock ticker of the company whose insider (Form 4) filings you want, e.g. AAPL. Required — this actor fetches filings for one company at a time.

## `formTypes` (type: `array`):

Which Section 16 ownership forms to fetch. 3 = initial ownership, 4 = changes in ownership (the usual insider-trade report), 5 = annual/deferred.

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

Maximum number of matching filings to fetch and parse (1-200).

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

SEC requires a descriptive User-Agent header or it returns HTTP 403. Use the format: "Your Company/App your-email@example.com". A generic default is used if left blank, but SEC recommends declaring your own contact.

## Actor input object example

```json
{
  "symbol": "AAPL",
  "formTypes": [
    "4"
  ],
  "limit": 10,
  "userAgent": "Acme Research jane@acme.com"
}
```

# Actor output Schema

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

Insider transactions with filing/transaction dates, ticker, insider, relationship, transaction code and meaning, direction, shares, price, value, and filing link.

# 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 = {
    "symbol": "AAPL",
    "formTypes": [
        "4"
    ],
    "limit": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("constant_quadruped/sec-insider-trading-monitor").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 = {
    "symbol": "AAPL",
    "formTypes": ["4"],
    "limit": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("constant_quadruped/sec-insider-trading-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "symbol": "AAPL",
  "formTypes": [
    "4"
  ],
  "limit": 10
}' |
apify call constant_quadruped/sec-insider-trading-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=constant_quadruped/sec-insider-trading-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEC Insider Trading Monitor",
        "description": "Scrapes and parses SEC Form 4 filings for corporate insider trading activities.",
        "version": "1.1",
        "x-build-id": "5xeYHSwbL1mzSkZxz"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/constant_quadruped~sec-insider-trading-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-constant_quadruped-sec-insider-trading-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/constant_quadruped~sec-insider-trading-monitor/runs": {
            "post": {
                "operationId": "runs-sync-constant_quadruped-sec-insider-trading-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/constant_quadruped~sec-insider-trading-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-constant_quadruped-sec-insider-trading-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "symbol"
                ],
                "properties": {
                    "symbol": {
                        "title": "Ticker symbol",
                        "type": "string",
                        "description": "Stock ticker of the company whose insider (Form 4) filings you want, e.g. AAPL. Required — this actor fetches filings for one company at a time."
                    },
                    "formTypes": {
                        "title": "Form types",
                        "type": "array",
                        "description": "Which Section 16 ownership forms to fetch. 3 = initial ownership, 4 = changes in ownership (the usual insider-trade report), 5 = annual/deferred.",
                        "default": [
                            "4"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "limit": {
                        "title": "Max filings",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Maximum number of matching filings to fetch and parse (1-200).",
                        "default": 10
                    },
                    "userAgent": {
                        "title": "SEC User-Agent (your contact)",
                        "type": "string",
                        "description": "SEC requires a descriptive User-Agent header or it returns HTTP 403. Use the format: \"Your Company/App your-email@example.com\". A generic default is used if left blank, but SEC recommends declaring your own contact."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
