# SEC EDGAR Insider Trades & Form D Scraper (`atesen-software/sec-edgar-insider-trades`) Actor

Get SEC Form 4 insider buys and sells and Form D private-offering notices from official EDGAR data by ticker, company name or CIK: owner roles, transaction codes, shares, prices and holdings. No API key or proxy.

- **URL**: https://apify.com/atesen-software/sec-edgar-insider-trades.md
- **Developed by:** [Atesen Software](https://apify.com/atesen-software) (community)
- **Categories:** Business, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 sec 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?

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 EDGAR Insider Trades & Form D Scraper

Get every SEC Form 4 insider buy and sell and every Form D private raise for the tickers or CIKs you enter, as clean rows with owner, role, transaction code, shares, price and holdings after the trade, so you see when executives trade their own stock or a company raises money.

### What does SEC EDGAR Insider Trades & Form D do?

This Actor extracts **Form 4 insider transactions** and **Form D exempt-offering notices** straight from the [SEC's official EDGAR JSON and XML sources](https://www.sec.gov/about/developer-resources). Give it tickers, company names or CIK numbers plus a filing-date range, and it returns clean, flat dataset rows: who traded, their role, transaction code, shares, price and shares held afterwards.

No SEC API key, browser, login or proxy is needed. Requests are serial and rate-limited (default 2 per second, never above the SEC maximum of 10). The SEC fair-access policy asks automated clients to identify themselves: put your own name and email in the optional `userAgent` field (for example `Jane Doe jane@example.com`). Left empty, the Actor sends its own descriptive User-Agent.

- **Form 4 rows** (`recordType: "transaction"`): one row per reported transaction, both non-derivative (common stock) and derivative (options, RSUs), with every joint reporting owner listed in an `owners` array.
- **Form D rows** (`recordType: "offering"`): one row per offering notice with issuer, industry group, total offering amount, amount sold, number of investors and federal exemption codes.

Form D describes a private offering, not an insider purchase or sale, so it is kept in a clearly labelled record type.

### What can you use SEC insider trading data for?

- **Insider-buying and selling monitors.** Schedule the Actor daily for a watchlist of tickers and alert on reported purchases (`transactionCode: "P"`) or large sales (`"S"`). These codes cover open-market or private transactions; the code alone does not establish the trading venue.
- **Equity research and quant backtesting.** Build a dataset of executive and director transactions with prices and post-transaction holdings.
- **Venture and deal sourcing.** Use Form D filings to spot companies that just raised money, by exemption type, industry group and amount sold.
- **Compliance, journalism and due diligence.** Pull the official source URL for every row and verify it on sec.gov.
- **Data pipelines.** Feed the dataset into Google Sheets, Slack, a database or a webhook with Apify integrations.

### How to collect SEC EDGAR filings

1. Open the Input tab and enter one or more companies. Use `AAPL`, `Apple Inc.` or `0000320193` for Apple. Private Form D issuers are not in the SEC ticker directory, so use their CIK.
2. Choose the forms (`4`, `4/A`, `D`, `D/A`) and an inclusive **filing-date** range. Leave both dates empty for the last 30 days through today (UTC). With only an end date, the range is the 30 days before it.
3. Set small limits for a first run and click **Start**.
4. Open the dataset and the `SUMMARY` record. Export as JSON, CSV, Excel, HTML or XML, or call the API.

### Input

See the Input tab for every option. The main fields:

| Field | Default | Meaning |
| --- | --- | --- |
| `companies` | `["AAPL"]` | 1 to 20 tickers, exact company names or CIKs. Ambiguous names are rejected. |
| `formTypes` | all four | `4`, `4/A`, `D`, `D/A`. Amendments are separate filings. |
| `startDate`, `endDate` | last 30 days | Inclusive `YYYY-MM-DD` **filing** dates (not transaction dates). |
| `maxItems` | 100 | Maximum result rows, up to 10,000. Can stop mid-filing. |
| `maxFilings` | 100 | Maximum XML filings fetched across all companies, up to 1,000. |
| `maxSubmissionPages` | 10 | Older SEC history files per company, up to 100. Recent filings are always checked first. |
| `maxRequests` | 500 | Hard budget for every SEC request including ticker lookup and retries. |
| `requestsPerSecond` | 2 | Serial request rate, 1 to 10. |
| `userAgent` | empty | Optional. Your name and contact email for the SEC, e.g. `Jane Doe jane@example.com`. Empty sends the Actor's generic User-Agent. |

Example input (Apple Form 4 and 4/A filings from the last 30 days, run on 22 October 2026):

```json
{
  "companies": ["AAPL"],
  "formTypes": ["4", "4/A"],
  "maxItems": 200,
  "maxFilings": 50,
  "maxSubmissionPages": 1,
  "maxRequests": 60,
  "requestsPerSecond": 2
}
```

This real run returned **59 rows from 16 filings using 18 SEC requests in about 15 seconds**, with `complete: true` in `SUMMARY`.

### Output

You can download the dataset in JSON, CSV, Excel, HTML or XML. A Form 4 transaction row looks like this (real output from the run above):

```json
{
  "recordType": "transaction",
  "rowId": "0001140361-26-040127:nonDerivative:2",
  "accessionNumber": "0001140361-26-040127",
  "formType": "4",
  "filingDate": "2026-10-19",
  "companyCik": "0000320193",
  "companyName": "Apple Inc.",
  "ticker": "AAPL",
  "owners": [
    {
      "ownerCik": "0002100523",
      "ownerName": "Borders Ben",
      "isDirector": false,
      "isOfficer": true,
      "isTenPercentOwner": false,
      "isOther": false,
      "officerTitle": "Principal Accounting Officer"
    }
  ],
  "securityType": "nonDerivative",
  "securityTitle": "Common Stock",
  "transactionDate": "2026-10-16",
  "transactionCode": "S",
  "acquiredDisposed": "D",
  "shares": 151,
  "pricePerShare": 343.08,
  "sharesOwnedFollowing": 39417,
  "ownershipType": "D",
  "sourceUrl": "https://www.sec.gov/Archives/edgar/data/320193/000114036126040127/form4.xml"
}
```

A Form D offering row (CIK `1764677`, real output):

```json
{
  "recordType": "offering",
  "rowId": "0001764677-26-000004:offering:0",
  "accessionNumber": "0001764677-26-000004",
  "formType": "D",
  "filingDate": "2026-08-27",
  "companyName": "Nonlinear Materials Corp",
  "entityType": "Corporation",
  "industryGroup": "Other Technology",
  "totalOfferingAmount": 1000000,
  "totalAmountSold": 1000000,
  "totalRemaining": 0,
  "totalInvestors": 7,
  "dateOfFirstSale": "2026-06-12",
  "federalExemptions": ["06b"],
  "sourceUrl": "https://www.sec.gov/Archives/edgar/data/1764677/000176467726000004/primary_doc.xml"
}
```

| Field | Type | Meaning |
| --- | --- | --- |
| `recordType` | string | `transaction` (Form 4) or `offering` (Form D) |
| `accessionNumber`, `rowId` | string | Filing ID and a stable per-row ID for deduplication |
| `companyCik`, `issuerCik`, `companyName`, `ticker` | string or null | Requested company and the issuer named in the XML |
| `filingDate`, `sourceUrl` | string | Filing date and the official SEC XML document |
| `owners` | array | Reporting owners with CIK, name, director / officer / 10% owner / other flags and officer title |
| `securityType`, `securityTitle` | string | Derivative or non-derivative, and the security as reported |
| `transactionDate`, `transactionCode`, `acquiredDisposed` | string | SEC transaction code and acquired (A) or disposed (D) |
| `shares`, `pricePerShare`, `sharesOwnedFollowing` | number or null | Reported quantity, price and holdings after the transaction |
| `conversionOrExercisePrice`, `underlyingSecurityShares` | number or null | Derivative-specific figures |
| `totalOfferingAmount`, `totalAmountSold`, `totalRemaining`, `totalInvestors` | number or null | Form D figures; not insider trading amounts |
| `totalOfferingAmountRaw`, `federalExemptions` | string, array | Original offering amount text (keeps `Indefinite`) and exemption codes |

One row is one XML transaction; joint owners are listed inside `owners` and never multiply rows. Null means absent or non-numeric; a reported zero stays zero. Footnote-only values stay null. Amendments are separate accessions and are not merged into originals. Holdings-only entries are not transactions and produce no rows.

#### Run summary

Every run writes a `SUMMARY` record with `items`, `filingsAttempted`, `requests`, `errors`, `truncations`, `stopReason` and `complete`. `complete` is `false` when an error or a limit interrupted coverage, so you can tell a full result from a capped one. Errors are diagnostics only and are never written as billable result rows.

### How much does it cost to scrape SEC EDGAR?

This Actor uses **pay-per-event** pricing: **$0.005 per result row ($5 per 1,000 rows)**, event name `result`. There is no start fee and no charge for error or diagnostic records. Example: 30 insider transactions cost $0.15 in result charges. Platform usage is included in the price. The Pricing tab on the Store page is the authoritative current price.

**Maximum items is a hard cap on charged rows.** Set `maxItems` in the run options (or `?maxItems=` in the API) and the run stops after that many rows: it never writes or charges more rows than that number. Leave it empty for no cap. Free status rows are not counted.

### Tips and limits

- Start with the defaults and a small `maxItems`, then widen the date range.
- Dates filter **filing dates**. A transaction can happen days before it is filed.
- The Actor reads the recent-submissions block first, then older history files in the order the SEC provides them, up to `maxSubmissionPages`. This is bounded retrieval, not a guarantee of complete history for very active filers over long ranges; check `SUMMARY.truncations`.
- The SEC limit of 10 requests per second is aggregate. If you run several copies at once, lower `requestsPerSecond` so the total stays under it.
- HTTP 403 or 429 from the SEC stops the run immediately. The Actor does not retry or bypass blocks.
- Interrupted runs checkpoint to the `STATE` record. Recovery is best effort, so deduplicate by `rowId` downstream.

### Use via API

One request runs the Actor, waits for it and returns the dataset items as JSON. Send your token in the `Authorization` header, not in the URL:

```bash
curl -X POST "https://api.apify.com/v2/acts/atesen-software~sec-edgar-insider-trades/run-sync-get-dataset-items?timeout=120" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"companies":["AAPL"],"formTypes":["4"],"maxItems":20}'
```

The synchronous endpoint waits up to 300 seconds. For longer jobs start a run with `POST https://api.apify.com/v2/acts/atesen-software~sec-edgar-insider-trades/runs` and read the dataset when it finishes.

**JavaScript** (`npm install apify-client`):

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('atesen-software/sec-edgar-insider-trades').call({ companies: ["AAPL"], formTypes: ["4"], maxItems: 20 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Use with AI agents (MCP)

Claude Desktop, Cursor, VS Code and other MCP clients can call this Actor as a tool through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Load only this Actor with:

```text
https://mcp.apify.com?tools=atesen-software/sec-edgar-insider-trades
```

Client config (sign in with Apify OAuth when the browser opens, or add an `Authorization: Bearer <APIFY_TOKEN>` header instead):

```json
{
  "mcpServers": {
    "apify": { "url": "https://mcp.apify.com?tools=atesen-software/sec-edgar-insider-trades" }
  }
}
```

Then ask in plain words, for example: "Show the 20 latest Form 4 insider trades at Apple with insider name, shares and price." The agent fills the same input fields you see on the Input tab, and runs are billed to your Apify account at the prices on the Pricing tab.

### FAQ

**Do I need an SEC API key or a proxy?**
No. The Actor reads public SEC endpoints directly. Add your own name and email in `userAgent` to identify yourself to the SEC as its fair-access policy asks. No paid proxy is used.

**Is this legal?**
The data is public regulatory information published by the SEC. The Actor follows the SEC fair-access policy and does not bypass logins, paywalls or access restrictions. Reporting-owner names can still be personal data in some jurisdictions, so use the results lawfully. Addresses, phone numbers, signatures and other contact details are deliberately omitted.

**Why is `transactionCode` "M" or "F" and not "P" or "S"?**
Transaction codes follow the SEC's Form 4 instructions. `P` is an open-market or private purchase, `S` an open-market or private sale, `M` an option exercise or conversion, `F` shares withheld for taxes, `A` a grant or award, `G` a gift. A `P` or `S` code alone does not establish the trading venue; consult the filing for transaction details.

**Why is `pricePerShare` null?**
The filing left it blank or reported it in a footnote only. A reported price of 0 is kept as 0.

**I got no results. What should I check?**
Check the filing-date range, the selected forms and the company identifier. Private Form D issuers are missing from the ticker directory and need their CIK. A legitimate no-match run can finish with zero rows. An invalid company or input also finishes without charges and shows the reason in the run status message and in `SUMMARY.errors`.

**Can I search the whole market or all insiders at once?**
No. Input is a list of up to 20 companies per run. Run it again or schedule it for larger watchlists.

**Can I use the data through an API or schedule it?**
Yes. Use the API tab, schedules and integrations (Google Sheets, Slack, webhooks, Make, Zapier) as with any Apify Actor.

**Is this investment advice?**
No. This is regulatory source data. The Actor is independent of and not endorsed by the SEC.

### Support

Found a bug or need an extra field? Open the Issues tab on this Actor with your run ID and we will look at it.

Data source: U.S. Securities and Exchange Commission, EDGAR (public domain U.S. government data). Built and maintained by Atesen Software.

### Related actors

- [SEC EDGAR Company Filings & XBRL Facts](https://apify.com/atesen-software/sec-edgar-company-data)
- [US Business Entity Registry Search: NY, CO, CT](https://apify.com/atesen-software/us-business-entity-registry)
- [European Company Financials: Norway & Estonia Annual Accounts](https://apify.com/atesen-software/european-company-financials)

# Actor input Schema

## `companies` (type: `array`):

1 to 20 tickers, company names from the official SEC ticker directory, or CIK numbers. Private Form D issuers require a CIK. Ambiguous names are rejected.

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

Form 4 transactions and/or Form D offerings, including amendments. Amendments remain separate filings.

## `startDate` (type: `string`):

Inclusive YYYY-MM-DD filing date. Empty means 30 days before endDate (or before today when endDate is empty).

## `endDate` (type: `string`):

Inclusive YYYY-MM-DD filing date. Empty means today (UTC). Filters filing dates, not transaction dates.

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

Stops at this many dataset rows, including mid-filing. Hard cap: the run never writes or charges more rows than this.

## `maxFilings` (type: `integer`):

Maximum attempted matching XML filings across all companies.

## `maxSubmissionPages` (type: `integer`):

Maximum older submissions JSON files per company. Recent filings are always checked first. SUMMARY reports truncation.

## `maxRequests` (type: `integer`):

Hard budget across all official SEC requests including retries and ticker lookup.

## `requestsPerSecond` (type: `integer`):

Serial request rate, never over SEC limit of 10 per second. Coordinate other runs yourself.

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

The SEC asks automated clients to identify themselves with a name and contact email, for example: Jane Doe jane@example.com. Leave empty to send this Actor's generic User-Agent. Printable ASCII, 8 to 200 characters.

## Actor input object example

```json
{
  "companies": [
    "AAPL"
  ],
  "formTypes": [
    "4",
    "4/A",
    "D",
    "D/A"
  ],
  "startDate": "",
  "endDate": "",
  "maxItems": 100,
  "maxFilings": 100,
  "maxSubmissionPages": 10,
  "maxRequests": 500,
  "requestsPerSecond": 2,
  "userAgent": ""
}
```

# Actor output Schema

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

Result rows in JSON.

## `summary` (type: `string`):

Errors, counts, completeness and limits.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("atesen-software/sec-edgar-insider-trades").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("atesen-software/sec-edgar-insider-trades").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 '{}' |
apify call atesen-software/sec-edgar-insider-trades --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,atesen-software/sec-edgar-insider-trades"
        }
    }
}
```

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/rt2eEHwCw0IFG0PUK/builds/iMgRp0TZPVs4SjitV/openapi.json
