# SEC Financial Statements Scraper: XBRL by Ticker (`automation_craft/sec-xbrl-financials-scraper`) Actor

Income statement, balance sheet and cash flow of any SEC XBRL filer by ticker, CIK or name, from EDGAR, no login or API key: years, quarters, TTM or one line across all filers. Rows: line, value, period, fiscal year, XBRL concept, 10-K/10-Q accession, first reported value. JSON or CSV, pay per row.

- **URL**: https://apify.com/automation_craft/sec-xbrl-financials-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Business, Developer tools
- **Security:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.08 / 1,000 statement lines

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/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 Financial Statements Scraper: XBRL by Ticker

**SEC financial statements by ticker**: income statement, balance sheet and cash flow lines of any company that files XBRL with the SEC, by fiscal year, fiscal quarter or trailing twelve months, read straight from the SEC's own XBRL API. No login, no API key, no third party data vendor.

Give it tickers (AAPL, MSFT, BRK-B), CIK numbers or company names. You get one row per company, line and period with the figure, its period dates, the fiscal year and quarter as the company labels them, the XBRL concept it was read from, the filing it came from and the value as first reported before any restatement. Or one row per period with every line as a column, or every XBRL fact exactly as the company reported it, or one line across every SEC filer that reported it for a calendar year or quarter (a fundamentals screen).

#### Why this one

- **Normalised lines, not raw tags.** Companies change XBRL concepts over the years (Apple's `Revenues` ends in 2018 and `RevenueFromContractWithCustomerExcludingAssessedTax` takes over). Each of the 50 standard lines is read from a fixed list of concepts, and every row names the concept it came from (a derived line such as free cash flow names the figures it was computed from) and any other concept that held a different value.
- **Quarters that add up.** A 10-Q reports its quarter and its year to date; the fourth quarter is usually not reported on its own. Missing quarters of income and cash flow lines are derived from the year to date figures of the same concept and marked `derived`, with the two figures used. Per share figures and share counts are never derived by subtraction.
- **Restatements kept.** Every statement line of a company carries the latest filed value and the value as first reported, with both filings. Ask for `first_reported` to get the figures as the market first saw them.
- **Fiscal labels that are right.** The SEC's own fact labels carry the fiscal year of the filing that repeated a figure, not of the figure's own period. Periods here are keyed by their dates, and their fiscal labels come from the report of that period.
- **Misses are free rows.** An unknown ticker, a company without XBRL data, a fund with an empty XBRL file, a name that fits several companies, a newer report the SEC's API does not hold yet: each is a free status row, never a charge and never a silent drop.
- **Revenue by product, segment and region.** Turn on `includeSegments` and each line the company broke down in its filing, under the same XBRL concept as the line's figure, comes with one row per product or service, business segment or geographic area (Apple's revenue by iPhone, Mac and Services, by Americas and Europe, by country), read from the XBRL of the very filing behind the line's figure, with the member's label, the total and its share.
- **Pay per figure.** From USD 0.076 per 1,000 statement lines (Gold plan). Status, company profile, peer comparison and summary rows are free.

### Quick start

1. Open the Actor and type tickers in **Tickers**, for example `AAPL` and `MSFT`.
2. Leave the rest as it is: the last 5 fiscal years of every income statement, balance sheet, cash flow and bank line.
3. Click **Start**. A two company run takes a few seconds.
4. Open the **Statement lines** view of the dataset, or export it as JSON, CSV or Excel.
5. For quarters, set **Periods** to "Fiscal quarters" or "Years and quarters" and turn on **Trailing twelve months**; for one row per year with every line as a column, set **Layout** to "One row per period, lines as columns".

### Use cases

- **Fundamental research and models**: ten years of revenue, margins, debt and cash flow per company in one table, with the concept behind every figure.
- **Quant and backtests**: first reported values (point in time) next to restated ones, filing dates for every figure.
- **Screens across the market**: one line (revenue, net income, total assets) for every SEC filer in a calendar year or quarter, filtered by value, exchange and location, largest first.
- **Peer comparison**: rank a list of companies on every line and fiscal year (free rows).
- **Data pipelines**: a stable row shape with fixed line ids, run by API, schedule or n8n, Make and Zapier.

