# US Company Financial Statements API: Revenue, Profit, Cash Flow (`scrapme/us-company-financials`) Actor

Revenue, profit, margins, cash flow and balance sheet of US-listed companies from the SEC's open XBRL data, by ticker, CIK or name, annual or quarterly. Or rank all companies by one metric. No login or API key.

- **URL**: https://apify.com/scrapme/us-company-financials.md
- **Developed by:** [MDBBusiness](https://apify.com/scrapme) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 rows

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

US Company Financial Statements API: Revenue, Profit, Cash Flow

Get clean annual and quarterly financial statements for US-listed companies (and foreign companies that file with the SEC, such as Novo Nordisk) as one table: revenue, profit, EPS, cash flow, balance sheet and margins. A second mode ranks **all** reporting companies by one metric, for example the 100 largest revenues in 2024.

The data comes from the **XBRL data APIs of the U.S. Securities and Exchange Commission (SEC)** (`data.sec.gov`, part of the SEC's EDGAR system). These are public-domain government data, published by the SEC for programmatic use without an API key or login. This Actor only reads those APIs. No browser, no proxies, no login.

### What you can do with it

- Build a fundamentals table for a list of tickers: revenue, net income, EPS, free cash flow, ROE, growth
- Screen the market: "all companies with revenue above 10 billion USD in 2024, largest first"
- Feed an AI agent, spreadsheet or dashboard with reported company financials
- Compare US companies and foreign filers (IFRS, amounts in DKK, EUR, SEK ...) in one run
- Track quarterly results (Q1-Q4) for earnings analysis

### Input

#### Mode `companies` (default)

| Field | Description |
|---|---|
| `companies` | Tickers (`AAPL`), CIK numbers (`320193`) or company names (`novo nordisk`). A name must match exactly one company; otherwise the Actor tells you which companies match and you use the ticker instead. Up to 100 per run |
| `periodType` | `annual` (default) or `quarterly` |
| `fromYear` | Only periods ending in this year or later |
| `maxPeriodsPerCompany` | Newest periods first. Default 5 (annual) or 8 (quarterly) |
| `contactEmail` | Optional. The SEC asks automated clients to identify themselves. If you fill it in, the address is sent to the SEC in the request header, as the SEC recommends |

```json
{
    "mode": "companies",
    "companies": ["AAPL", "MSFT", "NVO"],
    "periodType": "annual",
    "maxPeriodsPerCompany": 5
}
```

#### Mode `screen`

| Field | Description |
|---|---|
| `metric` | `revenue`, `netIncome`, `operatingIncome`, `grossProfit`, `totalAssets`, `totalEquity`, `cash`, `operatingCashFlow` and more (see the input form) |
| `year`, `quarter` | Calendar year, and `0` for the whole year or `1`-`4` for one quarter. Balance sheet metrics give the balance at the end of the period |
| `maxCompanies` | How many ranked companies to return (default 100) |
| `sortOrder` | `desc` (default) or `asc` |
| `minValue` | Only companies at or above this value in US dollars |

```json
{
    "mode": "screen",
    "metric": "revenue",
    "year": 2024,
    "maxCompanies": 50,
    "minValue": 10000000000
}
```

### Output

#### Mode `companies`: one row per company and period

| Field | Description |
|---|---|
| `ticker`, `cik`, `companyName` | Company |
| `periodType`, `fiscalYear`, `fiscalPeriod`, `periodEnd` | Period (`FY`, `Q1`-`Q4`) and its last day |
| `currency`, `taxonomy` | Reporting currency and accounting standard (`us-gaap` or `ifrs-full`) |
| `form`, `filedDate`, `accession`, `filingUrl` | The SEC filing the numbers come from |
| `revenue`, `costOfRevenue`, `grossProfit`, `researchAndDevelopment`, `sellingGeneralAdmin`, `operatingIncome`, `netIncome` | Income statement |
| `epsBasic`, `epsDiluted`, `dilutedShares` | Per share data |
| `operatingCashFlow`, `investingCashFlow`, `financingCashFlow`, `capitalExpenditure`, `depreciationAmortization`, `dividendsPaid` | Cash flow |
| `totalAssets`, `totalLiabilities`, `totalEquity`, `cash`, `currentAssets`, `currentLiabilities`, `longTermDebt` | Balance sheet at period end |
| `freeCashFlow`, `grossMarginPct`, `operatingMarginPct`, `netMarginPct`, `currentRatio`, `returnOnEquityPct`, `revenueGrowthPct`, `netIncomeGrowthPct` | Calculated by the Actor |
| `hasDerivedValues` | True if some amounts were calculated as differences (see below) |
| `source` | Attribution text |

Amounts are in the reporting currency (`currency`), in whole units (not thousands or millions).

#### Mode `screen`: one row per ranked company

`rank`, `ticker`, `cik`, `companyName`, `metric`, `value` (US dollars), `frame`, `periodStart`, `periodEnd`, `accession`, `concept`, `companyLocation`, `source`.

A run also stores `RUN_SUMMARY` in the key-value store (rows saved, skipped inputs and why, why it stopped).

### Good to know

- **Source.** U.S. Securities and Exchange Commission, EDGAR XBRL data, public domain. The figures are what the companies reported in their filings; the Actor does not give investment advice, and you should check important numbers against the filing (`filingUrl`).
- **Sanity check in ranking mode.** The SEC's raw data sometimes contains unit errors made by the companies themselves. The ranking therefore removes values that are implausibly large compared with the company's total assets (for example a net income of more than 2 x total assets). The number of removed values is written to the run summary (`implausibleValuesRemoved`). Always open the filing (`accession`) before you rely on a number.
- **As reported.** Each period uses the values from the filing for that period. If a figure is missing there, the newest filing that reports the same period is used. Later restatements of older years are therefore not always reflected.
- **Quarters.** Q1-Q3 come from the 10-Q reports. Cash flow figures in 10-Q reports are cumulative for the year, so the Actor subtracts the previous cumulative figure. Q4 is the full year minus the first nine months. These rows have `hasDerivedValues = true`. Per-share figures and share counts are not derived, so they are empty for Q4.
- **Foreign companies.** Companies that file annual reports on form 20-F or 40-F (for example Novo Nordisk) have annual rows only. Quarterly mode returns no rows for them.
- **Empty fields.** Companies tag their reports differently. If a company does not report a figure, or uses a tag the Actor does not know, the field is `null`. The Actor never guesses a number.
- **Screen mode.** Uses US GAAP data in US dollars from US-listed companies. The SEC assigns each report to the calendar period it fits best (within about 30 days), so a fiscal year ending in January 2025 is counted as 2024. A company may be missing if it reports under a different tag than the common ones.
- **Tickers.** Tickers come from the SEC's current ticker list. For delisted companies, use the CIK number.
- **Polite access.** One request per second, `robots.txt` is honoured, the Actor identifies itself in the User-Agent as the SEC asks, and it stops with a clear message if the SEC refuses or slows down (it does not retry with tricks). A run with 30 companies takes about half a minute.
- **Cost.** You pay for every row returned. Set `maxPeriodsPerCompany`, `maxCompanies` or "Maximum cost per run" to control the cost. If the cost limit is reached, the Actor stops and says so. Rows are only charged when they are saved.
- **Data not included.** No filing text, no insider or person data, no stock prices.
- **Not affiliated.** This Actor is an independent tool. It is not affiliated with, endorsed or approved by the U.S. Securities and Exchange Commission. SEC and EDGAR are registered trademarks of the SEC.

# Actor input Schema

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

Companies = financial statements over time for the companies you list. Screen = rank all companies that report one metric for one period (for example the 100 largest revenues in 2024).

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

Tickers (AAPL), CIK numbers (320193) or company names (novo nordisk). A name must match exactly one company, otherwise use the ticker. Up to 100 per run.

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

Annual = one row per fiscal year (10-K, 20-F, 40-F). Quarterly = one row per quarter (10-Q); Q4 is calculated as full year minus the first nine months. Foreign companies that only file annual reports have no quarterly rows.

## `fromYear` (type: `integer`):

Only periods ending in this year or later, e.g. 2020. Leave empty for no limit.

## `maxPeriodsPerCompany` (type: `integer`):

The newest periods are returned first. Default 5 for annual and 8 for quarterly.

## `metric` (type: `string`):

The figure to rank by. Screen mode uses the US GAAP data of US-listed companies, in US dollars.

## `year` (type: `integer`):

Calendar year of the period, e.g. 2024. SEC assigns each report to the calendar period it fits best, so a fiscal year ending in January 2025 counts as 2024. Default: last year.

## `quarter` (type: `integer`):

0 = whole year (default), or 1-4 for a single calendar quarter. For balance sheet figures (assets, equity, cash) 0 means the year-end balance.

## `maxCompanies` (type: `integer`):

How many ranked companies to return.

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

Highest value first (desc) or lowest first (asc).

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

Only companies with a value at or above this number (US dollars), e.g. 1000000000 for one billion.

## `contactEmail` (type: `string`):

The SEC asks automated clients to identify themselves. If you fill this in, your address is sent to the SEC in the request header (User-Agent), as the SEC recommends. Leave empty to identify the Actor only.

## Actor input object example

```json
{
  "mode": "companies",
  "companies": [
    "AAPL",
    "MSFT",
    "NVO"
  ],
  "periodType": "annual",
  "metric": "revenue",
  "quarter": 0,
  "maxCompanies": 100,
  "sortOrder": "desc"
}
```

# 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",
        "NVO"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapme/us-company-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 = { "companies": [
        "AAPL",
        "MSFT",
        "NVO",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapme/us-company-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 '{
  "companies": [
    "AAPL",
    "MSFT",
    "NVO"
  ]
}' |
apify call scrapme/us-company-financials --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapme/us-company-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/FKtHUK9FCEsOq103i/builds/chgXbfj5CMLHu17zw/openapi.json
