# EDGAR Company Filings & XBRL Fundamentals Extractor (`gp005/edgar-xbrl-fundamentals`) Actor

Fetch SEC EDGAR filings (10-K, 10-Q, 8-K, 13-F…) and XBRL financial data for any public company. Returns structured revenue, EPS, assets, and filing metadata via the SEC's official data.sec.gov API — no login, no paywall.

- **URL**: https://apify.com/gp005/edgar-xbrl-fundamentals.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 fetcheds

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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.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/platform/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

## EDGAR Company Filings & XBRL Fundamentals Extractor

Pull **SEC EDGAR filings** (10-K, 10-Q, 8-K, 13-F, S-1…) and **XBRL financial fundamentals** (Revenue, Net Income, EPS, Assets, Equity…) for any US-listed public company — via the SEC's official `data.sec.gov` API. No login, no paywall, structured JSON output.

### What it does

- **Ticker → CIK resolution**: supply `AAPL`, get Apple's full filing history.
- **Filing list mode**: returns recent filings with form type, filed date, report period, accession number, and direct links to the primary document and EDGAR index.
- **XBRL financials mode**: returns the full time-series of any US-GAAP or DEI concept (Revenue, NetIncomeLoss, EPS, Assets, StockholdersEquity, etc.) in structured JSON — ready for charting, screening, or RAG pipelines.
- **Both modes together**: one actor run yields the full company picture.

### Use cases

1. **Financial research**: pull 20 years of revenue and EPS for a watchlist of stocks.
2. **Compliance / audit**: get every 8-K and DEF 14A for a company since 2000.
3. **Quant screening**: bulk-extract P&L and balance-sheet items for the S&P 500.
4. **RAG / LLM context**: feed structured SEC filings into a vector store or prompt.
5. **Webhook alerts**: trigger on new 8-K or 10-Q filings via Apify webhooks.

### Example input

```json
{
  "tickers": ["AAPL", "MSFT", "NVDA"],
  "mode": "both",
  "formTypes": ["10-K", "10-Q"],
  "maxFilings": 10,
  "xbrlConcepts": ["Revenues", "NetIncomeLoss", "EarningsPerShareBasic", "Assets"]
}
````

### Example output item (financials mode)

```json
{
  "cik": "0000320193",
  "ticker": "AAPL",
  "companyName": "Apple Inc.",
  "concept": "us-gaap/Revenues",
  "unit": "USD",
  "label": "Revenues",
  "values": [
    { "end": "2024-09-28", "val": 391035000000, "fy": 2024, "fp": "FY", "form": "10-K", "filed": "2024-11-01" },
    { "end": "2023-09-30", "val": 383285000000, "fy": 2023, "fp": "FY", "form": "10-K", "filed": "2023-11-03" }
  ]
}
```

### Example output item (filings mode)

```json
{
  "cik": "0000320193",
  "ticker": "AAPL",
  "companyName": "Apple Inc.",
  "form": "10-K",
  "filedDate": "2024-11-01",
  "reportDate": "2024-09-28",
  "accessionNumber": "0000320193-24-000123",
  "primaryDocument": "aapl-20240928.htm",
  "fileUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm",
  "indexUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/"
}
```

### Pricing & cost math

Pay-per-event model:

| Event | Price | When charged |
|---|---|---|
| `actor-start` | $0.01 | Once per run (covers fixed startup cost) |
| `filing-fetched` | $0.003 | Per filing record returned |
| `financial-concept-fetched` | $0.005 | Per XBRL concept × company returned |

**Example: AAPL + MSFT, mode=both, 10 filings, 4 concepts**

- 1 × actor-start = $0.01
- 20 filing records = 20 × $0.003 = $0.06
- 8 concept records = 8 × $0.005 = $0.04
- **Total: $0.11**

Platform compute cost at this workload: ~0.003 CU × $0.40/CU = **$0.0012** — margin > 99%.

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

### Rate limits

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

### Legal / attribution

Data is sourced from the U.S. Securities and Exchange Commission's public data APIs (`data.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)). This actor is not affiliated with, endorsed by, or sponsored by the SEC.

### Integrations

- **Apify API**: call via REST, schedule, 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 new filing data to Slack, Notion, or a database.

### Limitations

- XBRL facts are only available for filers that submitted interactive data (iXBRL/XBRL) — generally all large accelerated filers from ~2009 onwards.
- Historical filings pre-1996 may have limited metadata.
- The actor respects the SEC's 10 req/s rate limit; very large batches (100+ companies) may take a few minutes.

# Actor input Schema

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

List of stock tickers to look up (e.g. \["AAPL", "MSFT", "GOOG"]). Provide either this OR 'ciks'.

## `ciks` (type: `array`):

SEC Central Index Key numbers (10-digit zero-padded or plain integer). Provide either this OR 'tickers'. Example: \["0000320193"] for Apple.

## `mode` (type: `string`):