### What you get

#### Statement line row (layout: lines, charged as a Statement line)

| Field | What it holds | Example |
|---|---|---|
| `ticker`, `cik`, `companyName`, `exchange` | The company as the SEC lists it | `AAPL`, `0000320193`, `Apple Inc.`, `Nasdaq` |
| `statement`, `line`, `lineLabel` | income, balance, cashflow, bank, ratios or custom; the line id and its name | `income`, `revenue`, `Revenue` |
| `periodType`, `fiscalYear`, `fiscalPeriod` | annual, quarterly or ttm; the fiscal year and FY, Q1 to Q4 or TTM | `annual`, `2025`, `FY` |
| `periodStart`, `periodEnd`, `durationDays`, `instant` | The period's dates (a balance sheet line: its date) | `2024-09-29`, `2025-09-27`, `364`, `false` |
| `value`, `unit`, `currency`, `valueKind` | The figure, its unit and reporting currency | `416161000000`, `USD`, `USD`, `money` |
| `valueVersion`, `latestValue`, `firstReportedValue`, `restated`, `versionCount` | Which version `value` is, both versions, whether they differ, how many filings reported it | `latest`, `416161000000`, `416161000000`, `false`, `1` |
| `taxonomy`, `concept`, `conceptLabel`, `alternativeConcepts` | The XBRL concept read, and other concepts of the line that held a different value | `us-gaap`, `RevenueFromContractWithCustomerExcludingAssessedTax` |
| `derived`, `derivation`, `derivedFrom` | Whether the figure is computed, how, and from which figures | `false` |
| `accessionNumber`, `form`, `filed`, `filingUrl` | The filing of the value delivered | `0000320193-25-000079`, `10-K`, `2025-10-31` |
| `firstReportedAccession`, `firstReportedFiled` | The filing that first reported it | `0000320193-25-000079`, `2025-10-31` |
| `frame`, `fiscalLabelsFrom`, `source` | The SEC's calendar frame of the fact; whether the fiscal labels come from the company's report or were computed; the source | `CY2025`, `filing` |

`outputProfile: compact` keeps the figure, its period, fiscal labels, concept, filing and (for a derived figure) its derivation, and drops the detail fields (operand lists, alternative concepts, labels, links).

#### The 50 lines and 21 ratios

- **Income statement**: revenue, cost of revenue, gross profit, research and development, selling general and administrative, operating expenses, operating income, EBITDA (derived), interest expense, income before taxes, income tax, net income, net income to common shareholders, EPS basic and diluted, weighted average shares basic and diluted.
- **Balance sheet**: cash, short term investments, cash and short term investments, receivables, inventory, total current assets, property plant and equipment, goodwill, intangibles, total assets, accounts payable, total current liabilities, short term debt, long term debt, total debt (derived), shares outstanding, total liabilities, shareholders' equity, total liabilities and equity.
- **Cash flow**: operating, investing and financing cash flow, capital expenditure, free cash flow (derived), dividends paid, share repurchases, depreciation and amortization, stock based compensation.
- **Banks**: interest income, net interest income, provision for credit losses, deposits, loans.
- **Ratios** (`includeRatios`): gross, operating, net and free cash flow margins; return on equity, assets and invested capital; current and quick ratios; long term and total debt to equity; dividend payout ratio; book value and cash per share; revenue, net income and diluted EPS growth on the year before; revenue and diluted EPS growth per year over 3 and 5 years.
- **Any other concept** you name in `concepts`, for example `us-gaap:AdvertisingExpense`.

#### Fill rates

