# SEC XBRL Financials API: Revenue, Net Income, EPS by Ticker (`nightwave-owner/sec-xbrl-financials`) Actor

Returns financial statement values (revenue, net income, EPS, assets, cash flow or any us-gaap tag) from SEC XBRL data, one row per company, concept and fiscal period from 10-K and 10-Q, or one value per company across all filers. Supports onlyNew.

- **URL**: https://apify.com/nightwave-owner/sec-xbrl-financials.md
- **Developed by:** [Viktor Wiberg](https://apify.com/nightwave-owner) (community)
- **Categories:** Business, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 facts

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 XBRL Financials API: Revenue, Net Income, EPS by Ticker

Financial statement values for US listed companies, straight from the XBRL data that companies file with the U.S. Securities and Exchange Commission. Give a list of tickers or CIK numbers and a few concepts (revenue, net income, EPS, total assets, operating cash flow or any us-gaap tag) and get one clean row per company, concept and fiscal period, with the value, unit, fiscal year and quarter, period dates, the form it came from and the accession number of the filing.

A second mode, frames, turns the question around: one concept for one calendar period across every company that reported it. For example the revenue of all filers in 2024, sorted by size.

The output is in long format (one value per row), which drops straight into a spreadsheet pivot table, a database or a pandas DataFrame.

### What is covered

Every company that files XBRL financial statements with the SEC: 10-K and 10-Q from US companies since 2009 to 2011 (depending on company size), and 20-F and 40-F from foreign companies that file in XBRL. The actor reads the official APIs on data.sec.gov:

| API | Used for |
|---|---|
| `companyfacts` | Mode `companies`: every fact a company has reported, in one request per company |
| `frames` | Mode `frames`: one fact per company for a calendar period (CY2024, CY2024Q3, CY2024Q4I) |
| `company_tickers.json` | Ticker to CIK lookup, and tickers for the rows in frames mode |

#### Common concept names

Each common name maps to one or more XBRL tags. The tags are tried in order for each period, so a company that changed tag over the years (Apple moved from `SalesRevenueNet` to `RevenueFromContractWithCustomerExcludingAssessedTax` in 2018) still gets one revenue row per year. The `tag` field tells which tag was used.

| Name | Tags, in order | Unit |
|---|---|---|
| `revenue` | Revenues, RevenueFromContractWithCustomerExcludingAssessedTax, RevenueFromContractWithCustomerIncludingAssessedTax, SalesRevenueNet, SalesRevenueGoodsNet, ifrs-full:Revenue | USD |
| `costOfRevenue` | CostOfRevenue, CostOfGoodsAndServicesSold, CostOfGoodsSold | USD |
| `grossProfit` | GrossProfit, ifrs-full:GrossProfit | USD |
| `researchAndDevelopment` | ResearchAndDevelopmentExpense | USD |
| `operatingIncome` | OperatingIncomeLoss, ifrs-full:ProfitLossFromOperatingActivities | USD |
| `incomeTax` | IncomeTaxExpenseBenefit, ifrs-full:IncomeTaxExpenseContinuingOperations | USD |
| `netIncome` | NetIncomeLoss, ProfitLoss, ifrs-full:ProfitLoss | USD |
| `eps` | EarningsPerShareBasic, ifrs-full:BasicEarningsLossPerShare | USD/shares |
| `epsDiluted` | EarningsPerShareDiluted, ifrs-full:DilutedEarningsLossPerShare | USD/shares |
| `dilutedShares` | WeightedAverageNumberOfDilutedSharesOutstanding | shares |
| `dividendsPerShare` | CommonStockDividendsPerShareDeclared | USD/shares |
| `assets` | Assets, ifrs-full:Assets | USD |
| `currentAssets` | AssetsCurrent, ifrs-full:CurrentAssets | USD |
| `liabilities` | Liabilities, ifrs-full:Liabilities | USD |
| `currentLiabilities` | LiabilitiesCurrent, ifrs-full:CurrentLiabilities | USD |
| `equity` | StockholdersEquity, StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest, ifrs-full:Equity | USD |
| `cash` | CashAndCashEquivalentsAtCarryingValue, CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents, ifrs-full:CashAndCashEquivalents | USD |
| `longTermDebt` | LongTermDebtNoncurrent, LongTermDebt | USD |
| `operatingCashFlow` | NetCashProvidedByUsedInOperatingActivities, ifrs-full:CashFlowsFromUsedInOperatingActivities | USD |
| `capex` | PaymentsToAcquirePropertyPlantAndEquipment | USD |

Tags without a prefix are us-gaap. Any other tag can be given as is, for example `AccountsPayableCurrent` or `InventoryNet`, and other taxonomies with a prefix, for example `ifrs-full:Revenue` or `dei:EntityCommonStockSharesOutstanding`. A raw tag returns every unit it is reported in.

### Example from a real run

This is the input and the first rows of a run on the Apify platform on 3 October 2026 (run `iX5vf5YiFMACOu0XA`, 36 rows in total: four fiscal years for Apple, whose fiscal 2026 report is not filed yet, and five for Microsoft). Nothing is edited except that only the first rows are shown.

Input:

```json
{
  "companies": ["AAPL", "MSFT"],
  "concepts": ["revenue", "netIncome", "eps", "assets"],
  "forms": ["10-K"],
  "maxResults": 50
}
```

Output (excerpt):

```json
[
  {
    "ticker": "AAPL",
    "cik": "320193",
    "company": "Apple Inc.",
    "concept": "revenue",
    "tag": "us-gaap:RevenueFromContractWithCustomerExcludingAssessedTax",
    "label": "Revenue from Contract with Customer, Excluding Assessed Tax",
    "value": 416161000000,
    "unit": "USD",
    "fiscalYear": 2025,
    "fiscalPeriod": "FY",
    "periodStart": "2024-09-29",
    "periodEnd": "2025-09-27",
    "periodMonths": 12,
    "form": "10-K",
    "filed": "2025-10-31",
    "accessionNumber": "0000320193-25-000079",
    "frame": "CY2025",
    "source": "SEC EDGAR XBRL financial data, U.S. Securities and Exchange Commission",
    "license": "Public domain, U.S. federal government information"
  },
  {
    "ticker": "AAPL",
    "cik": "320193",
    "company": "Apple Inc.",
    "concept": "netIncome",
    "tag": "us-gaap:NetIncomeLoss",
    "label": "Net Income (Loss) Attributable to Parent",
    "value": 112010000000,
    "unit": "USD",
    "fiscalYear": 2025,
    "fiscalPeriod": "FY",
    "periodStart": "2024-09-29",
    "periodEnd": "2025-09-27",
    "periodMonths": 12,
    "form": "10-K",
    "filed": "2025-10-31",
    "accessionNumber": "0000320193-25-000079",
    "frame": "CY2025",
    "source": "SEC EDGAR XBRL financial data, U.S. Securities and Exchange Commission",
    "license": "Public domain, U.S. federal government information"
  }
]
```

Frames mode, revenue of every filer for calendar 2024 (run `xQwn4QT0fUxDKlqqO`, first of 50 rows, largest first):

```json
{
  "mode": "frames",
  "concepts": ["revenue"],
  "fiscalYearFrom": 2024,
  "fiscalYearTo": 2024,
  "maxResults": 50
}
```

```json
[
  {
    "ticker": "WMT",
    "cik": "104169",
    "company": "Walmart Inc.",
    "concept": "revenue",
    "tag": "us-gaap:Revenues",
    "label": "Revenues",
    "value": 680985000000,
    "unit": "USD",
    "fiscalYear": null,
    "fiscalPeriod": null,
    "periodStart": "2024-02-01",
    "periodEnd": "2025-01-31",
    "periodMonths": 12,
    "form": null,
    "filed": null,
    "accessionNumber": "0000104169-26-000055",
    "frame": "CY2024",
    "source": "SEC EDGAR XBRL financial data, U.S. Securities and Exchange Commission",
    "license": "Public domain, U.S. federal government information"
  }
]
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `mode` | string | `companies` | `companies` for the history of each company, `frames` for one period across all companies |
| `companies` | array | `["AAPL"]` | Tickers or CIK numbers, up to 200. In frames mode a filter; empty means every company |
| `concepts` | array | revenue, netIncome, eps, assets | Common names or XBRL tags, up to 30 |
| `forms` | array | `["10-K"]` | `10-K`, `10-Q`, `20-F`, `40-F`. Amendments are always read |
| `fiscalYearFrom` | integer | end year minus 4 | First fiscal year (calendar year in frames mode) |
| `fiscalYearTo` | integer | current year | Last fiscal year (calendar year in frames mode) |
| `includeYearToDate` | boolean | `false` | With 10-Q, also return 6 and 9 month year to date values |
| `framePeriod` | string | `annual` | Frames mode: `annual` or `quarterly` |
| `maxResults` | integer | 50 | Highest number of rows (and charged events) per run |
| `onlyNew` | boolean | `false` | Return only facts that earlier runs with the same input did not deliver |

An empty input returns revenue, net income, basic EPS and total assets for Apple for the last five fiscal years.

### Output

| Field | Example | Description |
|---|---|---|
| `ticker` | `AAPL` | Ticker from SEC's ticker list, null if the company has none |
| `cik` | `320193` | SEC Central Index Key, without leading zeros |
| `company` | `Apple Inc.` | Company name as registered with the SEC |
| `concept` | `revenue` | The concept as given in the input |
| `tag` | `us-gaap:Revenues` | The XBRL tag the value comes from |
| `label` | `Revenues` | The tag's standard label |
| `value` | `416161000000` | The reported value, in full units (not thousands or millions) |
| `unit` | `USD` | `USD`, `USD/shares`, `shares` or another unit |
| `fiscalYear` | `2025` | The company's fiscal year (null in frames mode) |
| `fiscalPeriod` | `FY` | `FY`, `Q1`, `Q2` or `Q3` (null in frames mode) |
| `periodStart` | `2024-09-29` | First day of the period, null for balance sheet values (instants) |
| `periodEnd` | `2025-09-27` | Last day of the period, or the balance sheet date |
| `periodMonths` | `12` | Length of the period in months, null for instants |
| `form` | `10-K` | The form the value was taken from, `10-K/A` for an amendment (null in frames mode) |
| `filed` | `2025-10-31` | Filing date (null in frames mode) |
| `accessionNumber` | `0000320193-25-000079` | The filing on EDGAR |
| `frame` | `CY2025` | SEC's calendar frame for the value, when SEC has assigned one |
| `source`, `license` | | Source and license, so you can credit SEC EDGAR |

### Monitoring and scheduling

Set `onlyNew` to `true` to use the actor for recurring monitoring. The actor then remembers which facts it has delivered for the same input, in a named key-value store in your Apify account (`nightwave-state-sec-xbrl-financials`, one record per input). Each run returns and charges only facts that earlier runs did not deliver. The first run returns everything in the selection. A run without news finishes successfully with 0 rows.

A fact is identified by company, tag, unit, period and accession number. A new 10-Q therefore gives new rows, and an amended report (10-K/A) that restates a value delivers the restated value again.

`onlyNew` and `maxResults` are not part of the remembered input, so you can change them without starting over. Leave `fiscalYearFrom` and `fiscalYearTo` empty in a schedule so the range moves with the calendar.

Example: a daily run at 07:00 Swedish time that returns the new quarterly figures for five large companies as soon as they file. In Apify Console, open **Schedules**, create a schedule with the cron expression `0 7 * * *` and add this actor with the input below.

```json
{
  "companies": ["AAPL", "MSFT", "NVDA", "AMZN", "GOOGL"],
  "concepts": ["revenue", "netIncome", "epsDiluted", "operatingCashFlow"],
  "forms": ["10-K", "10-Q"],
  "includeYearToDate": true,
  "onlyNew": true,
  "maxResults": 200
}
```

The same schedule through the Apify API:

```sh
curl -X POST "https://api.apify.com/v2/schedules?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"name": "daily-sec-xbrl-financials", "cronExpression": "0 7 * * *", "timezone": "Europe/Stockholm", "isEnabled": true, "isExclusive": true,
       "actions": [{"type": "RUN_ACTOR", "actorId": "nightwave-owner~sec-xbrl-financials",
                    "runInput": {"contentType": "application/json; charset=utf-8", "body": "<the input above as a JSON string>"}}]}'
