# SEC EDGAR Filings & XBRL Financial Facts API (`jackalalpha/sec-edgar-filings-financial-facts`) Actor

Turns the SEC's EDGAR JSON into one flat row per filing and one deduplicated row per financial figure, by ticker or CIK.

- **URL**: https://apify.com/jackalalpha/sec-edgar-filings-financial-facts.md
- **Developed by:** [Jackal Alpha](https://apify.com/jackalalpha) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## SEC EDGAR API: Filings & XBRL Financial Facts

By Jackal Alpha.

This SEC EDGAR scraper and API returns filings and financial facts as flat rows. Give it company tickers or CIK numbers and it reads the SEC's official, free JSON APIs on data.sec.gov. You get one row per filing (10-K, 10-Q, 8-K, Form 4 and more) with dates, accession number, 8-K item codes and links to the filing and main document, and one row per XBRL figure (revenue, net income, assets and others) for each company and period, de-duplicated so each period appears once. It needs no proxy and no browser, and only-new mode returns just filings you have not seen. Price: $0.0006 per filing and $0.0002 per fact. Not investment advice, and not affiliated with or endorsed by the SEC.

It is built for analysts, data pipelines and AI agents that want clean rows instead of nested SEC JSON. The Actor reads only SEC APIs. It does not scrape web pages and does not need a proxy.

This Actor is not investment advice and is not affiliated with, endorsed by or sponsored by the U.S. Securities and Exchange Commission. The data is the SEC's; check anything that matters against the original filing.

### What you get

Every record has a `recordType` field: `filing`, `fact`, or `error`. They all go to the default dataset. The dataset has two views, **Filings** and **Financial facts**, that show only the relevant columns.

#### Filing record

```json
{
  "recordType": "filing",
  "cik": "0000320193",
  "ticker": "AAPL",
  "companyName": "Apple Inc.",
  "form": "10-K",
  "filingDate": "2024-11-01",
  "reportDate": "2024-09-28",
  "acceptanceDateTime": "2024-11-01T06:01:36.000Z",
  "accessionNumber": "0000320193-24-000123",
  "primaryDocument": "aapl-20240928.htm",
  "primaryDocDescription": "10-K",
  "items": null,
  "size": 9000000,
  "isXBRL": true,
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/0000320193-24-000123-index.htm",
  "documentUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm"
}
```

`items` holds the item codes for 8-K filings (for example `2.02,9.01`) and is `null` for other forms. Values above are illustrative.

#### Fact record

```json
{
  "recordType": "fact",
  "cik": "0000320193",
  "ticker": "AAPL",
  "companyName": "Apple Inc.",
  "taxonomy": "us-gaap",
  "concept": "NetIncomeLoss",
  "label": "Net Income (Loss)",
  "unit": "USD",
  "value": 93736000000,
  "fiscalYear": 2024,
  "fiscalPeriod": "FY",
  "periodStart": "2023-10-01",
  "periodEnd": "2024-09-28",
  "form": "10-K",
  "filedDate": "2024-11-01",
  "accessionNumber": "0000320193-24-000123",
  "frame": "CY2024"
}
```

Balance-sheet items such as `Assets` are point-in-time, so `periodStart` is `null`.

#### Error record

An unknown ticker, a CIK with no data, or a failed lookup produces `{ "recordType": "error", "input": "...", "error": "..." }`. Error records are never charged and do not fail the run.

#### How restated facts are handled

The same figure is often reported several times: once in its own filing, then again as a comparative in later filings, sometimes restated. Facts are de-duplicated by taxonomy, concept, unit, period start and period end. For each period the Actor keeps the value from the most recently filed filing (ties go to the higher accession number). `value`, `form`, `filedDate` and `accessionNumber` come from that latest filing. `fiscalYear` and `fiscalPeriod` come from the filing that first reported the period, because later filings label comparatives with their own fiscal year.

### Input

| Field | Meaning |
|---|---|
| `companies` | Tickers (`AAPL`, `BRK.B`), CIK numbers (`320193`) or company names (`Apple Inc.`). Required. A name is matched against the SEC's company list: exact match ignoring case first, then a unique "starts with" match. An ambiguous or unknown name gives an uncharged error record that lists up to five candidates. |
| `mode` | `filings`, `facts` or `both`. Default `both`. |
| `formTypes` | Forms to keep, for example `10-K`, `10-Q`, `8-K`, `4`. Exact match by default. Empty means all forms. |
| `includeAmendments` | Default `false`. When `true`, `10-K` also matches `10-K/A`, `8-K` also matches `8-K/A`, and so on. |
| `filedAfter`, `filedBefore` | Inclusive filing-date range, `YYYY-MM-DD`. |
| `filedWithinDays` | Relative alternative to `filedAfter`: filings from the last N days. If both are set, the later date wins. Use this in schedules, where a fixed date goes stale. |
| `onlyNew` | Default `false`. When `true`, only records not delivered by an earlier run are delivered and charged. See below. |
| `stateStoreName` | Named key-value store that holds that memory. Default `sec-edgar-seen`. Use a different name for each separate schedule. |
| `maxFilingsPerCompany` | Default 20, newest first. |
| `concepts` | XBRL tags such as `Revenues`, `NetIncomeLoss`, `Assets`. Use `dei:EntityCommonStockSharesOutstanding` style to name the taxonomy. Empty means a default set of about 15 headline concepts: revenue, cost of revenue, gross profit, operating income, net income, basic and diluted EPS, assets, liabilities, equity, cash, long-term debt, operating cash flow, R\&D expense and shares outstanding. |
| `periods` | `annual`, `quarterly` or `both`. Annual means a period of about a year or longer; quarterly includes quarter and year-to-date figures. |
| `maxFactsPerCompany` | Default 500, newest periods first. |

Revenue is tagged differently by different companies. Asking for `Revenues` also returns `RevenueFromContractWithCustomerExcludingAssessedTax`, `RevenueFromContractWithCustomerIncludingAssessedTax`, `SalesRevenueNet`, `SalesRevenueGoodsNet` and `SalesRevenueServicesNet`. The same applies to cost of revenue (`CostOfRevenue`, `CostOfGoodsAndServicesSold`, `CostOfGoodsSold`). The `concept` field always shows the tag the company actually used. Filing filters apply to filings only, and concept and period filters apply to facts only.

Sample input:

```json
{
  "companies": ["AAPL", "MSFT"],
  "mode": "both",
  "formTypes": ["10-K", "10-Q"],
  "filedAfter": "2023-01-01",
  "concepts": ["Revenues", "NetIncomeLoss", "Assets"],
  "periods": "annual",
  "maxFilingsPerCompany": 10
}
```

### Example uses

- Pull the last five annual reports and net income history for a watchlist, then load both into a spreadsheet or warehouse.
- Monitor current reports: schedule a daily run with `mode: filings`, `formTypes: ["8-K"]`, `onlyNew: true` and your company list. Each run returns only 8-Ks you have not received before, so you pay only for new filings and there is no date to edit.
- Track insider activity by fetching Form 4 filings and following `documentUrl`.
- **From an AI agent**: call the Actor through the Apify API or MCP server with a small input, then read the dataset items. For example, to answer "what was Microsoft's latest annual revenue", an agent can send `{"companies":["MSFT"],"mode":"facts","concepts":["Revenues"],"periods":"annual","maxFactsPerCompany":3}` and read `value`, `unit`, `periodEnd` and `accessionNumber` from the first fact. The accession number lets the agent cite the filing. Setting the two max fields keeps the cost of each call small and predictable.

### Only-new mode

With `onlyNew: true` the Actor stores, per CIK, the accession numbers of filings it delivered and a key for each fact it delivered (concept, unit, period and accession number), in the named key-value store `stateStoreName`. The store is named, so it survives between runs. On the next run those records are skipped and not charged. The first run delivers everything allowed by the other limits (`maxFilingsPerCompany`, `maxFactsPerCompany`, dates, forms). A restated fact has a new accession number, so it is delivered again as new. If a run stops at your cost limit, records that were not delivered are not remembered and come back next time. Pair it with `filedWithinDays` if you also want a hard cut-off. To start over, delete the store or use a new `stateStoreName`. When old filings are split across SEC archive pages, a run that finds an already-delivered filing on the newest page does not fetch the older pages.

### Pricing

Pay per event:

| Event | Price |
|---|---|
| `filing`: one filing record | $0.0006 |
| `fact`: one financial fact | $0.0002 |

Errors are free. You are charged only for records that were delivered, and the Actor stops when your maximum cost per run is reached, so it never delivers more than you have paid for.

Worked example: 2 companies, `mode: both`, 20 filings and 200 facts each. That is 40 filings at $0.0006 = $0.024, plus 400 facts at $0.0002 = $0.08, total $0.104.

Platform usage costs depend on how Apify bills your plan for the run itself; this Actor makes few requests and uses little compute.

### Data freshness and source

All data comes from the SEC's EDGAR JSON APIs (submissions and XBRL company facts) and the SEC's ticker-to-CIK file. The SEC updates these as it processes filings, so a brand-new filing can appear with a short delay, and company facts can lag behind submissions. The Actor fetches live on every run and caches nothing between runs. The SEC is the only source; filing text and exhibits are not downloaded, only linked.

The Actor follows the SEC's fair-access rules: it sends a declared User-Agent, throttles itself to at most 5 requests per second (the SEC's cap is 10), and backs off and retries on 429, 403 and 5xx responses.