Measured on a real run of 50 large US listed companies (2026-11-02): the share of the 49 with an annual report in XBRL that have the line for their latest fiscal year (ExxonMobil's new holding company has filed only quarters so far). A line a company does not report is simply not delivered and not charged.

| Lines | Companies with the line |
|---|---|
| Revenue, net income, income tax, cash, total assets, equity, total liabilities and equity, the three cash flow totals | 100% |
| Income before taxes, EPS basic and diluted, weighted average shares, stock based compensation, goodwill | 94% to 98% |
| Short term and long term debt, interest expense, property plant and equipment, dividends paid, capital expenditure, free cash flow | 88% to 92% |
| Receivables, intangibles, share repurchases, current assets and liabilities, depreciation and amortization, total liabilities | 76% to 86% |
| Accounts payable, total debt, operating income, shares outstanding, inventory | 65% to 73% |
| Cost of revenue, gross profit, research and development, EBITDA | 53% to 61% |
| Selling general and administrative, short term investments, cash and short term investments, net income to common shareholders | 43% to 49% |
| Operating expenses (as one total) | 31% |
| Bank lines (interest income, net interest income, deposits; provision for credit losses and loans at 4 of 6) | 6 of the 6 banks in the set |

Banks report no gross profit or operating income, so those lines and their margins are left out for them. Each ratio is filled where its inputs are (net margin, return on assets and revenue growth 100%, return on equity 98%, gross margin 61%, return on invested capital 57%).

#### Statement period row (layout: periods, charged as a Statement period)

One row per company and period (or, with `periodRowsBy: statement`, per company, statement and period), every line as a camelCase column (`revenue`, `netIncome`, `epsDiluted`, `totalAssets`, `freeCashFlow` ...), (a named concept's column is `custom_<taxonomy>_<Concept>`, for example `custom_us_gaap_AdvertisingExpense`), with `concepts`, `units` (each column's unit), `derivedLines`, `restatedLines`, `firstReportedValues`, `accessionNumbers` and `lastFiled` (the newest filing date of the row) beside them.

#### XBRL fact row (layout: facts, charged as an XBRL fact)

Every fact of the company's periodic reports exactly as reported: `taxonomy`, `concept`, `conceptLabel`, `unit`, `value`, `periodStart`, `periodEnd`, `form`, `accessionNumber`, `filed`, `frame`, the filing's own `filingFiscalYear` and `filingFiscalPeriod`, `isLatestVersion`, `firstReportedValue` and `restated`. `factVersions: all` gives one row per filing that reported a fact (comparatives and restatements included). Filter by `concepts`, `taxonomies`, `periodEndFrom`, `periodEndTo`, `filedFrom`, `filedTo` and `forms`.

#### Segment figure row (add-on includeSegments, charged as a Segment figure)

One row per line row, period and member that the company broke down by product or service (`srt:ProductOrServiceAxis`), business segment (`us-gaap:StatementBusinessSegmentsAxis`) or geographic area (`srt:StatementGeographicalAxis`, or the IFRS twins), as tagged in the XBRL instance of the filing that reported the line's figure (the line row's `accessionNumber`): the line row's company, line and period fields, `axis`, `axisKind` (`product_or_service`, `business_segment`, `geography`), `member`, `memberLabel` (from the filing's label file), `value`, `lineValue` (the company total), `shareOfLine`, the filing and `instanceUrl`. Example: Apple, revenue, fiscal 2025, `aapl:IPhoneMember`, `iPhone`, 209586000000 of 416161000000 (0.5036). Only figures the company tagged on exactly one of these axes, for the same concept, unit and period as the line: nothing is summed or derived, and lines with no figure of their own (derived quarters, TTM, ratios, derived lines) have no breakdown. A company whose filings tag no breakdown under the line's own concept gets a free status row (a few filers tag the breakdown under another revenue concept than their total, Alphabet for one: they get none). The add-on's reads (three per filing) are paid from their own share of the run's free work allowance, never from the room of the statement lines: when that share is used up for a company, its segment figures stop there (named in a free row, the company partial) and the next company tries again with the credit its own segment figures bring; the statement lines always go on. With the add-on on, each statement line row also carries `figureHash` (the run's identity of the row after a platform restart). On 7 companies (Apple, Microsoft, JPMorgan, Zions, Realty Income, Educational Development, CoreWeave) every one gave figures: Apple 57 rows for revenue, operating income and total assets over 3 years.

#### Frames mode (one line across all companies)

