# SEC EDGAR Financial Data & Company Screener (XBRL) (`groundtruth/sec-edgar-financial-data`) Actor

Screen every US public company by any financial metric, or pull one company's history. Official SEC XBRL data, every figure linked to its filing.

- **URL**: https://apify.com/groundtruth/sec-edgar-financial-data.md
- **Developed by:** [Ground Truth](https://apify.com/groundtruth) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

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

## SEC EDGAR Financial Data & Company Screener (XBRL)

**Screen every US public company by any financial metric, or pull one company's full reported history — with every figure linked back to the SEC filing it came from.**

Built on the SEC's official XBRL data at data.sec.gov. No API key, no scraping, no third-party data vendor.

***

### The thing sec.gov can't do

EDGAR serves filings **one company at a time.** There is no way on sec.gov to ask *"which public companies had revenue over $100 billion last year"* or *"rank every filer by cash on hand."*

The data exists. The SEC's `frames` API returns one metric across **all 5,849 filers in a single call** — but it comes back as raw XBRL with tags like `RevenueFromContractWithCustomerExcludingAssessedTax`, and getting the period format wrong returns an empty result that looks like "no data" rather than "you asked wrong."

This tool closes that gap.

### Two modes

#### Screen — one metric, every company

```
mode: screen
metric: revenue
period: CY2023
min_value: 100000000000
```

```json
{
  "company": "Walmart Inc.",
  "cik": 104169,
  "metric": "revenue",
  "xbrl_tag": "Revenues",
  "value": 648125000000,
  "unit": "USD",
  "period_end": "2023-12-31",
  "period_type": "annual",
  "accession": "0000104169-26-000055",
  "verify_url": "https://www.sec.gov/Archives/edgar/data/104169/..."
}
```

#### Company — one company's history

```
mode: company
company: AAPL
metric: net_income
period_type: annual
```

Returns Apple's net income for every fiscal year it has reported, deduplicated, with the form and filing date on each.

### Three traps this handles for you

Raw SEC data will mislead you in three specific ways. Each is silent — you get a plausible-looking number that's wrong.

**1. Quarterly figures mixed with year-to-date.** A 10-Q reports the quarter *and* the cumulative year-to-date figure, both with the same end date. Comparing "net income" across filings silently mixes a three-month number with a nine-month one. Every record here carries **`period_type`** and **`period_days`**, and you can filter on it.

**2. The same fact repeated with different values.** This year's 10-K restates last year's figures as comparatives, and amendments repeat earlier periods. Ask for annual net income and you get some years two or three times. This tool keeps **one record per period, from the most recent filing** — which is what the SEC treats as authoritative after a restatement.

**3. Balance-sheet metrics need a different period format.** `Assets` is measured at a point in time and needs `CY2024Q1I`; `Revenues` is measured over a period and must not have the suffix. Get it wrong and you get an empty result with no error. **Handled automatically** — ask for `assets` and `CY2024` and it does the right thing.

### Every figure is verifiable

Each record carries a `verify_url` to the exact filing. Open it, find the line item, compare.

That matters most when an AI is in the loop: when an assistant reports a company's revenue, you should be able to check it against the filing rather than trust the chain.

### Metrics

`revenue` · `net_income` · `gross_profit` · `operating_income` · `assets` · `liabilities` · `equity` · `cash` · `inventory` · `long_term_debt` · `goodwill` · `current_assets` · `current_liabilities` · `operating_cash_flow` · `capex` · `dividends_paid` · `rd_expense` · `sga_expense` · `interest_expense` · `income_tax` · `eps_basic` · `eps_diluted` · `shares_outstanding`

Any raw XBRL tag also works — `Revenues`, `NetIncomeLoss`, and so on — for callers who know the taxonomy.

Companies file the same concept under different tags, so each friendly name tries several in order until one returns data.

### Configuration

| Input | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `screen` | `screen` (all companies) or `company` (one company's history) |
| `metric` | string | `revenue` | Friendly name or raw XBRL tag |
| `company` | string | — | Required in `company` mode. Ticker or CIK |
| `period` | string | `CY2024` | `screen` mode. `CY2024` or `CY2024Q1` |
| `period_type` | string | `any` | `quarterly`, `half_year`, `nine_month`, `annual`, `instant` |
| `min_value` / `max_value` | number | — | Value bounds. Negatives are legal — losses are real |
| `order` | string | `desc` | `desc` or `asc` |
| `limit` | integer | `50` | 1–200 |

### Honest limits

- **XBRL coverage starts around 2009.** Older filings exist on EDGAR but not as structured data.
- **Only what companies actually tagged.** A company that didn't file a concept won't appear for it, and smaller filers tag less.
- **It reports; it does not compute.** No ratios, growth rates, or derived metrics — those would be our arithmetic rather than the company's filing, and you couldn't verify them against the source.
- **One metric per run.** The SEC endpoints are shaped that way.
- **Not investment advice.** It's a data-reformatting tool.

### FAQ

**Where does the data come from?**
[data.sec.gov](https://data.sec.gov), the SEC's official structured-data API. The same numbers as the filings themselves.

**Is this scraping?** No. Documented public API, no key, no login, no bot evasion. SEC requires a descriptive User-Agent on requests, which this sends.

**How current is it?** As current as EDGAR. A figure appears once the company files it.

**Why does a company show a value I don't recognise?** Check `period_type` and `xbrl_tag`. It's usually a year-to-date figure being read as a quarter, or a company using a different tag.

**Can I get a growth rate or ratio?** Not directly, by design — pull the periods you need and compute it yourself, so the arithmetic is yours and every input is verifiable.

### Source and licence

Data: [SEC EDGAR](https://www.sec.gov/edgar), US Securities and Exchange Commission. Public domain.

# Actor input Schema

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

'screen' compares one metric across every US public company for a period. 'company' returns one company's history of that metric.

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

revenue, net\_income, assets, liabilities, equity, cash, operating\_income, gross\_profit, eps\_basic, eps\_diluted, operating\_cash\_flow, capex, long\_term\_debt, inventory, goodwill, rd\_expense, shares\_outstanding, and more. A raw XBRL tag such as 'Revenues' also works.

## `company` (type: `string`):

Required in 'company' mode. A ticker like AAPL, or a CIK number.

## `period` (type: `string`):

Used in 'screen' mode. Calendar year like CY2024, or a quarter like CY2024Q1. Balance-sheet metrics are adjusted automatically.

## `period_type` (type: `string`):

Filters by reporting period length. A 10-Q reports both the quarter AND the year-to-date figure, so without this you can accidentally compare a 3-month number to a 9-month one.

## `min_value` (type: `integer`):

Only companies at or above this figure. Negative values are legal (losses).

## `max_value` (type: `integer`):

Only companies at or below this figure.

## `order` (type: `string`):

Sort direction. 'Largest first' ranks companies by value descending; in company mode it orders by most recent period first.

## `limit` (type: `integer`):

1 to 200.

## Actor input object example

```json
{
  "mode": "screen",
  "metric": "revenue",
  "company": "AAPL",
  "period": "CY2024",
  "period_type": "any",
  "order": "desc",
  "limit": 50
}
```

# Actor output Schema

## `records` (type: `string`):

No description

## `recordsCsv` (type: `string`):

No description

## `runDetails` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("groundtruth/sec-edgar-financial-data").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("groundtruth/sec-edgar-financial-data").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 '{}' |
apify call groundtruth/sec-edgar-financial-data --silent --output-dataset

```

## MCP server setup

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

```

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/lre3UpgohiWfsA6Jm/builds/G8J5yQ3Z15cDXGpiL/openapi.json