```

Connect a webhook or an integration (Slack, e-mail, Google Sheets) to the actor in Apify Console if you want the new rows sent somewhere when the run finishes.

### How values are chosen

- **Each filing's own period.** A 10-K also repeats the two prior years as comparatives. The actor takes from each filing only the values for the period the filing reports on, so `fiscalYear` and `fiscalPeriod` always describe the value itself. Earlier years come from earlier filings.
- **Amendments win.** If a 10-K/A reports a value for the same period again, the later filing is returned.
- **Period length matches the form.** 10-K, 20-F and 40-F give 12 month values; 10-Q gives 3 month quarters. Balance sheet values (assets, cash, debt) are instants and have no start date. Many companies report cash flow in a 10-Q only year to date, so set `includeYearToDate` to `true` to get those (`periodMonths` 6 or 9).
- **There is no Q4 row from 10-Q.** The fourth quarter is covered by the 10-K. Q4 = FY minus Q1, Q2 and Q3 if you need it.
- **Frames are calendar periods.** SEC places each company's fiscal period in the calendar period it fits best, so Walmart's fiscal year February 2024 to January 2025 is in `CY2024`. Balance sheet frames end with `I` (`CY2024Q4I`).

### Good to know

- **SEC's rules for automated access are followed.** The actor sends at most 8 requests per second through a queue (SEC allows 10), identifies itself with the User-Agent `Nightwave AB kontakt@nightwave.se` and asks for gzip. One company is one request, so a run with 200 companies takes well under a minute.
- **Data quality is the filer's.** Values are as the companies tagged them. Small companies sometimes use unusual tags; then use the raw tag name in `concepts`.
- Requests are retried three times on network errors, rate limits (429) and server errors. A company without XBRL data (404) gives a warning and the run moves on. A response in an unexpected format stops the run with a clear message instead of storing broken rows.
- The data describes what companies have reported. It is not investment advice.

### Use cases

- Revenue, net income and EPS history for a watchlist, ready for a spreadsheet or a valuation model.
- Rank all filers by revenue, assets or R\&D spend for a year with frames mode.
- Get new quarterly figures the day they are filed with `onlyNew` on a daily schedule.
- Feed an AI agent or an LLM pipeline with exact reported numbers and links to the filing, instead of numbers parsed from text.
- Screen companies on ratios you compute yourself (margins, debt to assets, cash conversion).

### FAQ

**How often is the data updated?**
Every run reads data.sec.gov live. SEC updates the XBRL APIs throughout the day as filings are disseminated.

**What does 1 000 rows cost?**
2 USD (0.002 USD per fact, event `fact`), plus Apify platform usage, which is a fraction of a cent per run.

**Why are some years missing?**
Either the company had not filed that report yet (Apple's fiscal year ends in late September and the 10-K follows a few weeks later), or it used a tag that is not in the list for that concept. Try the raw tag.

**Can I use the data commercially?**
Yes. Data published by the SEC is U.S. federal government information in the public domain. The actor follows the SEC's fair access rules.

### Data source and license

The data comes from SEC EDGAR: `https://data.sec.gov/api/xbrl/companyfacts/CIK##########.json`, `https://data.sec.gov/api/xbrl/frames/<taxonomy>/<tag>/<unit>/<period>.json` and `https://www.sec.gov/files/company_tickers.json`, see [EDGAR Application Programming Interfaces](https://www.sec.gov/search-filings/edgar-application-programming-interfaces). No API key is needed.

