# SEC Form 4 Insider Transactions - EDGAR Ownership Data (`captainhandsome/sec-form-4-insider-transactions`) Actor

Export structured insider ownership transactions from official SEC Form 4 and 4/A XML filings by ticker or CIK, including reporting-owner relationships, shares, prices, codes, holdings, derivatives, and source links.

- **URL**: https://apify.com/captainhandsome/sec-form-4-insider-transactions.md
- **Developed by:** [Joseph McRell](https://apify.com/captainhandsome) (community)
- **Categories:** Business, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 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.
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?

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 Transactions - EDGAR Ownership Data

Export structured insider ownership transactions from official SEC Form 4 and Form 4/A XML filings by ticker or CIK. Each output row is one reported non-derivative or derivative transaction with reporting-owner relationships, transaction codes, shares, prices, resulting holdings, footnotes, and source links.

### What data can I extract?

- Issuer name, CIK, and trading symbol
- Reporting-owner names and CIKs
- Director, officer, ten-percent-owner, and other relationships
- Security title, transaction date, and SEC transaction code
- Shares acquired or disposed and price per share
- Holdings after the transaction and direct/indirect ownership
- Derivative exercise, expiration, conversion, and underlying-security fields
- Filing footnotes, accession number, filing date, and official SEC links

### Input example

```json
{
  "company": "MSFT",
  "transaction_codes": ["P", "S"],
  "include_derivative": true,
  "max_filings": 100,
  "max_items": 10
}
```

Use a ticker for convenience or a CIK for exact resolution. If dates are omitted, the Actor searches filings from the last year. `max_filings` bounds SEC document requests and `max_items` is a hard dataset ceiling.

### Output example

```json
{
  "issuer_cik": "0000789019",
  "issuer_name": "MICROSOFT CORP",
  "ticker": "MSFT",
  "reporting_owner_names": "NADELLA SATYA",
  "transaction_type": "non_derivative",
  "security_title": "Common Stock",
  "transaction_date": "2026-09-09",
  "transaction_code": "G",
  "acquired_disposed_code": "D",
  "shares": 14000.0,
  "price_per_share": 0.0,
  "shares_owned_after": 444716.2944,
  "direct_or_indirect": "D"
}
```

### Common use cases

- Insider-buying and insider-selling research
- Executive compensation and equity-award analysis
- Market surveillance and event-driven research
- Corporate governance monitoring
- Ownership-data feeds and alerts

### Use with AI agents and MCP

The flat transaction schema lets an agent filter purchases, sales, grants, gifts, exercises, and derivatives; compare owner relationships; and cite the original filing without parsing SEC XML.

### Pricing and cost control

Output is billed per result at **$0.004 per result** (about $4.00 per 1,000 results), plus a $0.0005 Actor-start charge billed once per gigabyte of memory at run start. Use `max_items` to cap both output volume and charges. The price shown on the Apify Store listing is authoritative.

### Reliability

The Actor uses the official SEC ticker directory, submissions JSON, and raw ownership XML. It sends a SEC-compliant identity, stays below the fair-access request rate, retries temporary failures, validates XML, deduplicates accessions, and fails visibly when upstream documents cannot be read.

### Limitations and responsible use

- Transaction codes are emitted as filed and should be interpreted using SEC guidance.
- Form 4 reports transactions; it does not by itself establish investment intent or predict price movement.
- A filing can be amended, corrected, or delayed, and footnotes can materially change interpretation.
- `max_filings` can stop a selective search before older matching transactions are reached.
- This Actor provides public filing data, not financial, legal, or investment advice.

### Turn this into an insider-activity monitor

1. Save one Task per company or a small related-company watchlist, with explicit transaction-code and date filters.
2. Schedule the Task daily or weekly and keep `max_filings` and `max_items` bounded.
3. Add an `ACTOR.RUN.SUCCEEDED` Task webhook or integration and use `resource.defaultDatasetId` to trigger analysis, notification, or archival workflows.

Related fleet tools: [SEC EDGAR Filings Search](https://apify.com/captainhandsome/sec-edgar-filings-search) retrieves 10-K, 10-Q, and 8-K disclosures, while [Google News Search](https://apify.com/captainhandsome/google-news-search) provides current company and executive coverage.

### FAQ

#### Does this include options and restricted stock units?

Yes when `include_derivative` is enabled. Derivative rows include conversion or exercise, expiration, and underlying-security fields when reported.

#### What are transaction codes P and S?

They are SEC codes recorded in the filing. P generally denotes a purchase and S generally denotes a sale, but always review the full filing and footnotes.

#### Why can one filing create several rows?

A single Form 4 can report multiple transactions or security types. Each transaction becomes a separate analysis-ready row.

# Actor input Schema

## `company` (type: `string`):

Public-company ticker or 1-10 digit SEC CIK.

## `date_from` (type: `string`):

Optional inclusive filing date in YYYY-MM-DD. Defaults to one year ago.

## `date_to` (type: `string`):

Optional inclusive filing date in YYYY-MM-DD. Defaults to today.

## `transaction_codes` (type: `array`):

Optional exact SEC codes such as P, S, A, M, or G. Empty includes all codes.

## `include_derivative` (type: `boolean`):

Include derivative securities such as options in addition to non-derivative transactions.

## `include_amendments` (type: `boolean`):

Include amended ownership filings.

## `max_filings` (type: `integer`):

Safety cap on ownership XML documents fetched while looking for matching transactions.

## `max_items` (type: `integer`):

Hard cap on transaction rows saved to the dataset.

## `sec_user_agent` (type: `string`):

Organization and monitored email. The Actor publisher identity is used when this is blank.

## Actor input object example

```json
{
  "company": "MSFT",
  "include_derivative": true,
  "include_amendments": true,
  "max_filings": 100,
  "max_items": 10
}
```

# Actor output Schema

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

One flat row per non-derivative or derivative transaction reported in SEC Form 4 or 4/A XML.

# 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 = {
    "company": "MSFT"
};

// Run the Actor and wait for it to finish
const run = await client.actor("captainhandsome/sec-form-4-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 = { "company": "MSFT" }

# Run the Actor and wait for it to finish
run = client.actor("captainhandsome/sec-form-4-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 '{
  "company": "MSFT"
}' |
apify call captainhandsome/sec-form-4-insider-transactions --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,captainhandsome/sec-form-4-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/4ts75FhOKmtwhlZea/builds/GxhKG905ifnMbiveI/openapi.json
