# 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 $2.10 / 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.
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

## 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

Download the OpenAPI definition: https://api.apify.com/v2/actors/qr5GpMt6jNdYttOqn/builds/N2M3x04uZo0nn9bXD/openapi.json