### Limits

- Only companies with an SEC CIK. Tickers come from the SEC's own file, which lists currently active listed companies; delisted companies can be fetched by CIK.
- Facts exist only for filers that submit XBRL financial data. Funds, many small filers and old filings have none; you get an error record.
- Facts are limited to the concepts you request. Only the figures the company tagged in XBRL are available, and tags differ between companies.
- A fact's period class (annual or quarterly) is derived from the period length, or for point-in-time items from the filing that first reported it. Unusual fiscal calendars can be misclassified.
- Form filtering is an exact match on the form name unless `includeAmendments` is on.
- Segment and dimensional breakdowns (for example revenue by product) are not in the SEC company-facts API and are not returned.
- The SEC may block requests that look abusive. Very large runs are slow by design because of the 5 requests per second throttle.

### FAQ

**Is this investment advice?** No. It is a data tool. It is not affiliated with the SEC.

**Why is there a User-Agent setting?** The SEC requires automated clients to identify themselves. The Actor reads the `SEC_USER_AGENT` environment variable (format: a name plus a contact email). Set it in the Actor's environment variables for your own runs.

**Why do some facts show a different fiscal year than I expect?** See the restatement note above: the fiscal year is that of the filing that first reported the period.

**Why are there two values for the same quarter in other tools but one here?** This Actor keeps only the latest filed value per period.

