# SEC Form 4 Insider Trading & 13F Holdings Scraper (`deanko/sec-insider-13f-scraper`) Actor

Track SEC Form 4 insider trading (buys, sells, options) and 13F hedge fund holdings with quarterly changes. Official EDGAR data, no API key.

- **URL**: https://apify.com/deanko/sec-insider-13f-scraper.md
- **Developed by:** [dean ko](https://apify.com/deanko) (community)
- **Categories:** Business, Developer tools
- **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. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SEC Form 4 Insider Trading & 13F Holdings Scraper

Track **insider trading** and **hedge fund holdings** straight from SEC EDGAR, in one Actor:

1. **SEC Form 4 insider trades**: every open-market buy and sale, option exercise, award, tax withholding and gift that directors, officers and 10% owners report. One clean row per transaction, with dollar value, holdings after the trade and the Rule 10b5-1 plan flag.
2. **13F holdings**: the full quarterly portfolio of any institutional manager (Berkshire Hathaway, Bridgewater, Pershing Square, ...), one row per position with % of portfolio and **quarter-over-quarter changes**: new, added, reduced, unchanged, sold out.

No API key, no login, no proxy, no third-party data vendor. Every row links back to the original filing on sec.gov. Export as JSON, CSV, Excel or via API.

### What does this SEC insider trading scraper do?

- **Insider trading tracker:** pull the latest Form 4 filings across *all* US public companies, or only for your watchlist of tickers (AAPL, NVDA, TSLA...), or for one insider by CIK.
- **Insider buying screener:** keep only open-market purchases (`P`) and sales (`S`) above a dollar threshold, e.g. every insider buy over $1M in the last two weeks.
- **13F hedge fund holdings tracker:** get what a fund owned at the end of a quarter, ranked by position size, and what it bought, added to, trimmed or exited compared with the previous quarter.

#### Who is it for?

- **Investors and traders** following insider buying and "smart money" 13F moves
- **Fintech apps and dashboards** that need an insider trading API or 13F holdings API without running an EDGAR parser
- **Quant and academic researchers** who want typed, tidy rows for pandas, Excel, BigQuery or Google Sheets
- **Compliance, IR and journalists** auditing insider activity, with a filing link on every row

#### Use cases

- Daily alert of large insider purchases across the market (Schedules + Webhooks / Slack / email)
- Insider activity history for a watchlist of tickers
- 13F cloning: see what Buffett or Ackman bought and sold last quarter
- Institutional ownership research: compare several funds' portfolios quarter by quarter

### Why this Actor?

- **Two datasets, one Actor, one price.** Form 4 insider trades and 13F holdings, each with its own table view.
- **Low price:** $2 per 1,000 rows. Comparable SEC Form 4 / 13F Actors in the Store list $25-30 per 1,000 rows.
- **Market-wide feed, not just tickers.** With no tickers, insider mode reads the newest Form 4 filings across every company, so you can screen the whole market for insider buying.
- **One row per position in 13F.** Big managers file several lines for the same stock (one per sub-manager). This Actor sums them into one row per position (CUSIP + put/call), so Berkshire's ~90 raw lines become ~30 real positions with a correct rank and % of portfolio.
- **Sold-out positions included.** With quarter comparison on, exits are added as `soldOut` rows instead of silently disappearing.
- **Values normalized to dollars.** 13F filings before 2023 reported value in thousands of dollars; this Actor converts them, so old and new quarters compare correctly.
- **Readable transaction codes.** Each code comes with a label (`S` -> "Open market sale", `M` -> "Option exercise / conversion"), and derivative rows (options, RSUs) carry exercise price, dates and underlying shares.
- **Fund lookup by name.** Type "Pershing Square" instead of hunting for a CIK.
- **Polite to the SEC.** Identified User-Agent and about 8 requests per second, under SEC's 10/second fair-access limit, with automatic retries.
- **You never pay more than you asked for.** `maxItems` and your run's max charge both stop the Actor early.

### How to use it

1. Click **Try for free** (or **Start**).
2. Pick a **Mode**: *Insider trades (Form 4)* or *Fund holdings (13F-HR)*.
3. Insider mode: optionally add **Tickers or CIKs**, a **date range**, **Only open-market buys and sells** and a **Minimum trade value**.
   13F mode: add **Fund CIKs or names** and optionally a **Quarter** (e.g. `2026Q2`).
4. Set **Max results** and click **Start**.
5. Open the **Insider trades** or **13F holdings** tab in the Output, or download JSON / CSV / Excel.

With the default input (no tickers, 20 results), you get the 20 newest Form 4 transactions across the market in well under a minute.

#### Example input: insider buys over $1M across all companies

```json
{
  "mode": "insider",
  "dateFrom": "2026-10-01",
  "dateTo": "2026-10-16",
  "onlyOpenMarket": true,
  "minValue": 1000000,
  "maxItems": 500
}
```

#### Example input: insider trades for a watchlist

```json
{ "mode": "insider", "tickers": ["AAPL", "NVDA", "TSLA"], "maxItems": 200 }
```

#### Example input: 13F holdings with quarter-over-quarter changes

```json
{ "mode": "13f", "funds": ["1067983", "Pershing Square"], "quarter": "", "compareToPreviousQuarter": true, "maxItems": 1000 }
```

### Sample output

#### Insider trade (Form 4)

```json
{
  "type": "insiderTrade",
  "form": "4",
  "issuerName": "Apple Inc.", "issuerTicker": "AAPL", "issuerCik": "0000320193",
  "insiderName": "COOK TIMOTHY D", "insiderCik": "0001214156",
  "relationship": "Director, Executive Chair", "isDirector": true, "isOfficer": true, "isTenPercentOwner": false,
  "securityTitle": "Common Stock", "isDerivative": false,
  "transactionDate": "2026-10-02", "transactionCode": "S", "transactionType": "Open market sale",
  "shares": 88239, "pricePerShare": 333.26, "value": 29406529.14, "acquiredDisposed": "D",
  "sharesOwnedAfter": 3305047, "directOrIndirect": "D", "is10b5_1Plan": true,
  "filedDate": "2026-10-05", "accessionNumber": "0001140361-26-038674",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126038674/0001140361-26-038674-index.htm"
}
```

| Field | Description |
|---|---|
| `issuerName`, `issuerTicker`, `issuerCik` | Company whose stock was traded |
| `insiderName`, `insiderCik` | Reporting person (joint filers joined with `; `) |
| `relationship`, `isDirector`, `isOfficer`, `isTenPercentOwner` | e.g. `Director`, `Chief Executive Officer`, `10% Owner` |
| `transactionDate`, `transactionCode`, `transactionType` | SEC code plus a readable label (`P`, `S`, `A`, `M`, `F`, `G`, ...) |
| `shares`, `pricePerShare`, `value` | `value` = shares x price, in USD |
| `acquiredDisposed` | `A` acquired, `D` disposed |
| `sharesOwnedAfter`, `directOrIndirect`, `natureOfOwnership` | Holdings after the trade; `D` direct, `I` indirect (e.g. "By Trust") |
| `securityTitle`, `isDerivative` | Common stock vs options/RSUs |
| `exercisePrice`, `exerciseDate`, `expirationDate`, `underlyingSecurity`, `underlyingShares` | Filled for derivative rows |
| `is10b5_1Plan` | Rule 10b5-1 trading plan box (newer filings; `null` if not reported) |
| `form`, `periodOfReport`, `filedDate`, `accessionNumber`, `filingUrl`, `xmlUrl` | Filing metadata and links |

#### 13F holding

```json
{
  "type": "holding",
  "filerName": "BERKSHIRE HATHAWAY INC", "filerCik": "0001067983",
  "period": "2026-06-30", "filedDate": "2026-08-14", "previousPeriod": "2026-03-31",
  "rank": 1, "issuerName": "APPLE INC", "titleOfClass": "COM", "cusip": "037833100",
  "value": 65950296923, "shares": 227917808, "sharesType": "SH", "putCall": null,
  "percentOfPortfolio": 22.0383, "investmentDiscretion": "DFND",
  "changeStatus": "unchanged", "previousShares": 227917808, "previousValue": 57843260493,
  "sharesChange": 0, "sharesChangePct": 0,
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/1067983/000119312526352200/0001193125-26-352200-index.htm"
}
```

| Field | Description |
|---|---|
| `filerName`, `filerCik`, `period`, `filedDate`, `accessionNumber`, `filingUrl` | Fund and report |
| `rank`, `issuerName`, `titleOfClass`, `cusip`, `figi` | Position, ranked by value |
| `value` (USD), `shares`, `sharesType`, `putCall` | Market value and size (`SH` shares, `PRN` principal); options are separate rows |
| `percentOfPortfolio` | Position value / total reported value x 100 |
| `investmentDiscretion`, `votingSole`, `votingShared`, `votingNone` | Discretion and voting authority |
| `changeStatus` | `new`, `added`, `reduced`, `unchanged` or `soldOut` (needs `compareToPreviousQuarter`) |
| `sharesChange`, `sharesChangePct`, `previousShares`, `previousValue`, `previousPeriod` | Change versus the previous quarter's 13F-HR |

### Pricing

Pay per result: **$0.002 per row** (one insider transaction or one 13F position), i.e. **$2 per 1,000 rows**, plus a tiny start fee of $0.00005 per GB of run memory (a fraction of a cent). Platform compute is included; you pay for the rows you get.

Worked examples:

- Default run, 20 newest insider trades: 20 x $0.002 = **$0.04**
- One week of market-wide insider buys/sells over $1M (say 300 rows): **about $0.60**
- Berkshire Hathaway's latest 13F with quarter changes (~30-35 rows): **about $0.07**

`maxItems` and the max charge you set on a run are hard caps: the Actor stops as soon as either is reached.

### Integrations and API

Run it on a **Schedule** (e.g. every weekday morning for insider buys, or mid-February/May/August/November for 13F season) and send results anywhere with **Webhooks**, Slack, Google Sheets, Make, Zapier or n8n.

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("deanko/sec-insider-13f-scraper").call(run_input={
    "mode": "insider",
    "tickers": ["NVDA"],
    "onlyOpenMarket": True,
    "maxItems": 100,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["transactionDate"], row["insiderName"], row["transactionType"], row["value"])
```

JavaScript (`npm install apify-client`):

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('deanko/sec-insider-13f-scraper').call({
    mode: '13f',
    funds: ['1067983'],
    compareToPreviousQuarter: true,
    maxItems: 500,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.changeStatus === 'new'));
```

Table views over the API: add `?view=insiderTrades` or `?view=holdings` to the dataset items URL.

### FAQ

**Where does the data come from?**
Directly from the SEC: EDGAR full-text search (`efts.sec.gov`), filing archives (`sec.gov`) and the submissions API (`data.sec.gov`). No scraping of third-party sites.

**How fresh is it?**
Insider mode reads filings as soon as EDGAR indexes them; Form 4 must be filed within 2 business days of the trade. 13F-HR reports are filed up to 45 days after quarter end.

**How do I find a fund's CIK?**
Type the fund name (e.g. "Bridgewater") in *Fund CIKs or names*; the matched entity and CIK appear in the run log. Or search on [EDGAR company search](https://www.sec.gov/edgar/search/).

**Can I track one insider instead of a company?**
Yes. Put the insider's CIK in *Tickers or CIKs*; you get filings where that CIK is the company or the reporting person.

**What do the transaction codes mean?**
`P` open market purchase, `S` open market sale, `A` grant/award, `M` option exercise, `F` tax withholding, `G` gift, `D` disposition to issuer, `C` conversion, `X` in-the-money exercise. The `transactionType` field spells out every code.

**Do I need an SEC API key or my own User-Agent?**
No key. A generic User-Agent is used by default; you can add your own contact email in *Advanced* for large jobs, as the SEC recommends.

**I need 10-K/10-Q filings or XBRL financials, not insider trades.**
Use the companion Actor [SEC EDGAR Filings & Financials Scraper](https://apify.com/deanko/sec-edgar-scraper).

### Limitations

- Market-wide date ranges are searched day by day (EDGAR search caps each query at 10,000 hits), so long ranges take longer. Narrow with tickers, `onlyOpenMarket` or `minValue`.
- For a ticker, only trades in that company's own stock are returned.
- Prices are as reported. Awards and gifts often have price 0 or no price, so `value` is 0 or `null`.
- Form 3 has no transactions; its holdings come back with `transactionType` "Holding (no transaction)".
- 13F amendments (13F-HR/A) are skipped; the original quarterly report is used. Managers that only file 13F-NT have no holdings.
- 13F covers US-listed long equity and option positions only: no shorts, cash or most non-US assets. Confidential positions may be omitted by the filer.
- Data is provided as filed. This is not investment advice.

### Data source and legal

All data is public information published by the U.S. Securities and Exchange Commission through EDGAR. Insider names are part of mandatory public regulatory disclosures. This Actor is not affiliated with or endorsed by the SEC and follows SEC's [fair access guidelines](https://www.sec.gov/os/accessing-edgar-data).

### Support and feedback

Found a bug, a filing that parses wrong, or need a field added? Open a ticket in the **Issues** tab of this Actor page. Feature requests are welcome, and reviews help other users find the Actor.

# Actor input Schema

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

Insider trades: parse SEC Form 4 (optionally 3/5) filings into one row per transaction. Fund holdings: parse a fund's 13F-HR information table into one row per position, with quarter-over-quarter changes.

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

Stop after this many rows in total (trades or holdings). Each row is one billed result ($0.002), so 20 rows cost about $0.04. Raise it for bigger exports.

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

Company tickers (e.g. AAPL, NVDA, BRK.B) to get insider trades in that company's stock, or CIK numbers of a company or of an individual insider. Leave empty for the latest Form 4 filings across all US companies (newest first).

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

Only filings filed on or after this date, e.g. 2026-10-01. Leave empty for newest filings first with no lower limit. Across all companies (no tickers), an empty start with an end date means 30 days before the end date.

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

Only filings filed on or before this date, e.g. 2026-10-15. Leave empty for today.

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

Ownership forms to include: 4 and 4/A (changes in ownership), 5/5/A (annual), 3/3/A (initial holdings, returned as holding rows without a transaction).

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

Keep only these SEC transaction codes: P (open market buy), S (open market sale), A (grant/award), M (option exercise), F (tax withholding), G (gift), D (disposition to issuer). Leave empty for all codes.

## `onlyOpenMarket` (type: `boolean`):

Keep only open-market purchases (P) and sales (S), the trades investors watch most. Overrides Transaction codes. Tip: across all companies, combine with Minimum trade value.

## `minValue` (type: `integer`):

Keep only transactions where shares x price is at least this many US dollars, e.g. 1000000. Rows without a price (awards, gifts) are dropped when this is above 0.

## `funds` (type: `array`):

13F filer CIK numbers (e.g. 1067983 Berkshire Hathaway, 1350694 Bridgewater Associates) or fund names to look up on EDGAR (e.g. Pershing Square). The best name match is used and logged.

## `quarter` (type: `string`):

13F report period, e.g. 2025Q4 or 2025-12-31. Leave empty for the latest 13F-HR the fund has filed.

## `compareToPreviousQuarter` (type: `boolean`):

Add change columns versus the fund's previous 13F-HR: status (new, added, reduced, unchanged, soldOut), share change and % change. Positions fully sold are added as soldOut rows.

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

Optional. The SEC asks automated clients to identify themselves in the User-Agent header. Add your own contact email here if you run large jobs; a generic no-reply address is used if empty. It is only sent to sec.gov, never stored in the output.

## Actor input object example

```json
{
  "mode": "insider",
  "maxItems": 20,
  "tickers": [],
  "dateFrom": "",
  "dateTo": "",
  "formTypes": [
    "4",
    "4/A"
  ],
  "transactionCodes": [],
  "onlyOpenMarket": false,
  "minValue": 0,
  "funds": [
    "1067983"
  ],
  "quarter": "",
  "compareToPreviousQuarter": true,
  "contactEmail": ""
}
```

# Actor output Schema

## `insiderTrades` (type: `string`):

No description

## `holdings` (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 = {
    "maxItems": 20,
    "formTypes": [
        "4",
        "4/A"
    ],
    "funds": [
        "1067983"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("deanko/sec-insider-13f-scraper").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 = {
    "maxItems": 20,
    "formTypes": [
        "4",
        "4/A",
    ],
    "funds": ["1067983"],
}

# Run the Actor and wait for it to finish
run = client.actor("deanko/sec-insider-13f-scraper").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 '{
  "maxItems": 20,
  "formTypes": [
    "4",
    "4/A"
  ],
  "funds": [
    "1067983"
  ]
}' |
apify call deanko/sec-insider-13f-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,deanko/sec-insider-13f-scraper"
        }
    }
}
```

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/TtU3gAK7kfS5LzxhV/builds/MuI5XfOZ2lVtcfyVd/openapi.json