SEC's terms for this data, from [Accessing EDGAR Data](https://www.sec.gov/search-filings/edgar-search-assistance/accessing-edgar-data) (read 3 October 2026): "Anyone can access and download this information for free". The conditions are fair access: "Current max request rate: 10 requests/second", "Download only what you need" and "Please declare your user agent in request headers". The actor keeps to all three. Information published by the SEC is U.S. federal government information and is not subject to copyright in the United States ([17 U.S.C. § 105](https://www.law.cornell.edu/uscode/text/17/105)). Every row carries `source` and `license` so you can credit SEC EDGAR when you publish the data.

This actor is not affiliated with or endorsed by the U.S. Securities and Exchange Commission.

### Pricing

Pay per result: 0.002 USD per row returned (event `fact`), which is 2 USD per 1 000 facts. Apify bills platform usage on top as usual. It is small: the example run above returned 36 rows and used 0.0002 USD of platform usage. `maxResults` caps how many rows a run returns, so you always know the highest possible cost.

### Contact

Built and maintained by Nightwave AB. Questions, bugs and feature requests: kontakt@nightwave.se

### På svenska

Actorn hämtar bokslutsdata för amerikanska börsbolag ur den XBRL-data som bolagen lämnar till SEC (amerikanska finansinspektionen). Ange tickers eller CIK-nummer och nyckeltal och få en rad per bolag, nyckeltal och räkenskapsperiod med värde, enhet, räkenskapsår, kvartal, periodens datum, formulär och filingens nummer.