What to fetch: 'filings' = recent filing list metadata (default), 'financials' = XBRL company-facts (revenue/EPS/assets/equity), 'both' = filings + financials.

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

Filter filing list to these SEC form types. Leave empty for all forms. Common: 10-K, 10-Q, 8-K, 13-F, S-1, DEF 14A.

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

Maximum number of filing records to return per company (most recent first). Only applies when mode includes 'filings'. Max 500.

## `xbrlConcepts` (type: `array`):

List of US-GAAP or DEI XBRL concept tags to extract for each company. Leave empty for defaults (Revenue/NetIncome/EPS/TotalAssets/StockholdersEquity). See https://xbrl.us/data-rule/dqc\_0015/ for concept names.

## `proxyConfig` (type: `object`):

Proxy settings. SEC.gov has a 10 req/s rate limit; proxies are not needed for normal usage.

## `maxConcurrency` (type: `integer`):

Maximum concurrent API requests to data.sec.gov. Keep at 1–2 to stay well under the 10 req/s SEC rate limit.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "ciks": [
    "0000320193"
  ],
  "mode": "both",
  "formTypes": [
    "10-K",
    "10-Q"
  ],
  "maxFilings": 10,
  "xbrlConcepts": [
    "Revenues",
    "NetIncomeLoss",
    "EarningsPerShareBasic",
    "Assets"
  ],
  "maxConcurrency": 2
}
```

# 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"
    ],
    "mode": "both",
    "formTypes": [
        "10-K"
    ],
    "maxFilings": 2
};

// Run the Actor and wait for it to finish
const run = await client.actor("gp005/edgar-xbrl-fundamentals").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"],
    "mode": "both",
    "formTypes": ["10-K"],
    "maxFilings": 2,
}

# Run the Actor and wait for it to finish
run = client.actor("gp005/edgar-xbrl-fundamentals").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"
  ],
  "mode": "both",
  "formTypes": [
    "10-K"
  ],
  "maxFilings": 2
}' |
apify call gp005/edgar-xbrl-fundamentals --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "EDGAR Company Filings & XBRL Fundamentals Extractor",
        "description": "Fetch SEC EDGAR filings (10-K, 10-Q, 8-K, 13-F…) and XBRL financial data for any public company. Returns structured revenue, EPS, assets, and filing metadata via the SEC's official data.sec.gov API — no login, no paywall.",
        "version": "0.1",
        "x-build-id": "N2M3x04uZo0nn9bXD"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/gp005~edgar-xbrl-fundamentals/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-gp005-edgar-xbrl-fundamentals",
                "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-xbrl-fundamentals/runs": {
            "post": {
                "operationId": "runs-sync-gp005-edgar-xbrl-fundamentals",
                "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-xbrl-fundamentals/run-sync": {
            "post": {
                "operationId": "run-sync-gp005-edgar-xbrl-fundamentals",
                "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",
                "properties": {
                    "tickers": {
                        "title": "Ticker symbols",
                        "type": "array",
                        "description": "List of stock tickers to look up (e.g. [\"AAPL\", \"MSFT\", \"GOOG\"]). Provide either this OR 'ciks'.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "ciks": {
                        "title": "SEC CIK numbers",
                        "type": "array",
                        "description": "SEC Central Index Key numbers (10-digit zero-padded or plain integer). Provide either this OR 'tickers'. Example: [\"0000320193\"] for Apple.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "mode": {
                        "title": "Data mode",
                        "enum": [
                            "filings",
                            "financials",
                            "both"
                        ],
                        "type": "string",
                        "description": "What to fetch: 'filings' = recent filing list metadata (default), 'financials' = XBRL company-facts (revenue/EPS/assets/equity), 'both' = filings + financials.",
                        "default": "both"
                    },
                    "formTypes": {
                        "title": "Form types filter",
                        "type": "array",
                        "description": "Filter filing list to these SEC form types. Leave empty for all forms. Common: 10-K, 10-Q, 8-K, 13-F, S-1, DEF 14A.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxFilings": {
                        "title": "Max filings per company",
                        "minimum": 1,
                        "maximum": 500,
                        "type": "integer",
                        "description": "Maximum number of filing records to return per company (most recent first). Only applies when mode includes 'filings'. Max 500.",
                        "default": 20
                    },
                    "xbrlConcepts": {
                        "title": "XBRL financial concepts",
                        "type": "array",
                        "description": "List of US-GAAP or DEI XBRL concept tags to extract for each company. Leave empty for defaults (Revenue/NetIncome/EPS/TotalAssets/StockholdersEquity). See https://xbrl.us/data-rule/dqc_0015/ for concept names.",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "proxyConfig": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. SEC.gov has a 10 req/s rate limit; proxies are not needed for normal usage."
                    },
                    "maxConcurrency": {
                        "title": "Max concurrent requests",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "Maximum concurrent API requests to data.sec.gov. Keep at 1–2 to stay well under the 10 req/s SEC rate limit.",
                        "default": 2
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
