# SEC EDGAR Scraper for RAG: 10-K/10-Q/8-K as JSON (`getascraper/sec-edgar-rag-extractor`) Actor

Extract SEC EDGAR filings (10-K, 10-Q, 8-K). Fixed-token text chunks of primary documents for finance LLMs and compliance RAG. Drop-in for LlamaIndex, LangChain. Skip manual XBRL parsing.

- **URL**: https://apify.com/getascraper/sec-edgar-rag-extractor.md
- **Developed by:** [GetAScraper](https://apify.com/getascraper) (community)
- **Categories:** AI, Developer tools, Agents
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $1.34 / 1,000 filing records

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/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.

- **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 EDGAR Scraper for RAG: 10-K/10-Q/8-K as JSON

**Extract SEC EDGAR filings into RAG-ready text chunks for finance and compliance LLMs.** Get 10-K annual reports, 10-Q quarterly reports, and 8-K material events pre-chunked as JSON. Drop-in ready for LlamaIndex, LangChain, Pinecone, and Qdrant. Built for AI training data teams, buy-side research assistants, and M\&A intelligence platforms. Skip manual HTML/XBRL parsing and messy SEC entity decoding.

### 🔍 What does SEC EDGAR RAG Extractor do?

This Actor fetches corporate filings directly from the SEC EDGAR database. It pulls the HTML primary document, strips out the noise (like `<ix:header>` metadata and tables styling), extracts the plain text, and slices it into fixed-token chunks with overlap. You get clean, LLM-ready JSON arrays representing the core text of the filing.

Try it with Apple's CIK `0000320193` or search for "artificial intelligence risk factors". Runs reliably on the Apify platform with built-in SEC rate limiting.

### 💡 Why use SEC EDGAR RAG Extractor?

- **Finance AI:** Train models on clean corporate disclosures without writing custom HTML parsers.
- **Compliance RAG:** Build chatbots that cite specific regulatory filings accurately.
- **M\&A Research:** Feed target company 10-Ks into your intelligence pipeline.
- **Sell-side Research:** Monitor 8-K events and earnings drift automatically.

### 🚀 How to use SEC EDGAR RAG Extractor

1. Set your **User-Agent**. The SEC requires a real name and email.
2. Provide a list of **CIKs** (e.g., `0000320193` for Apple) or enter a **Search Query** (e.g., "AI risks").
3. Select the **Form Types** you want (10-K, 10-Q, 8-K).
4. Set your **Date Range** and **Max Filings** cap.
5. Click "Start" and download the chunked JSON.

### ⚙️ Input

Provide standard SEC parameters. Here is a JSON example:

```json
{
  "cikList": ["0000320193"],
  "formTypes": ["10-K"],
  "dateFrom": "2024-01-01",
  "dateTo": "2024-12-31",
  "maxFilings": 5,
  "searchQuery": "",
  "userAgent": "Jane Smith jane@acme.com"
}
```

### 📦 Output

The Actor outputs one record per filing. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
  "accession_no": "0000320193-24-000123",
  "cik": "0000320193",
  "company_name": "Apple Inc.",
  "ticker": "AAPL",
  "form_type": "10-K",
  "filing_date": "2024-11-01",
  "period_of_report": "2024-09-28",
  "filing_url": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm",
  "source": "full_text",
  "chunks": [
    {
      "idx": 0,
      "text": "Item 1. Business...",
      "tokens": 512
    }
  ]
}
```

### 📊 Data table

| Field | Type | Description |
|---|---|---|
| `accession_no` | String | Unique SEC identifier for the filing |
| `cik` | String | 10-digit Central Index Key |
| `company_name` | String | Filer name |
| `ticker` | String | Stock ticker (if available) |
| `form_type` | String | 10-K, 10-Q, or 8-K |
| `filing_date` | String | Date submitted to the SEC |
| `source` | String | Indicates extraction depth (`full_text` or `exhibits_stripped`) |
| `filing_url` | String | Link to the SEC Archives primary document |

### 💰 Pricing / Cost estimation

This Actor is priced at **$0.02 per filing**.
How much does it cost to scrape SEC EDGAR? If you pull 1000 Apple 10-Ks and 10-Qs, the run will cost exactly $20.00. You only pay for successful extractions.

### ⭐ Enjoying SEC EDGAR RAG Extractor?

<table width="100%">
<tr>
<td style="padding:20px 24px 14px;background:#E7EDFB;border:1px solid #E7EDFB;border-left:5px solid #1D4ED8;border-radius:10px 10px 0 0">
<span style="font-size:20px;letter-spacing:4px">⭐ ⭐ ⭐ ⭐ ⭐</span><br>
<span style="font-size:17px;font-weight:800;color:#1C1917">Skip writing a custom HTML and XBRL parser and get chunked, LLM-ready filing text in one run.</span><br>
<span style="font-size:14px;color:#57534E">A 5-star rating takes 10 seconds and helps other finance AI teams and compliance researchers find it. Your feedback also tells us what to build next.</span>
</td>
</tr>
<tr>
<td style="padding:0;background:#1D4ED8;border:1px solid #E7EDFB;border-top:none;border-radius:0 0 10px 10px;text-align:center">
<a href="https://apify.com/getascraper/sec-edgar-rag-extractor/reviews" style="display:block;padding:13px 16px;color:#FFFFFF;text-decoration:none;font-weight:800;font-size:15px;letter-spacing:0.3px">★&nbsp;&nbsp;Rate this Actor on Apify</a>
</td>
</tr>
</table>

### ⚠️ User-Agent warning

**The SEC strictly requires a valid User-Agent header containing your name and email.** The default placeholder will be rejected with a 403 Forbidden error, crashing the run. Please override the `userAgent` input field with your real contact information before starting.

### ✨ Tips / Advanced options

- **Narrow via search:** Use the full-text search query field to build a highly targeted RAG corpus instead of pulling every filing for a CIK.
- **Filing sizes:** 10-K annual reports are very long. Expect 20 to 50 text chunks (512 tokens each) per filing.
- **Rate limiting:** The Actor automatically paces requests at the SEC ceiling of 10 requests per second for maximum throughput without IP bans.

### ⚖️ Legal disclaimer and limitations

SEC EDGAR data is public domain. Please respect the SEC fair-access policy.
Limitations:

- v1 supports 10-K, 10-Q, and 8-K bodies only. No 13F, S-1, or DEF 14A.
- v1 does not parse inline XBRL tables for numerical extraction.
- Text-format exhibits are concatenated into the main body text; binary exhibits are skipped.

### ❓ FAQ

**Why do I need a User-Agent?**
The SEC blocks automated traffic that doesn't identify itself. A valid name and email allow them to contact you if your traffic causes issues.

**Why are some filings marked `source: exhibits_stripped`?**
If a filing contains complex or binary attachments that fail to parse cleanly, the Actor falls back to extracting just the primary document body to ensure you still get data.

**Can I get 13F filings? S-1? DEF 14A?**
Not in v1. We focused on the core financial disclosures first.

### 🛟 Support

Found a bug or need a feature? Open an issue on our [GitHub repository](https://github.com/actorstack).

### 🔗 Other actors

- [arXiv Scraper for RAG](https://apify.com/getascraper/arxiv-rag-extractor) ↗ - extracts arXiv papers as chunked, LLM-ready JSON.
- [bioRxiv and medRxiv Scraper for RAG](https://apify.com/getascraper/biorxiv-medrxiv-rag-extractor) ↗ - extracts life science preprints as chunked JSON for RAG pipelines.
- [CourtListener RAG Extractor](https://apify.com/getascraper/courtlistener-rag-extractor) ↗ - extracts US court opinions and dockets as RAG-ready chunks.
- [PubMed Scraper for RAG](https://apify.com/getascraper/pubmed-rag-extractor) ↗ - extracts biomedical research papers as chunked JSON for LLM pipelines.

# Actor input Schema

## `cikList` (type: `array`):

Enter the 10-digit CIK numbers for companies (like '0000320193' for Apple). Leave empty for all.

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

Select the SEC form types you want to collect (such as annual 10-K, quarterly 10-Q, or current 8-K).

## `searchQuery` (type: `string`):

Optional keyword search term to filter filing text (such as 'AI' or 'cloud'). Leave blank for all.

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

Collect filings posted on or after this date.

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

Collect filings posted on or before this date.

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

Set the maximum number of filings you want to save for this run.

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

The SEC requires a declared name and contact email to use their database. Format: 'First Last email@domain.com'.

## Actor input object example

```json
{
  "cikList": [
    "0000320193"
  ],
  "formTypes": [
    "10-K"
  ],
  "searchQuery": "",
  "dateFrom": "2024-01-01",
  "dateTo": "2024-12-31",
  "maxFilings": 50,
  "userAgent": "your-name your@email.com"
}
```

# 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 = {
    "cikList": [
        "0000320193"
    ],
    "formTypes": [
        "10-K"
    ],
    "searchQuery": "",
    "dateFrom": "2024-01-01",
    "dateTo": "2024-12-31",
    "maxFilings": 50,
    "userAgent": "your-name your@email.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("getascraper/sec-edgar-rag-extractor").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 = {
    "cikList": ["0000320193"],
    "formTypes": ["10-K"],
    "searchQuery": "",
    "dateFrom": "2024-01-01",
    "dateTo": "2024-12-31",
    "maxFilings": 50,
    "userAgent": "your-name your@email.com",
}

# Run the Actor and wait for it to finish
run = client.actor("getascraper/sec-edgar-rag-extractor").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 '{
  "cikList": [
    "0000320193"
  ],
  "formTypes": [
    "10-K"
  ],
  "searchQuery": "",
  "dateFrom": "2024-01-01",
  "dateTo": "2024-12-31",
  "maxFilings": 50,
  "userAgent": "your-name your@email.com"
}' |
apify call getascraper/sec-edgar-rag-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/6IBhuHNwM30iCkbw5/builds/RSmwg7Md9C0tAoSHg/openapi.json
