# Track Insider Trades by Name or CIK - SEC Form 4 (`michael_b/stock-insider-by-person`) Actor

Look up SEC Form 4 insider trades for any executive by name or CIK. Returns full cross-company history — all trades across every company they've been affiliated with. Resolves names via SEC EDGAR. Clean JSON for AI agents and LLM pipelines.

- **URL**: https://apify.com/michael\_b/stock-insider-by-person.md
- **Developed by:** [Michal Búci](https://apify.com/michael_b) (community)
- **Categories:** AI, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 insider resolveds

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/platform/actors/running/actors-in-store#pay-per-event

## 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

## Stock Insider By Person — SEC Form 4 Cross-Company Trade History

Track insider trading for any specific executive, director, or officer across **all companies** they have been affiliated with. Unlike ticker-based actors, this one is **person-first**: give it a name or CIK and get back their complete public trading history.

### What it does

Fetches SEC Form 4 filings from [OpenInsider](http://openinsider.com) for one or more named insiders. Returns every open-market purchase, sale, grant, and option exercise on record — across every company they've touched.

**Examples:**
- **Elon Musk** → trades at Tesla, SpaceX, and any other company he's affiliated with
- **Tim Cook** → trades at Apple + his Nike board seat
- **Jensen Huang** → his entire NVIDIA selling history

### Input

One insider per line in the `insiders` field:

| Format | Example | Notes |
|--------|---------|-------|
| CIK number | `1214156` | Most reliable. Skips resolution. |
| Legal name | `Timothy Cook` | Full legal name. SEC uses legal names, not nicknames. |

> ⚠️ **Use legal names, not nicknames.** EDGAR stores `COOK TIMOTHY D`, not `Tim Cook`. If resolution fails, try the full legal name or look up the CIK on [SEC EDGAR](https://www.sec.gov/cgi-bin/browse-edgar) and use that directly.

### Name resolution

When a name is provided the actor searches SEC EDGAR for matching Form 4 filers:

- **One match found** → proceeds automatically
- **Multiple matches** → returns a `disambiguation_required` item listing all candidates with their CIKs and last known company. Re-run with the correct CIK.
- **No match** → returns a `resolution_failed` item. Check spelling or use the CIK.

### Pricing

Pay-per-event: you are charged once per insider successfully resolved and fetched, with all of that person's trades included in that single charge. Lookups that fail to resolve or return multiple matches are still returned to you (so you can see what happened and re-run), but they are never charged.

### Output fields

| Field | Description |
|-------|-------------|
| `insiderCik` | SEC CIK — stable identifier for this person. Use it for future runs. |
| `insiderName` | Name as filed on the Form 4 |
| `ticker` | Stock traded |
| `tradeType` | `purchase`, `sale`, `grant`, `optionExercise`, etc. |
| `valueUsd` | Total USD value (negative = disposal) |
| `quantity` | Shares (negative = disposal) |
| `price` | Price per share |
| `tradeDate` | When the trade was executed |
| `filedAt` | When the Form 4 was filed with the SEC |
| `accessionNumber` | SEC accession number — use for deduplication across runs |

### Use with the stock-insider-trading actor

These two actors are complementary:

1. **stock-insider-trading** — market-wide or per-ticker feed. Discover *which* insiders are active right now.
2. **stock-insider-by-person** — person feed. Deep-dive *one insider's* full history. The `insiderCik` field from actor #1 feeds directly into actor #2 with no manual lookup.

### MCP / AI agent usage

````

npx @apify/actors-mcp-server --tools michael\_b/stock-insider-by-person

````

# Actor input Schema

## `insiders` (type: `array`):

Each line is either a CIK number (e.g. 1214156) or a legal name in 'First [Middle] Last' format (e.g. Elon Musk, Timothy Cook, Jen-Hsun Huang). CIKs skip name resolution and are always unambiguous. Legal names are resolved via SEC EDGAR — use full legal names, not nicknames ('Timothy' not 'Tim').
## `tradeTypes` (type: `array`):

Which transaction types to include. Open-market purchases and sales are the meaningful signals; grants, option exercises, and tax withholdings are mostly compensation noise.
## `daysBack` (type: `integer`):

Only include transactions FILED within the last N days. Set to 0 (default) for the full available history back to ~2003.
## `maxResultsPerPerson` (type: `integer`):

Maximum number of transactions to return per insider. Rows are newest-first. Lower this to keep output small for LLM context windows.

## Actor input object example

```json
{
  "insiders": [
    "Elon Musk",
    "1197649"
  ],
  "tradeTypes": [
    "purchase",
    "sale"
  ],
  "daysBack": 0,
  "maxResultsPerPerson": 500
}
````

# Actor output Schema

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

Dataset of insider transactions per person. Includes cross-company history and disambiguation items when a name matches multiple SEC filers.

# 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 = {
    "insiders": [
        "Elon Musk",
        "1197649"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("michael_b/stock-insider-by-person").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 = { "insiders": [
        "Elon Musk",
        "1197649",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("michael_b/stock-insider-by-person").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 '{
  "insiders": [
    "Elon Musk",
    "1197649"
  ]
}' |
apify call michael_b/stock-insider-by-person --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=michael_b/stock-insider-by-person",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Track Insider Trades by Name or CIK - SEC Form 4",
        "description": "Look up SEC Form 4 insider trades for any executive by name or CIK. Returns full cross-company history — all trades across every company they've been affiliated with. Resolves names via SEC EDGAR. Clean JSON for AI agents and LLM pipelines.",
        "version": "0.1",
        "x-build-id": "eR0c7H1NjbY7qLrHe"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/michael_b~stock-insider-by-person/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-michael_b-stock-insider-by-person",
                "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/michael_b~stock-insider-by-person/runs": {
            "post": {
                "operationId": "runs-sync-michael_b-stock-insider-by-person",
                "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/michael_b~stock-insider-by-person/run-sync": {
            "post": {
                "operationId": "run-sync-michael_b-stock-insider-by-person",
                "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": [
                    "insiders"
                ],
                "properties": {
                    "insiders": {
                        "title": "Insiders (one per line)",
                        "type": "array",
                        "description": "Each line is either a CIK number (e.g. 1214156) or a legal name in 'First [Middle] Last' format (e.g. Elon Musk, Timothy Cook, Jen-Hsun Huang). CIKs skip name resolution and are always unambiguous. Legal names are resolved via SEC EDGAR — use full legal names, not nicknames ('Timothy' not 'Tim').",
                        "items": {
                            "type": "string"
                        }
                    },
                    "tradeTypes": {
                        "title": "Trade Types",
                        "type": "array",
                        "description": "Which transaction types to include. Open-market purchases and sales are the meaningful signals; grants, option exercises, and tax withholdings are mostly compensation noise.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "purchase",
                                "sale",
                                "saleToIssuer",
                                "optionExercise",
                                "grant",
                                "taxWithholding",
                                "gift",
                                "conversion",
                                "inherited",
                                "other"
                            ],
                            "enumTitles": [
                                "Purchase (open market)",
                                "Sale (open market, incl. sale tied to option exercise)",
                                "Sale to issuer",
                                "Option exercise",
                                "Grant / award",
                                "Tax withholding",
                                "Gift",
                                "Derivative conversion",
                                "Inherited",
                                "Other"
                            ]
                        },
                        "default": [
                            "purchase",
                            "sale"
                        ]
                    },
                    "daysBack": {
                        "title": "Days Back",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only include transactions FILED within the last N days. Set to 0 (default) for the full available history back to ~2003.",
                        "default": 0
                    },
                    "maxResultsPerPerson": {
                        "title": "Max Results Per Person",
                        "minimum": 1,
                        "maximum": 10000,
                        "type": "integer",
                        "description": "Maximum number of transactions to return per insider. Rows are newest-first. Lower this to keep output small for LLM context windows.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