**Can I get the filing text?** Not directly. Use `documentUrl` to fetch it.

**What happens if one company fails?** It gets an error record and the run continues with the rest.

**Input limits.** One run accepts up to 100 `companies`, 50 `formTypes`, 200 `concepts`, and 100000 output rows per run (companies x filings and facts per company). Above that the run stops at once with a clear message; split the work into several runs.

# Actor input Schema

## `companies` (type: `array`):

Tickers (AAPL), CIK numbers (320193) or company names (Apple Inc.). Names match exactly, then by a unique start. Anything unresolved produces an uncharged error record.

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

Filing records, XBRL financial facts, or both.

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

For example 10-K, 10-Q, 8-K, 4. Exact match unless Include amendments is on. Empty means all forms.

## `includeAmendments` (type: `boolean`):

When on, a form type such as 10-K also matches amendments such as 10-K/A.

## `filedAfter` (type: `string`):

Date as YYYY-MM-DD. Leave empty for no lower bound.

## `filedWithinDays` (type: `integer`):

Relative alternative to Filed on or after, useful in schedules. If both are set, the later date wins.

## `filedBefore` (type: `string`):

Date as YYYY-MM-DD. Leave empty for no upper bound.

## `maxFilingsPerCompany` (type: `integer`):

Newest filings first. Each delivered filing is billed.

## `concepts` (type: `array`):

Tags such as Revenues, NetIncomeLoss, Assets. Use taxonomy:Tag (for example dei:EntityCommonStockSharesOutstanding) to be exact. Revenue and cost-of-revenue tags also return their common alternates. Empty means about 15 headline concepts.

## `periods` (type: `string`):

Annual (full-year), quarterly (quarter and year-to-date), or both.

## `maxFactsPerCompany` (type: `integer`):

Newest periods first. Each delivered fact is billed.

## `onlyNew` (type: `boolean`):

Deliver and charge only filings and facts not delivered by an earlier run that used the same state store. The first run delivers everything within the other limits.

## `stateStoreName` (type: `string`):

Named key-value store that remembers what was delivered. Use a different name for each independent schedule.

## Actor input object example

```json
{
  "companies": [
    "AAPL",
    "MSFT"
  ],
  "mode": "both",
  "formTypes": [],
  "includeAmendments": false,
  "maxFilingsPerCompany": 20,
  "concepts": [],
  "periods": "both",
  "maxFactsPerCompany": 500,
  "onlyNew": false,
  "stateStoreName": "sec-edgar-seen"
}
```

# Actor output Schema

## `results` (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 = {
    "companies": [
        "AAPL",
        "MSFT"
    ],
    "formTypes": [],
    "concepts": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("jackalalpha/sec-edgar-filings-financial-facts").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 = {
    "companies": [
        "AAPL",
        "MSFT",
    ],
    "formTypes": [],
    "concepts": [],
}

# Run the Actor and wait for it to finish
run = client.actor("jackalalpha/sec-edgar-filings-financial-facts").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 '{
  "companies": [
    "AAPL",
    "MSFT"
  ],
  "formTypes": [],
  "concepts": []
}' |
apify call jackalalpha/sec-edgar-filings-financial-facts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jackalalpha/sec-edgar-filings-financial-facts"
        }
    }
}
```

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/4O83vhIHpA0EiI8X0/builds/S3GZzus8ggzIXV86l/openapi.json