- Läget `companies` ger varje bolags historik (SEC companyfacts). Läget `frames` ger ett nyckeltal för en kalenderperiod för alla bolag, till exempel omsättningen för samtliga bolag 2024.
- Vanliga namn: revenue, netIncome, eps, assets, operatingCashFlow med flera (se tabellen ovan). Alla us-gaap-taggar fungerar också, och andra taxonomier med prefix (ifrs-full:Revenue).
- Formulär: 10-K (helår), 10-Q (kvartal), 20-F och 40-F (utländska bolag). Ändrade rapporter (/A) läses alltid och ersätter det ursprungliga värdet.
- Varje värde hämtas ur den rapport som avser just den perioden, så räkenskapsår och kvartal stämmer. Jämförelsesiffror för tidigare år räknas inte två gånger.
- Actorn följer SEC:s regler för automatisk åtkomst: högst 8 anrop per sekund (SEC tillåter 10), User-Agent med företagsnamn och e-post och gzip-komprimering.
- Källa: SEC EDGAR, U.S. Securities and Exchange Commission. SEC skriver att vem som helst får hämta informationen gratis, och amerikansk federal myndighetsinformation är fri att använda (public domain). Datan beskriver vad bolagen har rapporterat och är ingen investeringsrådgivning.
- Med `onlyNew: true` levereras bara värden som tidigare körningar med samma input inte har levererat, vilket passar för daglig bevakning (se "Monitoring and scheduling"). Tom input ger omsättning, resultat, vinst per aktie och tillgångar för Apple de senaste fem åren.
- Pris: 0,002 USD per värde (2 USD per 1 000) plus Apifys plattformsanvändning.
- Kontakt: kontakt@nightwave.se

