# SEC EDGAR Filing Diff & Section-Level Redline Monitor (`gp005/edgar-filing-diff`) Actor

Monitor SEC EDGAR filings (10-K, 10-Q, 8-K) for changes. Detects new filings, fetches previous and current versions, computes section-level redline diffs with additions, removals, and changes per section. Uses official SEC data.sec.gov and efts.sec.gov APIs.

- **URL**: https://apify.com/gp005/edgar-filing-diff.md
- **Developed by:** [Geo](https://apify.com/gp005) (community)
- **Categories:** Developer tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 filing checkeds

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/platform/actors/running/actors-in-store#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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use 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 EDGAR Filing Diff & Section-Level Redline Monitor

Monitor **SEC EDGAR filings** (10-K, 10-Q, 8-K) for changes between versions. Detects new filings as they appear, automatically fetches the previous and current filing text, and computes **section-level redline diffs** — added passages, removed text, and changed sections — all via the SEC's official `data.sec.gov` APIs. No login, no paywall, structured JSON output.

### What it does

- **CIK resolution**: supply a stock ticker (`AAPL`), get the company's full filing history via the SEC's official ticker→CIK mapping.
- **Filing discovery**: scans the submissions API (`data.sec.gov/submissions/CIK…`) and efts.sec.gov search feeds for new 10-K/10-Q/8-K filings within a configurable lookback window (default 90 days).
- **Section parsing**: automatically extracts sections (Item 1. Business, Item 1A. Risk Factors, Item 2. …) from HTML or plain-text filings.
- **Section-level redline diff**: compares each section against the previous version of the same form type. Returns added, removed, and changed passages per section.
- **Stateful persistence**: uses Apify's key-value store to remember last-seen filing accession numbers and content hashes between runs — so you only pay for what's new.
- **Pay-per-event pricing**: you only pay for filings actually checked and diffs computed.

### Use cases

1. **SEC filing change monitoring**: get alerted when a company amends its 10-K or files a new 10-Q with material changes.
2. **Risk factor tracking**: track changes to Item 1A Risk Factors between quarterly filings.
3. **Competitive intelligence**: monitor competitor filings for changes in business description (Item 1), MD&A (Item 7), or financial disclosures.
4. **Compliance automation**: pipe section-level redlines into compliance workflows or alerts.
5. **RAG / LLM context**: feed structured filing diffs into a vector store or prompt for AI analysis of SEC disclosure changes.

### Example input

```json
{
  "tickers": ["AAPL"],
  "formTypes": ["10-K", "10-Q"],
  "lookbackDays": 365,
  "sections": true
}
````

### Example output item (section diff)

```json
{
  "ticker": "AAPL",
  "companyName": "Apple Inc.",
  "cik": "0000320193",
  "form": "10-K",
  "filedDate": "2024-11-01",
  "accessionNumber": "0000320193-24-000123",
  "previousAccessionNumber": "0000320193-23-000108",
  "isNewFiling": true,
  "section": "Item 1A. Risk Factors",
  "diffType": "changed",
  "changesCount": 42,
  "additionsCount": 28,
  "removalsCount": 14,
  "diffLines": [
    { "type": "unchanged", "text": "Our business is subject to various risks…" },
    { "type": "added", "text": "New risk: artificial intelligence regulation may impact…" },
    { "type": "removed", "text": "Previous risk: pandemic-related supply chain disruptions…" }
  ],
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm"
}
```

### Pricing & cost math

Pay-per-event model:

| Event | Price | When charged |
|-------|-------|-------------|
| `actor-start` | $0.01 | Once per run (synthetic start event — covers fixed compute) |
| `filing-checked` | $0.003 | Per filing checked for changes (no diff found / same content hash) |
| `section-diffed` | $0.01 | **Primary event** — per section with a meaningful redline difference between old and new versions |
| `new-filing-alert` | $0.005 | Per new filing detected (first time seeing this accession number) |

**Worked example: monitoring AAPL 10-K over 1 year (1 filing found, 2 new sections changed)**

- 1 × `actor-start` = $0.01
- 1 × `filing-checked` = $0.003 (discovering and fetching the filing)
- 1 × `new-filing-alert` = $0.005 (new filing detected)
- 2 × `section-diffed` = $0.02 (2 sections with meaningful changes)
- **Total: $0.038**

At platform compute cost of ~$0.002/run (low memory, fast API calls), the margin is **>94%**.

Set `ACTOR_MAX_TOTAL_CHARGE_USD` in the run input to cap total spend.

### Rate limits

The SEC's `data.sec.gov` and `efts.sec.gov` APIs allow up to **10 requests/second**. This actor stays well under at ~8 req/s with a minimum 120ms gap between requests. No proxy needed for normal workloads.

### Related tools

If you also need **XBRL financial fundamentals** (Revenue, Net Income, EPS, Assets) from SEC filings, check out the sibling actor [EDGAR XBRL Fundamentals Extractor](https://apify.com/edgar-xbrl-fundamentals) — it extracts structured financial data from the same SEC data sources.

### Integrations

- **Apify API**: call via REST, schedule via cron, or chain as a webhook target.
- **Make / n8n**: use the Apify module with the actor ID and JSON input above.
- **MCP**: expose as an MCP tool via Apify's built-in MCP server for LLM agents.
- **Webhooks**: trigger on `SUCCEEDED` to pipe filing diffs to Slack, Notion, or a database.

### FAQ

**How does the actor know which filings to compare?**
When first run for a ticker+form type, it discovers the most recent filing and stores its accession number and content hash. On subsequent runs, new filings are detected by comparing the latest accession number against the stored state. The previous filing's full text is cached in the key-value store for diffing.

**What happens if a filing is amended (e.g. 10-K/A)?**
Amendments are treated as new filings with a different accession number. The actor will diff the amendment against the original filing's cached content.

**How are sections identified?**
The actor scans filing text for standard SEC item headers (Item 1., Item 1A., Item 2., Item 7., Item 8., Part I, Part II, etc.) and splits content accordingly. For HTML filings, text is extracted before section parsing.

**Can I monitor many tickers in one run?**
Yes. Pass an array of tickers (e.g. `["AAPL", "MSFT", "GOOGL", "AMZN"]`). Each ticker is processed sequentially to stay within SEC rate limits.

**What happens if a filing's text changes but the accession number doesn't?**
The actor compares content hashes even for the same accession number. If the hash differs (e.g. an amended filing with the same accession), a diff is computed.

### Limitations

- **First run baseline**: the first run for any ticker will detect the latest filing but cannot produce a section diff until a previous filing exists in the local state (second run onwards).
- **Lookback window**: filings outside the configured `lookbackDays` window are not scanned. Set this high (e.g. 1095 for 3 years) for comprehensive coverage.
- **Section parsing accuracy**: while the actor uses standard SEC item header patterns, unusual formatting or non-standard filing structures may result in sections being merged under a single header. The `__entire_filing__` fallback covers these cases.
- **HTML vs plain-text**: HTML filings yield cleaner section extraction. Plain-text filings are also supported but section header detection may be less reliable.
- **SEC document fetch failures**: very old filings or filings with non-standard primary documents may fail to fetch. The actor reports these as error items and continues.

### Legal / attribution

Data is sourced from the U.S. Securities and Exchange Commission's public data APIs (`data.sec.gov`, `efts.sec.gov`, `www.sec.gov`). The SEC explicitly grants free programmatic access for this purpose (see [SEC EDGAR API documentation](https://www.sec.gov/search-filings/edgar-search-assistance/accessing-edgar-data) and [SEC Fair Access policy](https://www.sec.gov/about/webmaster-frequently-asked-questions)). This actor is not affiliated with, endorsed by, or sponsored by the SEC.

**Keywords**: sec filing monitor, edgar filing diff, sec 10-k changes, sec filing redline, sec filing comparison tool, edgar section diff, 10-k diff, 10-q diff, 8-k alert, sec filing change tracker

# Actor input Schema

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

One or more stock tickers to monitor for SEC filing changes (e.g. \["AAPL", "MSFT", "GOOGL"]).

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

SEC form types to watch for changes. Default: \["10-K", "10-Q", "8-K"].

## `lookbackDays` (type: `integer`):

How many days of filing history to scan. Larger values detect more filings but use more API calls.

## `sections` (type: `boolean`):

When true, each filing is parsed into sections (Item 1, Item 1A, etc.) and differences are computed per section. When false, only an overall diff is produced.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "formTypes": [
    "10-K",
    "10- Q",
    "8-K"
  ],
  "lookbackDays": 365,
  "sections": true
}
```

# Actor output Schema

## `dataset` (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"
    ],
    "formTypes": [
        "10-K"
    ],
    "lookbackDays": 365
};