`mode: frames` reads one line (or a concept you name) for every SEC filer that reported it for a calendar year (`CY2024`) or quarter (`CY2024Q3`), from the SEC's frames: one statement line row per company with its value, period dates, the concept used, the filing and the company's location. Balance sheet lines are read at the period end. Filter with `minValue`, `maxValue`, `exchanges`, `locations` and `excludeLocations`, narrow to the companies you name, sort largest or smallest first. US GAAP filers only: the SEC serves no IFRS frames.

#### Free rows

- **company**: the SEC filer record (SIC industry, filer category, fiscal year end, state of incorporation, EIN, exchanges, former names, business address and phone), what its XBRL file holds (currency, taxonomies, number of facts and concepts, fiscal years and quarters, first and last period), and whether its latest periodic report is in the SEC's XBRL API yet.
- **peer_comparison** (`peerComparison`): for 2 to 200 companies read in full, one row per line and fiscal period ranking them, with median, mean, min and max.
- **status**: every input problem, miss and note, one row per kind.
- **summary**: rows delivered, events charged, coverage per company, requests, the free work allowance and the run's stop.

### How much does it cost to scrape SEC financial statements?

Pay per event: you pay per row delivered plus a small start fee per run. Prices of the row events per 1,000 rows, the Actor start per run:

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Statement line (one figure of one line or ratio for one period) | USD 0.106 | USD 0.097 | USD 0.088 | USD 0.076 |
| Statement period (one period with its lines as columns) | USD 0.95 | USD 0.95 | USD 0.90 | USD 0.85 |
| XBRL fact (one fact as reported) | USD 0.106 | USD 0.097 | USD 0.088 | USD 0.076 |
| Segment figure (one line of one period by one product, segment or area; add-on) | USD 0.30 | USD 0.28 | USD 0.26 | USD 0.24 |
| Actor start (per run, no plan discount) | USD 0.004 | USD 0.004 | USD 0.004 | USD 0.004 |

Platinum and Diamond plans pay the Gold price. The Actor start event is a flat fee with no plan discount, charged when a run starts, whatever the run delivers. Apify charges it once for each GB of the run's memory, and at least once: at 512 MB, the default, it is charged once; a run you give 2048 MB pays it twice.

The Store pricing card shows these same prices per 1,000 events: "$0.106 / 1,000" on the Statement line row means one statement line costs USD 0.000106 (about 0.01 cents), and "$0.95 / 1,000" on the Statement period row means one period row costs USD 0.00095 (under 0.1 cents).

Worked examples at the Gold price and the default 512 MB: 5 fiscal years of every line for 2 companies (Apple and Microsoft: 413 lines) cost about USD 0.035 including the start; 50 large companies with 8 years and 8 quarters, TTM and ratios (about 42,000 lines) cost about USD 3.18; one line for every SEC filer that reported it for 2024 (about 6,300 lines) costs about USD 0.48; the same 5 years as period rows (10 rows) cost about USD 0.013.

Free: status rows, company profile rows, peer comparison rows, the summary row, any figure a filter left out, any row already delivered in the run. A company the run could not read or a miss is never charged. Only the run's start fee is charged on a run that delivers nothing.

### Input

#### Companies (default mode)

```json
{ "tickers": ["AAPL", "MSFT"], "periodType": "both", "latestPeriods": 4, "includeTtm": true, "includeRatios": true }
```

- **tickers**, **ciks**, **companyNames**: any mix, up to 500 companies a run (a run that asks very few figures per company stops earlier: see Limits).
- **layout**: `lines` (default), `periods`, `facts`.
- **periodType**: `annual` (default), `quarterly`, `both`; **includeTtm** adds the trailing twelve months.
- **latestPeriods** (default 5 per period type), or **fiscalYearFrom** / **fiscalYearTo**, or **periodEndFrom** / **periodEndTo**; **fiscalPeriods** (FY, Q1 to Q4, TTM).
- **statements**, **lines**, **concepts**, **includeRatios**: which figures.
- **valueVersion**: `latest` (default) or `first_reported`. **forms** and **includeAmendments**: which reports count. **filedFrom** / **filedTo**: figures filed in a window.
- **includeSegments** (default false): segment figures of the line rows, read from each line's filing (lines layout).
- **includeCompanyProfile** (default true), **peerComparison**, **maxRowsPerCompany**.