# Actor input Schema

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

"companies" returns the history of each company in the list (SEC companyfacts). "frames" returns one value per company for a whole calendar period across all filers (SEC frames), for example revenue of every company in 2024. Defaults to "companies".

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

Tickers (AAPL, msft, BRK.B) or CIK numbers (320193 or 0000320193), for example \["AAPL", "MSFT"]. 1 to 200 per run. Defaults to AAPL in companies mode. In frames mode the list filters the result, and an empty list returns every company.

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

Common names or XBRL tags, for example \["revenue", "netIncome", "eps"]. Common names: revenue, costOfRevenue, grossProfit, researchAndDevelopment, operatingIncome, incomeTax, netIncome, eps, epsDiluted, dilutedShares, dividendsPerShare, assets, currentAssets, liabilities, currentLiabilities, equity, cash, longTermDebt, operatingCashFlow, capex. Any other us-gaap tag works too (AccountsPayableCurrent), and other taxonomies with a prefix (ifrs-full:Revenue). Defaults to revenue, netIncome, eps and assets.

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

Reports to read values from in companies mode, for example \["10-K", "10-Q"]. 10-K gives annual values, 10-Q gives quarters, 20-F and 40-F are annual reports of foreign companies. Amendments are always read and replace the original value. Defaults to 10-K.

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

