# SEC Form 4 Insider Transaction Scraper (`usta/sec-form4-insider-transactions`) Actor

Every SEC Form 4 insider stock transaction in a date window: one row per trade, with the officer/director/10%-owner's name and role, the company, the exact date, shares, price, and SEC transaction code. Parsed live from each filing's own EDGAR XML document.

- **URL**: https://apify.com/usta/sec-form4-insider-transactions.md
- **Developed by:** [US Tech Automations](https://apify.com/usta) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 result rows

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 Form 4 Insider Transaction Data

Hedge-fund and equity-research analysts get every SEC Form 4 transaction line already pulled out of the filing's own XML, with shares, price and code, not just the fact a filing exists.

Pick a window and get one row for every insider stock transaction line SEC
Form 4 filings reported in it: who traded, at what company, how many shares,
at what price, bought or sold, and under which SEC transaction code.

### Introduction

Every officer, director, and 10%-or-more owner of a US public company has to
report a change in their own holding within two business days, on SEC Form 4.
Because that filing is made by an insider trading their own company's stock,
it is one of the oldest and most widely watched signals in public markets:
several officers buying in the open market with their own money in the same
week is a different fact than one officer receiving a routine stock grant.

The filing itself is a structured XML document naming the company, the
insider, their role, and a table of transactions. EDGAR's own search index
lists which filings exist, but not what is inside them — no share count, no
price, no code. This Actor lists Form 4 filings for your window from SEC
EDGAR's public full-text search API, then opens each filing's own XML document
and reads the transaction table out of it, live, on every run.

### Tutorial

1. Set **Days back** to how many days of filings to search, from 1 to 30.
2. Set **Maximum rows** to your spend cap. Every row bills, so this is also
   the most a single run can cost.
3. Optionally set **Stock symbol** (e.g. `AAPL`) to restrict to one company's
   insiders, looked up in the SEC's own published company/ticker list.
4. Leave **Include derivative-security transactions** on for everything
   (options, RSUs, and plan-related lines included), or turn it off for
   ordinary-stock transaction lines only.
5. Optionally set **Transaction codes** to only the SEC codes you want, e.g.
   `["P","S"]` for open-market purchases and sales only, skipping grants,
   gifts, and plan mechanics.
6. Put your own address in **Contact email**. The SEC asks every automated
   reader to name a contact in its request headers.
7. Click **Start**. Results land in the dataset.

### Pricing

**$0.01 per row. No start fee.**

A row here is not just "a filing happened" — it is one priced, dated trade
line read out of that filing's own transaction table, which means opening and
parsing the underlying XML document, not just its index entry. A run that
finds 60 qualifying transaction lines costs $0.24. A run that finds none
because the window held only a quiet weekend costs nothing.

**Maximum rows** is the spend cap: the run cannot cost more than that number
multiplied by $0.01, whatever the window holds.

### Input and output examples

Input:

```json
{"daysBack": 2, "maxItems": 50, "ticker": "AAPL", "transactionCodes": ["P", "S"]}
```

Output (one row, from a live run on 2026-09-15):

```json
{
  "accession_number": "0000320193-26-000091",
  "form": "4",
  "is_amendment": false,
  "filed_date": "2026-09-15",
  "issuer_cik": "0000320193",
  "issuer_name": "Apple Inc.",
  "issuer_ticker": "AAPL",
  "owner_names": ["EXAMPLE OFFICER NAME"],
  "owner_ciks": ["0001214156"],
  "owner_is_director": false,
  "owner_is_officer": true,
  "owner_officer_titles": ["Senior Vice President"],
  "owner_is_ten_percent_owner": false,
  "owner_is_other": false,
  "table": "nonDerivative",
  "security_title": "Common Stock",
  "transaction_date": "2026-09-15",
  "transaction_code": "S",
  "transaction_code_label": "Open market or private sale",
  "acquired_disposed_code": "D",
  "shares": 1438.0,
  "price_per_share": 317.23,
  "transaction_value_usd": 456212.74,
  "shares_owned_after": 41208.0,
  "ownership_nature": "D",
  "document_url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000091/xslF345X05/example.xml",
  "source_url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000091-index.htm",
  "fetched_at": "2026-09-15T15:31:24Z"
}
```

Every field in a row:

| Field | What it holds |
|---|---|
| `accession_number` | The SEC's own unique number for this filing |
| `form` | `4` or `4/A` |
| `is_amendment` | True when the filing is an amendment (`4/A`) |
| `filed_date` | The date EDGAR accepted the filing |
| `issuer_cik` / `issuer_name` / `issuer_ticker` | The company traded |
| `owner_names` / `owner_ciks` | The insider(s) named on the filing (more than one on a joint filing) |
| `owner_is_director` / `owner_is_officer` / `owner_is_ten_percent_owner` / `owner_is_other` | Their reported relationship to the company |
| `owner_officer_titles` | Officer title(s), when reported |
| `table` | `nonDerivative` (the underlying stock) or `derivative` (options, RSUs, etc.) |
| `security_title` | The exact security named on this transaction line |
| `transaction_date` | The date of this specific trade |
| `transaction_code` / `transaction_code_label` | The SEC's own single-letter code and what it means, e.g. `P` = open-market purchase |
| `acquired_disposed_code` | `A` (acquired) or `D` (disposed) |
| `shares` | Shares in this transaction line |
| `price_per_share` | Price on this line; not present on every code (e.g. gifts) |
| `transaction_value_usd` | `shares` × `price_per_share`, only when both are on the filing |
| `shares_owned_after` | Shares owned by this insider immediately after |
| `ownership_nature` | `D` (direct) or `I` (indirect, e.g. through a trust) |
| `document_url` | Direct link to the filing's own XML document |
| `source_url` | Link to the filing's index page on EDGAR |
| `fetched_at` | When the run read EDGAR, in UTC |

### Recommendations

Run daily with **Days back** set to 2, the same overlap `sec-8k-auditor-officer-changes`
in this same store uses, so a filing that lands late in EDGAR's day is never
missed. Set **Transaction codes** to `["P","S"]` to isolate open-market buys
and sells — the two codes that most trading and research use actually acts
on — and drop the rest.

### Limitations

**Only what the filing states.** No trade is inferred and no price is
estimated. A code this Actor does not carry a plain-English label for is
still returned with its raw SEC letter rather than skipped.

**A busy window is capped.** To keep one run bounded, this Actor opens at most
400 individual filings per run regardless of **Maximum rows**. A run that hits
that cap before reaching your row target says so in its `OUTPUT` record;
narrow the window or add a **Stock symbol** to cover a busy period fully.

**A filing that cannot be opened is skipped, not guessed at.** If EDGAR
briefly cannot serve one filing's document, that filing is left out and noted
in `OUTPUT.warnings`; every other row in the run is unaffected.

### FAQ

**Where does the data come from?**
SEC EDGAR: the full-text search API at `efts.sec.gov` lists the filings, and
each filing's own XML document at `www.sec.gov/Archives/edgar/data` supplies
the transaction table. Both are documented at the SEC's own "Accessing EDGAR
Data" developer page, which states scripted access is allowed.

**Does it need an API key or a login?**
No. The only thing the SEC asks for is a contact address in the request,
which is the **Contact email** input.

**Why did I get fewer rows than Maximum rows?**
Either the window held that many transactions and no more, or this Actor's
400-filing safety cap was hit first — check `OUTPUT.warnings`.

**What happens if EDGAR is down?**
The run pushes no rows, costs nothing, and writes a status of `UNKNOWN` with
the error to `OUTPUT`. It never fills the gap with made-up rows.

**Is there support?**
Issues can be raised through the Apify Store issues tab for this actor. No
response time is promised.

### Refunds and support

Refunds: if a run returns zero rows for a valid input, email operations@ustechautomations.com within 7 days and we refund that run. Support: same address, replies within 2 business days.

# Actor input Schema

## `daysBack` (type: `integer`):

How many days before today to look for Form 4 filings, by EDGAR's filing date.

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

Hard cap on the number of transaction rows this run produces, and therefore on what it can cost. Every row bills at the listed price from row one; there is no start fee.

## `ticker` (type: `string`):

Restrict to one company's insiders, e.g. AAPL. Looked up in the SEC's own published company/ticker list. Leave empty for every company.

## `includeDerivative` (type: `boolean`):

When true (default), also returns option, RSU, and other derivative-security transaction lines, tagged table: "derivative". Turn off to get only ordinary-stock transaction lines.

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

Restrict to specific SEC transaction codes, e.g. \["P","S"] for open-market purchases and sales only. Leave empty for every code.

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

The SEC asks every automated reader to name a contact address in its request headers. Your own address is used if you set one; otherwise a fallback address is sent.

## Actor input object example

```json
{
  "daysBack": 3,
  "maxItems": 50,
  "includeDerivative": true,
  "transactionCodes": []
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `report` (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 = {
    "daysBack": 3,
    "maxItems": 50,
    "transactionCodes": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("usta/sec-form4-insider-transactions").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 = {
    "daysBack": 3,
    "maxItems": 50,
    "transactionCodes": [],
}

# Run the Actor and wait for it to finish
run = client.actor("usta/sec-form4-insider-transactions").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 '{
  "daysBack": 3,
  "maxItems": 50,
  "transactionCodes": []
}' |
apify call usta/sec-form4-insider-transactions --silent --output-dataset

```

## MCP server setup

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

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/mne4qzWI958mjHKiP/builds/71jipb0fP09bnH3Bb/openapi.json