#### Frames

```json
{ "mode": "frames", "frameLines": ["revenue"], "calendarPeriod": "CY2024", "minValue": 1000000000, "exchanges": ["NYSE", "Nasdaq"], "maxItems": 500 }
```

#### Output and limits

**outputProfile** (`full` or `compact`), **maxItems** (charged rows, default 5,000), **maxRunSeconds**, **proxyConfiguration** (not needed: the SEC answers the run's own address).

### Limits and honest notes

- The data is what companies tagged in XBRL. A line a company never tags is empty for it (banks and insurers tag no cost of revenue; many companies tag no total liabilities). The fill rates above are measured, not promised.
- The SEC's XBRL API can lag a company's newest report, usually by days and for a few combined filers by months. The company row says whether the latest periodic report is in the API, and a free status row names each company it is not.
- Foreign private issuers (20-F, 40-F) file annual XBRL only: they have no quarters. Their figures are in their reporting currency (EUR, TWD ...), never in the one year USD convenience figures some of them add.
- Fiscal labels of a period no report labels (older comparatives) are computed from the fiscal year end and marked `fiscalLabelsFrom: computed`.
- A period whose dates the facts do not settle (two candidate dates with equal support) is never guessed: its figures are left out and a free status row names it.
- A ticker the SEC's ticker file no longer lists (a delisted company, an old CIK after a reorganisation) gets a free status row; give the company's CIK to read it.
- Quarterly EPS is never derived; TTM EPS is given only when all four quarters' own EPS figures are reported.
- Each company is read whole (its XBRL file is several MB). A run that asks very few figures per company stops when the figures it delivered no longer pay for reading the next company, with a free summary saying so; nothing is charged for what it did not read. Measured on large companies: one line of one period, about 16 of 50 companies (39 of 99); revenue alone, 29 of 40; three lines of one period, 22 of 50; every line for 5 years (the default lines and periods), 50 of 50, about 9,100 rows, so raise maxItems above its default 5,000 for a run that large. Ask more lines or periods per company, or fewer companies per run.
- Requests to the SEC stay at 4 per second with a declared User-Agent, under the SEC's fair access rule of 10.

### What this Actor does NOT do

Data the SEC does not publish:

- No market prices: no quotes, no price history, no market cap and no price based ratios such as P/E. Every ratio here is computed from reported figures only.
- No options, news, analyst estimates or price targets, and no ESG scores.
- No ISIN lookup: the SEC's ticker file carries the CIK, name, ticker and exchange only. Give a ticker, a CIK or a company name.

Left out of this Actor by design:

- No monitor, no change alerts and no webhooks on new data: it keeps no memory between runs and reads what each input asks. A scheduled run delivers and charges the figures it reads again; `filedFrom` keeps only the figures filed on or after a date.
- No AI summaries and no investment advice: every figure is read from the filings or computed from them by fixed rules.
- No other SEC data: no filing lists or filing documents, no full text search, no Form 4 insider trades, no 13F holdings (who holds a stock) and no 8-K items. Automation Craft sells these in separate SEC listings.
- No login, no API key and no account at the SEC or anywhere else, no e-mail address in its requests and no User-Agent setting: the User-Agent names Automation Craft and its Apify page.
- No own proxy URLs: `proxyUrls` in `proxyConfiguration` stops the run with a free row.

Not served by the SEC's XBRL data:

- No quarterly figures for 20-F and 40-F filers: foreign private issuers file no quarterly XBRL (their 6-K reports carry none). Their fiscal years are delivered.
- No breakdown other than product or service, business segment and geographic area (no figures by customer, by currency or on two axes at once), and none of a line row without a figure of its own (derived quarters, TTM, ratios): segment figures come from the filings' own XBRL tags only.
- No screen of IFRS filers across companies: the SEC's frames serve US GAAP concepts only. IFRS filers are read one by one in the companies mode.
- No lookup by a company's web domain: the SEC's filer records leave the website empty. Give a ticker, a CIK or a company name.

### About the data

The figures come from the SEC's EDGAR XBRL API (data.sec.gov): the companyfacts file of each company, its submissions record and the SEC's frames, plus the SEC's ticker file. SEC data is public and free to reuse. This Actor is not affiliated with or approved by the SEC.

### API examples

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~sec-xbrl-financials-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tickers": ["AAPL", "NVDA"], "lines": ["revenue", "net_income", "free_cash_flow"], "latestPeriods": 10}'
```

```javascript
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation_craft/sec-xbrl-financials-scraper').call({ tickers: ['MSFT'], periodType: 'quarterly', includeTtm: true });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("automation_craft/sec-xbrl-financials-scraper").call(run_input={"tickers": ["JPM"], "layout": "periods", "latestPeriods": 5})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

### FAQ

#### How do I get financial statements from SEC EDGAR by ticker?

Type the tickers in **Tickers** and run. Each company's figures come from its XBRL filings at the SEC: the last 5 fiscal years of every income statement, balance sheet and cash flow line by default, one row per line and year.

#### What is XBRL financial data?

XBRL is the tagged format companies use in their 10-K and 10-Q reports to the SEC: every figure carries a concept name (such as `NetIncomeLoss`), a period and a unit. This Actor reads those tagged figures and maps them to 50 standard lines.

#### Why do XBRL tags differ between companies and years, and how is that handled?

Companies choose among several concepts for one line and change them over time. Each line here is read from a fixed list of concepts in order, and the concepts are never mixed inside one value; every row names the concept used (a derived line names the figures it was computed from) and any other concept that held a different value.

#### Can I get quarterly data and the fourth quarter?

Yes. Set **Periods** to "Fiscal quarters" or "Years and quarters". The fourth quarter and other missing quarters of income and cash flow lines are derived from the year to date figures of the same concept and marked `derived`; per share figures and share counts are never derived. 20-F and 40-F filers file no quarterly XBRL, so they have fiscal years only.

#### Can I get point in time figures, as first reported before restatements?

Yes: set **Value version** to `first_reported` (As first reported). Every statement line of a company carries both values and both filings either way, with `restated` true where they differ; a period row lists its restated lines in `restatedLines`.

#### Why does this Actor run with limited permissions?

It runs with Apify's limited permissions, the least privilege level: it reads the SEC's public API and its own input, and writes only its own run's dataset and key-value store. It reads its dataset back after a platform restart so no row is charged twice, opens no named store and touches nothing else in your account.

### Changelog

See the Changelog tab.

### More data tools by Automation Craft

- [SEC Filings Scraper: 10-K, 8-K, Full-Text Search](https://apify.com/automation_craft/sec-filings-scraper)
- [SEC Form 4 Insider Trading Scraper: Buys & Sells](https://apify.com/automation_craft/sec-form-4-insider-trading-scraper)
- [SEC Form D Scraper: Offerings & Funding Leads](https://apify.com/automation_craft/sec-form-d-scraper)
- [Yahoo Finance Scraper: Quotes, History, Financials](https://apify.com/automation_craft/yahoo-finance-scraper)
- [Google Trends API & Scraper: Trending Searches](https://apify.com/automation_craft/google-trends-scraper)
- [LinkedIn Company Employees Scraper - No Login](https://apify.com/automation_craft/linkedin-company-employees-scraper)
- [Meta Ads Library Scraper - Meta Ad Library API](https://apify.com/automation_craft/meta-ads-library-scraper)

# Changelog

This Actor's version history is a separate document: https://apify.com/automation_craft/sec-xbrl-financials-scraper/changelog.md

# Actor input Schema

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

Stock ticker symbols of SEC filers, for example AAPL, MSFT or BRK-B (a class share with a dash, a dot or a slash). Each is matched to its CIK through the SEC's own ticker file; a ticker it does not list gets a free status row.

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

SEC CIK numbers (up to 10 digits, leading zeros optional) or EDGAR company links. Use a CIK for a company the ticker file no longer lists (a delisted company, an old CIK after a reorganisation).

## `companyNames` (type: `array`):

Company names as the SEC's ticker file lists them, for example "Apple Inc." or "Alphabet". The exact name is looked up first, else every company whose name holds every word given (whole words, any order, case and punctuation aside). A name that matches several companies is never guessed: a free status row lists up to 10 candidates with their tickers and CIKs.

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

companies (default when left out): statements of the companies named above. frames: one line or concept for every SEC filer in a calendar period, narrowed by the companies named above when you give any.

## `layout` (type: `string`):

lines (default): one row per company, line and period, with the concept, filing and first reported value of each figure (charged as a Statement line). periods: one row per company and period with every line as a column (charged as a Statement period). facts: every XBRL fact as the company reported it, all concepts (charged as an XBRL fact).

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

annual (default): fiscal years from 10-K, 20-F and 40-F reports. quarterly: fiscal quarters from 10-Q reports, the fourth quarter and missing quarters of income and cash flow lines derived from the year to date figures (marked derived). both: years and quarters.

## `includeTtm` (type: `boolean`):

Add one trailing twelve months period per company: income and cash flow lines summed over the last four quarters (all four read from one concept), balance sheet lines at the latest quarter, EPS summed only when all four quarters are the company's own reported quarterly EPS, share counts not summed. Default false.

## `latestPeriods` (type: `integer`):

The number of most recent periods per company and period type (default 5 when no fiscal year or period end range is given). For example 10 with annual periods gives ten fiscal years.

## `fiscalYearFrom` (type: `integer`):

Only periods of this fiscal year or later, as the company labels its fiscal years (Apple's fiscal 2025 ended in September 2025).

## `fiscalYearTo` (type: `integer`):

Only periods of this fiscal year or earlier.

## `fiscalPeriods` (type: `array`):

Only these fiscal periods, for example Q4 alone, or FY and TTM. Empty: every period of the period type chosen.

## `periodEndFrom` (type: `string`):

Only periods that end on or after this date (YYYY-MM-DD). In the facts layout: facts whose period ends on or after it.

## `periodEndTo` (type: `string`):

Only periods that end on or before this date (YYYY-MM-DD).

## `periodRowsBy` (type: `string`):

period (default): one row per company and period with every line. statement: one row per company, statement and period (an income statement row, a balance sheet row, a cash flow row), each charged as a Statement period.

## `statements` (type: `array`):

Which statements to deliver, every line of each: income, balance (balance sheet), cashflow, bank (interest income, net interest income, credit loss provision, deposits, loans) and ratios. Empty: income, balance, cashflow and bank. Give statements or lines, not both.

## `lines` (type: `array`):

Only these lines and ratios (instead of whole statements; give lines or statements, not both). Each line is read from a list of XBRL concepts in a fixed order, and every row names the concept it came from (a derived line: how it was computed).

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

XBRL concepts to deliver beside the standard lines (or, in the facts layout, the only concepts to deliver), for example us-gaap:ResearchAndDevelopmentExpense, ifrs-full:Revenue or a bare us-gaap name such as AdvertisingExpense.

## `includeRatios` (type: `boolean`):

Add 21 ratios computed from the same period's lines: gross, operating, net and free cash flow margins; return on equity, assets and invested capital (fiscal years and TTM); current and quick ratios; long term and total debt to equity; payout ratio; book value and cash per share; growth of revenue, net income and diluted EPS on the year before; revenue and EPS growth per year over 3 and 5 years. Each is charged as a Statement line. Default false.

## `valueVersion` (type: `string`):

latest (default): every figure as last reported (restated, split adjusted). first_reported: as first reported, before later restatements, with the filing that first reported it. Statement line rows carry both values either way; period rows list the other version of the columns that differ.

## `forms` (type: `array`):

Only figures from these report forms (their amendments included unless turned off below). Empty: 10-K, 10-KT, 20-F, 40-F, 10-Q and 10-QT.

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

Read figures from amended reports (10-K/A, 10-Q/A) as well. Default true.

## `filedFrom` (type: `string`):

Only figures filed on or after this date (YYYY-MM-DD), for example the figures of reports filed this month.

## `filedTo` (type: `string`):

Only figures filed on or before this date (YYYY-MM-DD).

## `factVersions` (type: `string`):

latest (default): one row per fact (concept, unit and period), its latest filed value. all: one row per filing that reported it (comparatives and restatements included).

## `taxonomies` (type: `array`):

Only facts of these taxonomies. Empty: all of them.

## `includeCompanyProfile` (type: `boolean`):

Add one free row per company: its SEC filer record (SIC industry, filer category, fiscal year end, state of incorporation, EIN, exchanges, former names, business address and phone), what its XBRL file holds, and whether its latest report is in the SEC's XBRL API yet. Default true.

## `peerComparison` (type: `boolean`):

Add free rows that rank the companies of the run on every line and fiscal period they share (rank, percentile, median, mean, min, max), for runs of 2 to 200 companies. Default false.

## `includeSegments` (type: `boolean`):

Add one Segment figure row per line, period and member that the company broke down by product or service, business segment or geographic area in the XBRL of the filing behind the line's figure (for example Apple's revenue by iPhone, Mac and Services, by Americas and Europe, by country). Read from each filing on the SEC's archive, charged per row; lines layout only. Default false.

## `maxRowsPerCompany` (type: `integer`):

Stop each company after this many charged rows.

## `frameLines` (type: `array`):

The lines to read (default revenue). Each line is read from its list of US GAAP concepts; a company is taken from the first concept it reported.

## `frameConcepts` (type: `array`):

XBRL concepts to read across all companies instead of lines, for example us-gaap:AdvertisingExpense or dei:EntityCommonStockSharesOutstanding.

## `frameUnit` (type: `string`):

The unit of the concepts above: USD (default), shares, USD/shares, pure.

## `calendarPeriod` (type: `string`):

CY2024 for a calendar year, CY2024Q3 for a quarter (default: the last calendar year). The SEC places each company's fiscal year in the calendar year it overlaps most. Balance sheet lines are read at the period's end.

## `minValue` (type: `number`):

Only companies whose figure is at least this value (one line or concept only), for example 1000000000 for revenue of a billion dollars or more.

## `maxValue` (type: `number`):

Only companies whose figure is at most this value (one line or concept only).

## `exchanges` (type: `array`):

Only companies listed on these exchanges (as the SEC's ticker file names them). Empty: every company, listed or not.

## `locations` (type: `array`):

Only companies the SEC places in these locations: a two letter country code (US, CA, GB, CN) or US and a state (US-CA, US-NY). Empty: everywhere.

## `excludeLocations` (type: `array`):

Leave out companies the SEC places in these locations, for example US to keep every company outside the United States, or US-CA. A company without a location is left out too.

## `sortOrder` (type: `string`):

desc (default): largest figure first. asc: smallest first. none: as the SEC lists them.

## `outputProfile` (type: `string`):

full (default): every field. compact: the figure, its period, concept, source filing and (for a derived figure) its derivation, without operand lists, alternative concepts, labels or links, for spreadsheets.

## `maxItems` (type: `integer`):

The run stops after this many charged rows (default 5000). Status, company, peer comparison and summary rows are free and not counted.

## `maxRunSeconds` (type: `integer`):

Stop reading after this many seconds; the rows read so far are delivered and the summary says what was not.

## `proxyConfiguration` (type: `object`):

Not needed: the SEC answers the run's own address, and one Apify datacenter proxy session is the single fallback when it refuses. Turn on Apify Proxy to send every request through that session.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "mode": "companies",
  "maxItems": 500
}
```

# Actor output Schema

## `items` (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"
    ],
    "mode": "companies",
    "maxItems": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/sec-xbrl-financials-scraper").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",
    ],
    "mode": "companies",
    "maxItems": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/sec-xbrl-financials-scraper").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"
  ],
  "mode": "companies",
  "maxItems": 500
}' |
apify call automation_craft/sec-xbrl-financials-scraper --silent --output-dataset

```

## MCP server setup

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

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/vzdAkMBHmna5aKuHe/builds/taIHYkaxvWGd4nFIQ/openapi.json