// Run the Actor and wait for it to finish
const run = await client.actor("gp005/edgar-filing-diff").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"],
    "formTypes": ["10-K"],
    "lookbackDays": 365,
}

# Run the Actor and wait for it to finish
run = client.actor("gp005/edgar-filing-diff").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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"
  ],
  "formTypes": [
    "10-K"
  ],
  "lookbackDays": 365
}' |
apify call gp005/edgar-filing-diff --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=gp005/edgar-filing-diff",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SEC EDGAR Filing Diff & Section-Level Redline Monitor",
        "description": "Monitor SEC EDGAR filings (10-K, 10-Q, 8-K) for changes. Detects new filings, fetches previous and current versions, computes section-level redline diffs with additions, removals, and changes per section. Uses official SEC data.sec.gov and efts.sec.gov APIs.",
        "version": "0.1",
        "x-build-id": "ec5ysHMFDKs9hx6jh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gp005~edgar-filing-diff/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gp005-edgar-filing-diff",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/gp005~edgar-filing-diff/runs": {
            "post": {
                "operationId": "runs-sync-gp005-edgar-filing-diff",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/gp005~edgar-filing-diff/run-sync": {
            "post": {
                "operationId": "run-sync-gp005-edgar-filing-diff",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "tickers"
                ],
                "properties": {
                    "tickers": {
                        "title": "Ticker symbols",
                        "type": "array",
                        "description": "One or more stock tickers to monitor for SEC filing changes (e.g. [\"AAPL\", \"MSFT\", \"GOOGL\"]).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "formTypes": {
                        "title": "SEC form types to monitor",
                        "type": "array",
                        "description": "SEC form types to watch for changes. Default: [\"10-K\", \"10-Q\", \"8-K\"].",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "10-K",
                            "10-Q",
                            "8-K"
                        ]
                    },
                    "lookbackDays": {
                        "title": "Lookback days for filing history",
                        "minimum": 1,
                        "maximum": 3650,
                        "type": "integer",
                        "description": "How many days of filing history to scan. Larger values detect more filings but use more API calls.",
                        "default": 90
                    },
                    "sections": {
                        "title": "Enable section-level diffing",
                        "type": "boolean",
                        "description": "When true, each filing is parsed into sections (Item 1, Item 1A, etc.) and differences are computed per section. When false, only an overall diff is produced.",
                        "default": true
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
