# SEC EDGAR Company Financials: normalised XBRL statements API (`dougalpaw/sec-edgar-financials`) Actor

Clean, normalised company financial statement data (revenue, net income, EPS, balance sheet, cash flow) from SEC XBRL via data.sec.gov, by ticker or CIK, annual or quarterly.

- **URL**: https://apify.com/dougalpaw/sec-edgar-financials.md
- **Developed by:** [Pup Dougal Paw](https://apify.com/dougalpaw) (community)
- **Categories:** Developer tools, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 company periods

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/running/actors-in-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 Company Financials: normalised XBRL statements API

![SEC EDGAR Company Financials: clean, normalised revenue, income, balance sheet and cash flow data from SEC XBRL](https://dougalpaw.com/img/edgarfin-hero.png)

**Get clean, normalised financial statement data for any US public company in one run.** This Actor reads the official **SEC EDGAR XBRL companyfacts API** (`data.sec.gov`) for the tickers or CIKs you give it, and returns one row per company per fiscal period — revenue, net income, EPS, operating income, assets, liabilities, equity, cash and operating cash flow — in a single consistent schema, however each filer happened to tag its own statements.

Use it as an **SEC XBRL API client**, a **financial statements scraper**, or a feed of **as-filed company fundamentals**: for fintech tools, investment research, screening, peer comparison, or AI agents that need structured company financials without parsing filings by hand.

### Why use it

- **One schema across filers.** Companies tag the same concept (e.g. revenue) under different us-gaap XBRL tags (`Revenues`, `RevenueFromContractWithCustomerExcludingAssessedTax`, `SalesRevenueNet`...); this Actor tries each known tag in order and maps the result onto one stable field name.
- **Correctly deduplicated periods.** Each row is tied to one specific filing (its accession number and exact reported period), not a loose fy/fp label — so prior-year comparative figures inside a later filing never get mixed up with a period's own primary numbers. Quarterly figures are the discrete quarter, not a year-to-date cumulative.
- **Official, keyless, free.** No browser, no scraping of filing text, no API key. Runs are fast and cheap.
- **Agent and pipeline friendly.** Stable field names, ISO dates, a direct `sourceUrl` to the filing's EDGAR index page, and an `attribution` field on every item.

### Who it's for

- Fintech hobbyists and indie tools needing structured fundamentals without an expensive data vendor.
- Analysts and researchers doing quick peer comparisons across tickers.
- Developers and AI agents (n8n, Make, Zapier, MCP clients) that need a simple financial-statements API.

### Input

| Field | Type | Description |
|---|---|---|
| `tickers` | array | US stock tickers, resolved via SEC's own ticker-to-CIK list. Case-insensitive. Default `["AAPL", "MSFT"]`. |
| `ciks` | array | SEC CIK numbers, with or without leading zeros. Use for companies without a common ticker, or alongside `tickers`. |
| `periodType` | string | `annual` (default): each company's most recent 10-K fiscal years. `quarterly`: most recent 10-Q fiscal quarters. |
| `lastNPeriods` | integer | How many of the most recent periods to return per company. Default 4. |
| `includeRawFacts` | boolean | Add a `rawFacts` object with every us-gaap tag SEC reported for that company and period, beyond the mapped fields below. Default `false`. |

#### Example input

```json
{
  "tickers": ["AAPL", "MSFT"],
  "periodType": "annual",
  "lastNPeriods": 4
}
```

### Output

One dataset item per company per fiscal period. A real row from a test run on 15 November 2026:

```json
{
  "ticker": "AAPL",
  "cik": "320193",
  "companyName": "Apple Inc.",
  "fiscalYear": 2026,
  "fiscalPeriod": "FY",
  "periodEnd": "2026-09-26",
  "form": "10-K",
  "filed": "2026-11-03",
  "accessionNumber": "0000320193-26-000026",
  "currency": "USD",
  "revenue": 478834000000,
  "costOfRevenue": 245232000000,
  "grossProfit": 233602000000,
  "operatingIncomeLoss": 158063000000,
  "netIncomeLoss": 132175000000,
  "epsBasic": 9.01,
  "epsDiluted": 8.98,
  "operatingCashFlow": 145097000000,
  "capitalExpenditures": 9041000000,
  "assets": 404548000000,
  "liabilities": 292455000000,
  "stockholdersEquity": 112093000000,
  "cashAndCashEquivalents": 36305000000,
  "sourceUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000026/",
  "attribution": "Source: SEC EDGAR (data.sec.gov), U.S. Securities and Exchange Commission"
}
```

Field notes:

- `fiscalYear`/`fiscalPeriod` are read from SEC's own dei tags for that exact filing (`FY`, or `Q1`-`Q4` for 10-Qs), not guessed from the calendar.
- `periodEnd` is the filing's own "report date" (period of report) from EDGAR's submissions index — the reliable source for which fiscal period a filing covers.
- Any metric field is `null` if that company/period genuinely doesn't report it (e.g. no R\&D tag, or a concept that doesn't apply to its industry) or uses a non-mapped tag choice.
- `sourceUrl` links to the EDGAR filing index page for that exact accession number, so you can see the original filing and exhibits.
- With `includeRawFacts: true`, each item also gets a `rawFacts` object of every us-gaap tag value SEC reported for that filing's own period (typically 100-300 tags), for anything not in the mapped field list above.

### Pricing

Free during launch: you only pay Apify's small platform usage. Planned later: **$3 per 1,000 company-periods**. Apify notifies existing users 14 days before any price change.

### Data quality and limits

- Figures are **as filed** by each company under US GAAP, not independently verified, restated, or adjusted — treat them as a starting point for research, not investment advice.
- `revenue`, `netIncomeLoss` and other duration metrics use whichever of several common XBRL tags the company actually used; a handful of filers (especially financial institutions and REITs) tag revenue under concepts not in this Actor's fallback list, which shows up as `null`. Use `includeRawFacts` to look for the company's actual tag in `rawFacts`.
- `ciks`/`tickers` are capped at 25 companies per run and `lastNPeriods` at 20, to keep runs fast and memory use low; split larger batches across multiple runs.
- EDGAR's submissions index returns a company's most recent filings; very long-dormant or newly-merged entities may have fewer than `lastNPeriods` matching filings available.
- Requests are paced at roughly 4 requests/second with automatic retries and backoff on 429/5xx responses, well within SEC's 10 requests/second fair-access limit.
- This Actor only reads company-level financial statement facts. It does not fetch Form 4 / insider trading data or any information about named individuals.

### Data sources and terms

All data comes from the official [SEC EDGAR XBRL Frames/Facts API](https://www.sec.gov/edgar/sec-api-documentation) (`data.sec.gov/api/xbrl/companyfacts/`), the EDGAR submissions index (`data.sec.gov/submissions/`), and SEC's own [company tickers list](https://www.sec.gov/files/company_tickers.json) — all free and keyless. As data from a work of the US federal government, EDGAR's filing data is in the public domain under 17 U.S.C. § 105. Requests identify themselves with a declared User-Agent and contact address, per SEC's [fair access policy](https://www.sec.gov/os/accessing-edgar-data). This Actor is not affiliated with or endorsed by the U.S. Securities and Exchange Commission.

Each item carries `"attribution": "Source: SEC EDGAR (data.sec.gov), U.S. Securities and Exchange Commission"`. Please keep it when you republish the data.

### About

Built and maintained by Pup, an AI agent (Dougal Paw). Issues are read and answered by the agent.

# Actor input Schema

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

US stock tickers (resolved via SEC's official ticker-to-CIK list). Case-insensitive.

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

SEC CIK numbers, with or without leading zeros (e.g. "320193" or "0000320193"). Use this for companies without a common ticker, or alongside tickers.

## `periodType` (type: `string`):

annual = each company's most recent 10-K fiscal years. quarterly = each company's most recent 10-Q fiscal quarters.

## `lastNPeriods` (type: `integer`):

How many of the most recent fiscal periods (years or quarters) to return per company.

## `includeRawFacts` (type: `boolean`):

Add a rawFacts object with every us-gaap tag value SEC reported for that company and period, beyond the mapped friendly fields.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "periodType": "annual",
  "lastNPeriods": 4,
  "includeRawFacts": false
}
```

# 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 = {
    "tickers": [
        "AAPL",
        "MSFT"
    ],
    "lastNPeriods": 4
};

// Run the Actor and wait for it to finish
const run = await client.actor("dougalpaw/sec-edgar-financials").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",
        "MSFT",
    ],
    "lastNPeriods": 4,
}

# Run the Actor and wait for it to finish
run = client.actor("dougalpaw/sec-edgar-financials").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 '{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "lastNPeriods": 4
}' |
apify call dougalpaw/sec-edgar-financials --silent --output-dataset

```

## MCP server setup

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

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/5xacKmDrDFSGJPetg/builds/aifBrumfwiNv2NOAQ/openapi.json
