# SEC Insider Trading: Form 4 Filings, Buying & EDGAR Scraper (`moggedhq/sec-insider-trading-tracker`) Actor

Track SEC Form 4 insider buying and selling by ticker or name: dates, shares, prices, values, holdings, derivative terms, footnotes and SEC filings on EDGAR. $0.002 per transaction plus $0.01 per nonempty export; 100 cost $0.21 plus the start fee. No login.

- **URL**: https://apify.com/moggedhq/sec-insider-trading-tracker.md
- **Developed by:** [mogged](https://apify.com/moggedhq) (community)
- **Categories:** AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 transactions

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Trading: Form 4 Filings, Buying & EDGAR Scraper

For investors, research teams, data engineers and AI agents monitoring reported insider transactions across a company watchlist.

Track SEC Form 4 insider buying, selling, gifts, grants and option exercises by ticker, issuer CIK or reporting-owner name. Get one row per transaction with the trade date, shares, reported price, calculated value, holdings after the trade and direct or indirect ownership. Every row links to the original EDGAR XML.

**$0.002 per transaction plus $0.01 per nonempty export. A 100-transaction export costs $0.21 plus Apify's $0.00005 Actor start charge at the default memory. No source login, SEC API key or paid data subscription.** Bronze, Silver and Gold discounts apply to transaction charges. You can set a maximum spending limit before starting.

### What you get

Flat fields support CSV; owner and footnote arrays retain detail in JSON.

| Field | What it tells you |
| --- | --- |
| `summary` | Plain description of the reported transaction |
| `transactionId` | Stable ID based on accession number, table and row position |
| `ticker`, `company`, `cik` | Issuer symbol, name and ten-digit SEC identifier |
| `insiderName`, `insiderCik`, `insiderTitle` | Selected reporting owner and reported officer title or relationship |
| `isOfficer`, `isDirector`, `isTenPercentOwner` | Relationship flags from the selected owner's filing |
| `transactionDate`, `transactionCode`, `transactionType` | Trade date, exact SEC code and its plain meaning |
| `shares`, `price`, `value` | Reported units and transaction price; value is units multiplied by price |
| `sharesOwnedAfter` | Reported holdings following the transaction |
| `directOrIndirect`, `natureOfOwnership` | D or I, with trust or other ownership description when supplied |
| `acquiredOrDisposed` | Original A or D acquisition/disposition flag |
| `securityTitle`, `isDerivative` | Security description and transaction table |
| `exercisePrice`, `exerciseDate`, `expirationDate` | Derivative terms when reported |
| `underlyingSecurityTitle`, `underlyingShares` | Security underlying a derivative transaction |
| `reportingOwners`, `reportingOwnerCount` | All reporting owners and their individual relationship flags |
| `is10b51`, `mentions10b51` | Filing checkbox and a separate flag for a reference in this row's footnotes |
| `filingDate`, `periodOfReport` | Filing date and disclosed reporting period |
| `formType`, `isAmendment`, `dateOfOriginalSubmission` | Original Form 4 or amendment context |
| `accessionNumber`, `filingUrl`, `xmlUrl`, `url` | Filing identifier, index and original XML audit links |
| `transactionIndex` | Zero-based position within the selected transaction table |
| `footnotes`, `transactionFootnotes` | Filing notes and the subset referenced by this transaction |
| `transactionFootnoteIds`, `fieldFootnoteIds` | References linking individual fields to the filer explanations |
| `rawValues` | Original textual shares, price and holdings amounts |
| `firstInExport` | True on the first delivered row, which carries the one-time export fee |
| `valueIsCalculated`, `source`, `scrapedAt` | Calculation flag, SEC source label and collection timestamp |

Unknown values stay `null`. A reported price of zero remains zero. When a price is given only through a footnote, the text is retained and the numeric price remains null. The Actor does not infer a weighted-average price from a range in prose.

### Start with your watchlist

1. Enter company `tickers`, issuer `ciks`, or `insiderNames`. The form prefills two tickers and 20 transactions.
2. Choose a filing-date window and any transaction-type or value filters. Omit both dates for the last 30 days through today in UTC.
3. Start the run and open its dataset. Export JSON, CSV or Excel, or pass the rows to your existing data workflow.

```json
{
  "tickers": ["AAPL", "MSFT"],
  "maxItems": 20
}
```

The cloud prefill delivered 20 unique transactions with 20 settled transaction charges on 17 November 2026.

### Observed transaction example

Abbreviated record collected on 17 November 2026. The complete row also includes reporting-owner details, derivative fields and footnotes.

```json
{
  "summary": "AAPL: Sale, 2,399 shares at a reported value of 842,912.64.",
  "transactionId": "7016743031592b24351a5bee04345887",
  "ticker": "AAPL",
  "company": "Apple Inc.",
  "cik": "0000320193",
  "transactionDate": "2026-11-10",
  "transactionCode": "S",
  "shares": 2399,
  "price": 351.36,
  "value": 842912.64,
  "sharesOwnedAfter": 27598,
  "directOrIndirect": "D",
  "is10b51": true,
  "accessionNumber": "0001140361-26-043484",
  "xmlUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126043484/form4.xml"
}
```

### Inputs

| Input | Meaning and default |
| --- | --- |
| `tickers` | Array of company symbols; no API default. Form prefill: AAPL and MSFT |
| `ciks` | Array of issuer CIK strings; leading zeros optional |
| `insiderNames` | Case-insensitive substring filters across all owners; OR within the list |
| `transactionTypes` | Buy, sell, option exercise, gift, grant, tax withholding, or raw SEC codes; empty keeps every code |
| `dateFrom`, `dateTo` | Inclusive **filing-date** bounds in YYYY-MM-DD; last 30 days to today when omitted |
| `transactionDateFrom`, `transactionDateTo` | Optional actual trade-date bounds, applied after XML parsing |
| `minValue` | Minimum shares-times-price value; default 0 keeps unknown values |
| `maxItems` | Maximum unique transaction rows across the whole input; default 20, up to 100,000 |
| `maxResults` | Optional result-cap alias; the smaller of this and `maxItems` wins |
| `includeDerivatives` | Include Table II transactions; default true |
| `includeAmendments` | Include Form 4/A as separate disclosures; default true |
| `includeFootnotes` | Include footnote text; default true. Reference IDs remain when false |
| `proxyConfiguration` | Automatic datacenter route with US residential retry; explicit buyer routing is respected |

Tickers and CIKs are combined, then resolved issuers are deduplicated. Name filters, transaction codes, dates and the minimum value combine with AND; multiple names or codes combine with OR inside their own lists. Insider names alone use SEC full-text search for candidate filings and then verify actual reporting-owner names from the XML.

`maxResults` can reduce a platform-added `maxItems=20` default. For example, `maxResults=3` returns at most three transactions. When you explicitly supply `maxItems=2` and `maxResults=5`, the limit is two. To request larger exports, set `maxItems` directly.

#### Purchases with a value floor

```json
{
  "tickers": ["AAPL", "MSFT", "NVDA", "TSLA", "AMZN"],
  "transactionTypes": ["buy"],
  "minValue": 10000,
  "maxItems": 50
}
```

The buy filter means SEC code P. The sell filter means S; it does not silently include tax-withholding code F. Option exercise means M. A gift is G. Use an empty transaction-type list to inspect the full mix.

#### An issuer export with trade-date filters

```json
{
  "ciks": ["320193"],
  "dateFrom": "2026-10-01",
  "dateTo": "2026-11-17",
  "transactionDateFrom": "2026-10-01",
  "transactionDateTo": "2026-10-31",
  "includeDerivatives": true,
  "includeAmendments": true,
  "maxItems": 100
}
```

Widen the filing window when you want to catch reports filed after the trade period.

### Reading the results

The **Transactions** view presents the main financial and ownership fields. **Owners and footnotes** shows the complete reporting-owner array and the references needed to read the explanations. **Derivative terms** adds strike, exercise and expiry information to the table; use `isDerivative` to select Table II rows in your export.

A joint filing produces one row per reported transaction, with all owners attached. The first owner supplies the convenient flat name fields unless a name filter selects another matching owner. Changing the selected owner does not change the stable transaction ID.

The free `SUMMARY` record reports delivered and charged transactions, source failures, candidate and processed filings, and cap flags. `discoveryExhausted` identifies complete discovery processing. Empty filters say `no-matches`; source problems report incomplete coverage. Accepted invalid inputs produce free note rows.

### Pricing and spending control

| Transaction rows delivered | Standard transaction and export charges |
| --- | --- |
| 1 | $0.012 |
| 20 | $0.05 |
| 100 | $0.21 |
| 1,000 | $2.01 |

Add the normal Actor start charge. At the default memory it is $0.00005. Transaction prices are $0.0019 on Bronze, $0.0018 on Silver and $0.0016 on Gold and higher tiers. The $0.01 export fee is fixed across tiers and applies only when at least one transaction is saved. There is no optional detail charge, dataset-item charge or paid source API.

Duplicates, empty filters and failed source checks have no transaction charge. An empty export has no export fee. The export fee is saved and charged with the first transaction; there is no paid export fee without a delivered transaction. A new run is a new export and charges for its delivered transactions again. Within one run, migration recovery reconciles saved rows and accepted charges before delivering more. The maximum charge setting can end a run before `maxItems`; rows already saved remain available.

### Monitor transactions repeatedly

Save a working watchlist as an Apify task and add that task to a schedule. Keep an overlapping filing window so a later accepted filing is included. After each successful run, upsert by `transactionId` in your database to separate newly seen disclosures from repeated snapshot records.

A finished-run webhook can start your import. Use the run's `defaultDatasetId` to retrieve rows and its `defaultKeyValueStoreId` to read `SUMMARY`. Check the summary status before treating an empty dataset as evidence of no activity. A Form 4/A has its own accession number and needs explicit handling in your research database.

### Use from the API

JavaScript:

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('moggedhq/sec-insider-trading-tracker').call({
  tickers: ['AAPL', 'MSFT'], maxItems: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter(row => row.transactionId));
```

Python (`apify-client` 3.x, Python 3.11+):

```python
import os
from apify_client import ApifyClient
client = ApifyClient(os.environ['APIFY_TOKEN'])
run = client.actor('moggedhq/sec-insider-trading-tracker').call(
    run_input={'ciks': ['320193'], 'maxItems': 100}
)
for row in client.dataset(run.default_dataset_id).iterate_items():
    if row.get('transactionId'):
        print(row['ticker'], row['transactionCode'], row['value'])
```

cURL starts a run and returns the run and storage identifiers:

```bash
curl -X POST 'https://api.apify.com/v2/acts/moggedhq~sec-insider-trading-tracker/runs' \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"tickers":["AAPL","MSFT"],"maxItems":20}'
```

Poll the run ID until it finishes, then fetch `/v2/datasets/DATASET_ID/items`. Keep tokens in your environment. Map the flat fields into n8n, Make, Zapier or Sheets.

### Use with AI agents (MCP)

Connect to [Apify MCP](https://mcp.apify.com) and select `moggedhq/sec-insider-trading-tracker`. Give your agent a watchlist, `maxItems` and a spending limit.

A suitable request is: Get the last 30 days of SEC Form 4 transactions for Apple and Microsoft, including derivative terms and footnotes, with at most 100 transaction rows. Read the run summary and retain the source links.

### Limits

- Coverage is public SEC Form 4 and optional Form 4/A ownership XML. This does not include unreported trades, private brokerage activity, Form 13F holdings or a consolidated corrected transaction ledger.
- Filing discovery is bounded at 10,000 unique filings. Full-text searches are bounded at 10,000 hits per scope. The summary flags a discovery cap; split large jobs by issuer or filing date when it appears.
- Source availability and SEC acceptance determine what is visible. Historical XML formats that cannot be parsed are listed as source failures, and their transaction rows are not charged.
- Prices may be absent, zero or explained through footnotes. Values are calculated from disclosed units and price, without currency conversion or independent valuation. Derivative values are not underlying stock notional values.
- `is10b51` reflects the filing-level checkbox when supplied. A note mentioning a plan is reported separately and is not promoted into a confirmed checkbox value.
- Insider-name-only discovery depends on SEC full-text indexing; exact spelling and name order matter for candidate discovery. Issuer-scoped collection is the more direct route for a known watchlist.
- Repeated separate runs are snapshots. Cross-run deduplication belongs in your destination using the stable transaction ID. Amendments can repeat or correct earlier transactions and remain separate disclosures.
- This is an independent extraction tool, with no SEC affiliation. It returns reported data rather than investment recommendations or trading predictions.

### FAQ

**Do I need a SEC account or API key?** No. The Actor reads official public SEC endpoints with a descriptive brand User-Agent and paced requests. Tickers are resolved through the SEC entity search, with two official ticker directories as fallbacks.

**Does restarting the same run duplicate rows?** Saved transaction identities and authoritative billing counts are reconciled before continuation. A separate new run remains a separate paid export.

**How should I investigate a surprising result?** Open `xmlUrl`, locate the table and `transactionIndex`, and compare the original amounts and footnotes. Include the accession number and transaction ID in an issue so the record can be identified precisely.

# Actor input Schema

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

Company ticker symbols such as AAPL and MSFT. Combined with ciks; duplicate issuers are read once. The form prefill is an example, not an API default.

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

Issuer identifiers, with or without leading zeros, such as 320193. These identify companies, not reporting owners. Can be used without tickers.

## `insiderNames` (type: `array`):

Case-insensitive substring match against any reporting owner. With issuers, filters their filings. Alone, searches public EDGAR full text and then verifies the actual owner names. OR within this list.

## `transactionTypes` (type: `array`):

OR filter: buy (P), sell (S), option exercise (M), gift (G), grant (A), tax withholding (F), or raw SEC letter codes. Empty means every transaction type. A sell filter excludes withholding code F.

## `dateFrom` (type: `string`):

Inclusive SEC filing date in YYYY-MM-DD. Omit for the last 30 days. Use transactionDateFrom separately to filter actual trade dates.

## `dateTo` (type: `string`):

Inclusive SEC filing date in YYYY-MM-DD. Omit for today in UTC. Filing dates can differ from trade dates.

## `minValue` (type: `number`):

Keep transactions whose shares times reported transaction price are at least this amount. Zero keeps unknown values; a positive floor excludes unknown values. Derivative value describes derivative units, not underlying notional.

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

Maximum unique transaction rows across all issuers. $0.002 per transaction plus $0.01 per nonempty export and the start fee. If maxResults is also provided, the smaller cap wins.

## `transactionDateFrom` (type: `string`):

Optional inclusive actual transaction-date lower bound in YYYY-MM-DD; applied after parsing XML. Widen the filing-date window to capture late reports.

## `transactionDateTo` (type: `string`):

Optional inclusive actual transaction-date upper bound. Filing-date filters still apply.

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

Include Table II option and other derivative transactions, with exercise price, expiry and underlying security when present.

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

Return amendments as separate reported disclosures. The Actor does not automatically replace transactions from the original filing.

## `includeFootnotes` (type: `boolean`):

Attach filing-level and transaction-referenced footnotes. Footnote IDs and per-field reference maps remain available when false.

## `maxResults` (type: `integer`):

Alias for maxItems. The smaller supplied cap wins, including when Apify inserts maxItems=20. Set maxItems explicitly for larger jobs.

## `proxyConfiguration` (type: `object`):

Automatic selection starts with Apify default datacenter proxy, then retries through US residential when needed. An explicit disable, country, group or custom proxy is preserved.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "minValue": 0,
  "maxItems": 20,
  "includeDerivatives": true,
  "includeAmendments": true,
  "includeFootnotes": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `transactions` (type: `string`):

No description

## `owners` (type: `string`):

No description

## `derivatives` (type: `string`):

No description

## `summary` (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",
        "MSFT"
    ],
    "maxItems": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("moggedhq/sec-insider-trading-tracker").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",
        "MSFT",
    ],
    "maxItems": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("moggedhq/sec-insider-trading-tracker").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",
    "MSFT"
  ],
  "maxItems": 20
}' |
apify call moggedhq/sec-insider-trading-tracker --silent --output-dataset

```

## MCP server setup

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

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/uZazGad7WXY2PMCvC/builds/RKejnwnTaeJZeOdW1/openapi.json