First fiscal year, for example 2020. In frames mode this is a calendar year. Defaults to four years before the end year, so the default covers five years.

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

Last fiscal year (inclusive), for example 2026. In frames mode this is a calendar year. Defaults to the current year.

## `includeYearToDate` (type: `boolean`):

Companies mode with 10-Q: also return six and nine month year to date values next to the three month quarter, for example true. Cash flow statements in a 10-Q are often reported only year to date. Defaults to false.

## `framePeriod` (type: `string`):

Frames mode only: "annual" (CY2024, or the year-end balance CY2024Q4I) or "quarterly" (CY2024Q1 to CY2024Q4). Defaults to "annual".

## `maxResults` (type: `integer`):

Maximum number of facts to return in total, for example 50. Each fact (one value for one company, concept and period) is one billable result. Defaults to 50.

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

For scheduled runs. When true, facts that an earlier run with the same input already delivered are skipped and not charged, so a daily run returns only values from new or amended reports. The first run returns everything. Defaults to false.

## Actor input object example

```json
{
  "mode": "companies",
  "companies": [
    "AAPL",
    "MSFT",
    "NVDA"
  ],
  "concepts": [
    "revenue",
    "netIncome",
    "eps"
  ],
  "forms": [
    "10-K",
    "10-Q"
  ],
  "fiscalYearFrom": 2022,
  "fiscalYearTo": 2026,
  "includeYearToDate": false,
  "framePeriod": "annual",
  "maxResults": 50,
  "onlyNew": true
}
```

# Actor output Schema

## `results` (type: `string`):

All rows produced by the run, as JSON. Open in Apify Console or download via the dataset API.

# 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 = {
    "mode": "companies",
    "companies": [
        "AAPL",
        "MSFT"
    ],
    "concepts": [
        "revenue",
        "netIncome",
        "eps",
        "assets"
    ],
    "forms": [
        "10-K"
    ],
    "maxResults": 50,
    "onlyNew": false
};

// Run the Actor and wait for it to finish
const run = await client.actor("nightwave-owner/sec-xbrl-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 = {
    "mode": "companies",
    "companies": [
        "AAPL",
        "MSFT",
    ],
    "concepts": [
        "revenue",
        "netIncome",
        "eps",
        "assets",
    ],
    "forms": ["10-K"],
    "maxResults": 50,
    "onlyNew": False,
}

# Run the Actor and wait for it to finish
run = client.actor("nightwave-owner/sec-xbrl-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 '{
  "mode": "companies",
  "companies": [
    "AAPL",
    "MSFT"
  ],
  "concepts": [
    "revenue",
    "netIncome",
    "eps",
    "assets"
  ],
  "forms": [
    "10-K"
  ],
  "maxResults": 50,
  "onlyNew": false
}' |
apify call nightwave-owner/sec-xbrl-financials --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nightwave-owner/sec-xbrl-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/2h8CKctCG1v7v0cFg/builds/jDfIOdui3UBJUc6qM/openapi.json
