# Yahoo Finance Scraper — Stocks, Financials, OHLCV & Analysts (`foxlabs/yahoo-finance-scraper`) Actor

Scrape Yahoo Finance global stock & ETF fundamentals, valuation multiples, income statement, balance sheet, cash flow, analyst price targets, upgrades/downgrades, earnings calendar, news, and historical OHLCV bars by ticker or search query. No API key required.

- **URL**: https://apify.com/foxlabs/yahoo-finance-scraper.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Categories:** Business, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 yahoo finance ticker records

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

<p align="center">
  <img src="https://img.shields.io/badge/Pay--Per--Event-Tickers_%2B_OHLCV_Bars-00C853?style=for-the-badge" alt="Pay-Per-Event" />&nbsp;
  <img src="https://img.shields.io/badge/100_Market_Columns-3_Statements_%C2%B7_Analysts_%C2%B7_Multiples-651FFF?style=for-the-badge" alt="100 Market Columns" />&nbsp;
  <img src="https://img.shields.io/badge/AI_Agent_Ready-MCP_%26_x402-7C4DFF?style=for-the-badge" alt="MCP &amp; x402 Ready" />&nbsp;
  <img src="https://img.shields.io/badge/Dual_Runtime-Batch_%2B_Standby_API-FF6D00?style=for-the-badge" alt="Batch + Standby API" />
</p>

## Yahoo Finance Scraper — Stocks, Financials, OHLCV & Analyst Data 📈

**foXLabs Financial, Macro & Market Data Series:** [Crunchbase Company Intelligence](https://apify.com/foxlabs/crunchbase-company-intelligence) · [SEC EDGAR Financials](https://apify.com/foxlabs/sec-edgar-financials) · [SEC Form D Offerings](https://apify.com/foxlabs/sec-form-d-offerings) · [Polymarket Prediction Markets](https://apify.com/foxlabs/polymarket-prediction-markets) · [Kalshi Prediction Markets](https://apify.com/foxlabs/kalshi-prediction-markets)

Extract institutional-grade **global stock, ETF, index, forex, and cryptocurrency data** from Yahoo Finance — including **live & extended-hours quotes**, **valuation multiples (`P/E`, `Forward P/E`, `PEG`, `EV/EBITDA`, `P/B`)**, **annual Income Statement, Balance Sheet & Cash Flow histories**, **Wall Street analyst price targets & bank upgrades/downgrades**, **executive compensation (`companyOfficers`)**, **earnings calendar**, **related financial news**, and **historical OHLCV + dividend/split bars** — with **zero API keys and automatic Yahoo session/crumb rotation** out of the box.

***

### 🤖 Use with AI Agents (MCP, Claude, Cursor & x402)

- **Actor Slug:** `foxlabs/yahoo-finance-scraper`
- **Hosted MCP URL:** `https://mcp.apify.com?tools=foxlabs/yahoo-finance-scraper`
- **Local MCP Config (`Claude Desktop`, `Cursor`, `Windsurf`):**

```json
{
  "mcpServers": {
    "yahoo-finance-scraper": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "foxlabs/yahoo-finance-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

- **Autonomous x402 & Pay-Per-Event Ready:** `$0.002` per `ticker` (all **95+ fundamental, valuation, statement, officer, analyst & news fields** included!), `$0.0002` per optional `price-bar` candle when `includeHistoricalPrices: true`, and `$0.00` for diagnostic `status` rows.
- **Copy-paste Agent Prompt:**

```text
Use `foxlabs/yahoo-finance-scraper` to fetch live stock valuations, 3 financial statements, Wall Street price targets, and historical OHLCV bars.
Start with: {"tickers":["NVDA","AAPL","MSFT"],"includeFinancialStatements":true,"includeNews":true}
```

***

### 🔍 Why Financial Teams & AI Agents Pick This Yahoo Finance Scraper

1. **Automatic Crumb & Cookie Session Management:** Most open-source `yfinance` scripts and HTML scrapers break constantly with `401 Invalid Crumb` or `429 Too Many Requests`. Our engine automatically negotiates pinned cookie + crumb sessions and rotates exits seamlessly on `256 MB` RAM.
2. **100 Structured Columns per Ticker (`$0.002`):** Combines **12 Yahoo Finance `quoteSummary` modules** (`price`, `summaryDetail`, `financialData`, `defaultKeyStatistics`, `assetProfile`, `calendarEvents`, `earningsTrend`, `recommendationTrend`, `upgradeDowngradeHistory`, `incomeStatementHistory`, `balanceSheetHistory`, `cashflowStatementHistory`) plus ticker news into one clean, flat-first JSON record.
3. **Global Multi-Asset Coverage:** Supports US equities (`NVDA`, `BRK-B`), European & Asian exchanges (`ASML.AS`, `SAP.DE`, `MC.PA`, `7203.T`, `0700.HK`, `RELIANCE.NS`, `THYAO.IS`), ETFs (`SPY`, `QQQ`), indices (`^GSPC`, `^VIX`), forex (`EURUSD=X`), commodities (`GC=F`, `CL=F`), and crypto (`BTC-USD`, `ETH-USD`).
4. **Keyword-to-Ticker Discovery (`searchQueries`):** Don't know the exact exchange ticker? Pass company names or themes (`searchQueries: ["Taiwan Semiconductor", "Novo Nordisk"]`) to resolve official Yahoo symbols automatically.
5. **Strict Quantitative Null-Safety:** Yahoo's nested `{ raw, fmt }` wrappers and empty `{}` placeholders are normalized into clean IEEE numbers or `null` — never turning a missing `dividendYield` or negative-earnings `trailingPE` into a misleading `0`.

***

### 📊 Extracted Data Fields

#### `rowType: "ticker"` (100 Columns)

| Category | Extracted Fields |
|---|---|
| **Identity & Market State** | `symbol`, `shortName`, `longName`, `quoteType` (`EQUITY`, `ETF`, `CRYPTOCURRENCY`, `INDEX`), `exchange`, `exchangeName`, `currency`, `marketState` |
| **Live & Extended Quotes** | `regularMarketPrice`, `regularMarketChange`, `regularMarketChangePercent`, `regularMarketOpen`, `regularMarketDayHigh`, `regularMarketDayLow`, `previousClose`, `preMarketPrice`, `preMarketChangePercent`, `postMarketPrice`, `postMarketChangePercent`, `regularMarketVolume`, `averageDailyVolume10Day`, `averageDailyVolume3Month` |
| **Valuation Multiples** | `marketCap`, `enterpriseValue`, `trailingPE`, `forwardPE`, `pegRatio`, `priceToSalesTrailing12Months`, `priceToBook`, `enterpriseToRevenue`, `enterpriseToEbitda`, `beta`, `fiftyTwoWeekHigh`, `fiftyTwoWeekLow`, `fiftyDayAverage`, `twoHundredDayAverage` |
| **Share Float, Short & Dividends** | `sharesOutstanding`, `floatShares`, `heldPercentInsiders`, `heldPercentInstitutions`, `shortRatio`, `shortPercentOfFloat`, `dividendRate`, `dividendYield`, `exDividendDate`, `payoutRatio` |
| **Profitability & Balance Sheet KPIs** | `totalRevenue`, `revenuePerShare`, `revenueGrowth`, `grossProfits`, `ebitda`, `freeCashflow`, `operatingCashflow`, `earningsGrowth`, `trailingEps`, `forwardEps`, `grossMargins`, `ebitdaMargins`, `operatingMargins`, `profitMargins`, `returnOnAssets`, `returnOnEquity`, `totalCash`, `totalCashPerShare`, `totalDebt`, `debtToEquity`, `currentRatio`, `quickRatio` |
| **Analyst Targets & Bank Ratings** | `recommendationKey` (`strong_buy`, `buy`, `hold`), `recommendationMean`, `numberOfAnalystOpinions`, `targetMeanPrice`, `targetMedianPrice`, `targetHighPrice`, `targetLowPrice`, `analystRatingsBreakdown` (`strongBuy`, `buy`, `hold`, `sell`, `strongSell`), `recentUpgradesDowngrades[]` (`firm`, `action`, `fromGrade`, `toGrade`, `currentPriceTarget`), `nextEarningsDate`, `currentQuarterEpsEstimate`, `currentQuarterRevenueEstimate` |
| **Company Profile & Governance** | `sector`, `industry`, `fullTimeEmployees`, `websiteUrl`, `phone`, `headquartersAddress`, `city`, `state`, `country`, `businessSummary`, `overallGovernanceRisk`, `companyOfficers[]` (`name`, `title`, `age`, `totalPay`) |
| **Financial Statements & News** | `incomeStatementsAnnual[]`, `balanceSheetsAnnual[]`, `cashflowStatementsAnnual[]`, `latestNews[]` (`title`, `publisher`, `link`, `publishedAt`, `relatedTickers`) |

#### `rowType: "price-bar"` (17 Columns — emitted when `includeHistoricalPrices: true`)

`symbol`, `interval`, `date`, `timestampIso`, `currency`, `open`, `high`, `low`, `close`, `adjClose`, `volume`, `dividendAmount`, `splitRatio`, `url`, `scrapedAt`.

***

### 💰 Transparent Pay-Per-Event Pricing

| Event Name | Price | Trigger |
|---|---|---|
| **`ticker`** *(Primary)* | **$0.0020 / ticker** (`$2.00 / 1,000`) | One unique Yahoo Finance symbol with all 100 quote, valuation, statement, officer, analyst, and news fields. |
| **`price-bar`** *(Optional)* | **$0.0002 / bar** (`$0.20 / 1,000`) | One historical OHLCV candle row — **only** emitted when `includeHistoricalPrices: true` is enabled. |
| **Diagnostic Status Rows** | **FREE (`$0.00`)** | `rowType: "status"` (`empty_input`, `invalid_ticker_or_url`, `ticker_not_found`, `no_search_results`) are never billed. |

#### Cost Examples

- **S\&P 500 full fundamental & analyst snapshot (`500` tickers, `includeHistoricalPrices: false`):** `500 × $0.002` = **$1.00 total**.
- **10 stocks + 1 year (`252` daily OHLCV bars each):** `(10 × $0.002) + (2,520 × $0.0002)` = **$0.524 total**.

***

### 🛠️ Input Parameters Reference

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tickers` | `string[]` | `["NVDA", "AAPL", "MSFT"]` | Global Yahoo Finance ticker symbols (`NVDA`, `SAP.DE`, `7203.T`, `BTC-USD`). |
| `searchQueries` | `string[]` | `[]` | Company names or keywords resolved to tickers via Yahoo Search. |
| `urls` | `string[]` | `[]` | Direct `https://finance.yahoo.com/quote/<SYMBOL>/` URLs. |
| `maxTickersPerSearch` | `integer` | `5` | Max symbols discovered per `searchQueries` entry (`1`–`25`). |
| `includeFinancialStatements` | `boolean` | `true` | Embed annual Income Statement, Balance Sheet & Cash Flow arrays (`$0` extra charge). |
| `includeNews` | `boolean` | `true` | Embed latest ticker headlines (`$0` extra charge). |
| `includeHistoricalPrices` | `boolean` | `false` | Emit standalone `price-bar` OHLCV + dividend/split rows. |
| `historyRange` | `string` | `"1mo"` | `"5d"`, `"1mo"`, `"3mo"`, `"6mo"`, `"ytd"`, `"1y"`, `"2y"`, `"5y"`, `"10y"`, `"max"`. |
| `historyInterval` | `string` | `"1d"` | `"1d"`, `"1wk"`, `"1mo"`, `"1h"`. |
| `maxPriceBarsPerTicker` | `integer` | `252` | Cap on `price-bar` rows emitted per ticker (`1`–`5000`). |
| `maxTotalTickers` | `integer` | `200` | Global run cap on `ticker` rows (`1`–`50000`). |
| `proxyConfiguration` | `object` | `{"useApifyProxy": true}` | Standard Apify Proxy configuration. |

***

### 📥 Input Examples

#### 1. Semiconductor Sector Valuation & Analyst Consensus Comp Sheet

```json
{
  "tickers": ["NVDA", "AMD", "AVGO", "TSM", "ASML", "INTC", "QCOM"],
  "includeFinancialStatements": true,
  "includeNews": true,
  "includeHistoricalPrices": false
}
```

#### 2. Fundamental Snapshot + 1-Year Daily OHLCV Backtest Series

```json
{
  "tickers": ["AAPL", "MSFT", "SPY"],
  "includeHistoricalPrices": true,
  "historyRange": "1y",
  "historyInterval": "1d",
  "maxPriceBarsPerTicker": 252
}
```

***

### 📤 Sample Output Record (`ticker`)

```json
{
  "rowType": "ticker",
  "rowKey": "yf:ticker:NVDA",
  "symbol": "NVDA",
  "shortName": "NVIDIA Corporation",
  "quoteType": "EQUITY",
  "exchange": "NMS",
  "currency": "USD",
  "regularMarketPrice": 162.85,
  "regularMarketChangePercent": -0.0201,
  "postMarketPrice": 161.01,
  "marketCap": 3932339044352,
  "enterpriseValue": 3901076013056,
  "trailingPE": 20.59,
  "forwardPE": 10.27,
  "pegRatio": 0.2,
  "priceToBook": 17.17,
  "enterpriseToEbitda": 19.38,
  "beta": 2.247,
  "fiftyTwoWeekHigh": 243.37,
  "fiftyTwoWeekLow": 148.8,
  "recommendationKey": "strong_buy",
  "sector": "Technology",
  "industry": "Semiconductors",
  "url": "https://finance.yahoo.com/quote/NVDA/",
  "scrapedAt": "2026-11-15T00:42:00.000Z"
}
```

***

### 💻 Code Integration Examples

#### Python (`apify-client` v3+)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("foxlabs/yahoo-finance-scraper").call(run_input={"tickers": ["NVDA", "AAPL", "MSFT"], "includeFinancialStatements": True})

for item in client.dataset(run.default_dataset_id).iterate_items():
    if item.get("rowType") == "ticker":
        print(item["symbol"], item["regularMarketPrice"], item["forwardPE"], item["targetMeanPrice"])
```

#### Node.js / TypeScript (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('foxlabs/yahoo-finance-scraper').call({"tickers":["NVDA","AAPL","MSFT"],"includeFinancialStatements":true});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Real-Time Standby HTTP (`curl`)

```bash
curl -X POST "https://foxlabs--yahoo-finance-scraper.apify.actor/scrape?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"tickers":["NVDA","BTC-USD"],"includeFinancialStatements":false}'
```

***

### 🔗 Composable Financial Intelligence Stack

Pair `foxlabs/yahoo-finance-scraper` with:

- **`foxlabs/sec-edgar-financials`** — Standardized 10-K, 10-Q, XBRL fundamentals, and SEC filing metadata directly from EDGAR.
- **`foxlabs/sec-form-d-offerings`** — Private placement fundraising rounds, investor counts, and offering sizes filed with the SEC.
- **`foxlabs/polymarket-prediction-markets`** — Real-money market-implied probabilities for macro indicators, rate decisions, and corporate events.

***

### ❓ Frequently Asked Questions

#### Why do DIY Yahoo Finance scripts fail with `401 Invalid Crumb`?

Yahoo Finance requires a matched `A3` consent cookie and cryptographic `crumb` token bound to the same egress IP session before serving `v10/quoteSummary` fundamentals. Our actor negotiates, caches, and rotates these session pairs automatically behind the scenes.

#### Does this actor support non-US stock exchanges?

Yes. Pass standard Yahoo exchange suffixes — such as `.L` (London), `.DE` (XETRA), `.PA` (Euronext Paris), `.AS` (Amsterdam), `.SW` (SIX Swiss), `.TO` (Toronto), `.AX` (ASX), `.T` (Tokyo), `.HK` (Hong Kong), `.NS` (NSE India), `.SA` (B3 Brazil), or `.IS` (Borsa Istanbul).

#### Can I scrape ETFs, Mutual Funds, Indices, Forex, and Crypto?

Yes! All asset classes on Yahoo Finance work seamlessly (`SPY`, `VTI`, `^GSPC`, `^NDX`, `EURUSD=X`, `GC=F`, `BTC-USD`). Equity-only fields (such as `companyOfficers` or `incomeStatementsAnnual`) cleanly return `null` on non-equity instruments instead of failing.

#### Are Income Statement, Balance Sheet, and Cash Flow included in the `$0.002` `ticker` price?

Yes. Enabling `includeFinancialStatements: true` (the default) and `includeNews: true` embeds all three annual financial statement histories and latest headlines directly inside the `ticker` object at **$0.00** extra fee.

#### How is `adjClose` different from `close` in `price-bar` rows?

`close` is the raw unadjusted closing trade price on that historical date, whereas `adjClose` retroactively adjusts for stock splits and cash dividends — essential for accurate total-return backtesting. Dividend payouts (`dividendAmount`) and split ratios (`splitRatio`) are also attached directly to the corresponding date bar.

#### What if I pass a delisted or misspelled ticker symbol?

Invalid or delisted symbols never crash your batch run and never incur an event charge; they emit a free `rowType: "status"` (`status: "ticker_not_found"`) row so your pipeline knows exactly which symbol was skipped.

#### How are pre-market and after-hours prices handled?

`preMarketPrice`, `preMarketChangePercent`, `postMarketPrice`, and `postMarketChangePercent` are populated automatically whenever extended-hours trading data is active on the exchange (`marketState: "PRE"`, `"POST"`, or `"CLOSED"`), and `null` during regular session hours if not applicable.

#### Can AI portfolio agents query this actor in real time?

Yes — use Apify Standby HTTP (`POST /scrape`) or connect directly via the hosted Apify MCP endpoint (`https://mcp.apify.com?tools=foxlabs/yahoo-finance-scraper`) for low-latency live market lookups.

#### How much RAM should I configure?

Leave memory at **256 MB**. Because all data is retrieved as compact JSON over pooled `undici` connections without headless browsers, 100 tickers complete in seconds using ~60 MB of RAM.

***

### 📋 Changelog

#### `0.1.0` (2026-11-15)

- Initial release of `foxlabs/yahoo-finance-scraper` with automatic cookie/crumb session management, 100-column `quoteSummary` extraction (quotes, multiples, 3 financial statements, analyst targets, bank upgrades/downgrades, officers, news), keyword-to-ticker search, historical OHLCV + dividend/split bars, and Batch + Standby HTTP support.

# Changelog

This Actor's version history is a separate document: https://apify.com/foxlabs/yahoo-finance-scraper/changelog.md

# Actor input Schema

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

Yahoo Finance ticker symbols across global exchanges (e.g., \['NVDA', 'AAPL', 'MSFT', 'ASML', 'SAP.DE', '7203.T', 'BTC-USD', 'SPY']).

## `searchQueries` (type: `array`):

Optional company names, sectors, or ISINs (e.g., \['Taiwan Semiconductor', 'Novo Nordisk']) resolved automatically via Yahoo Finance Search.

## `urls` (type: `array`):

Direct Yahoo Finance quote URLs (e.g., https://finance.yahoo.com/quote/NVDA/).

## `maxTickersPerSearch` (type: `integer`):

Maximum matching ticker symbols to resolve for each entry in Search Queries.

## `includeFinancialStatements` (type: `boolean`):

Embeds annual & quarterly Income Statement, Balance Sheet, and Cash Flow Statement histories inside each 'ticker' record at no extra event charge.

## `includeNews` (type: `boolean`):

Embeds the latest related financial news headlines, publishers, and timestamps inside each 'ticker' record at no extra event charge.

## `includeHistoricalPrices` (type: `boolean`):

When enabled, fetches historical OHLCV candles + dividend/split events for each ticker and emits structured 'price-bar' dataset rows.

## `historyRange` (type: `string`):

Time window when Emit Historical OHLCV Price Bars is enabled.

## `historyInterval` (type: `string`):

Candle interval when Emit Historical OHLCV Price Bars is enabled.

## `maxPriceBarsPerTicker` (type: `integer`):

Maximum 'price-bar' rows emitted per ticker when Emit Historical OHLCV Price Bars is enabled.

## `maxTotalTickers` (type: `integer`):

Hard ceiling on total 'ticker' records emitted across the entire run.

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

Apify Proxy configuration. Works out of the box with standard Apify Proxy.

## Actor input object example

```json
{
  "tickers": [
    "NVDA",
    "AAPL",
    "MSFT"
  ],
  "maxTickersPerSearch": 5,
  "includeFinancialStatements": true,
  "includeNews": true,
  "includeHistoricalPrices": false,
  "historyRange": "1mo",
  "historyInterval": "1d",
  "maxPriceBarsPerTicker": 252,
  "maxTotalTickers": 200,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `sourceReport` (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": [
        "NVDA",
        "AAPL",
        "MSFT"
    ],
    "maxTickersPerSearch": 5,
    "maxPriceBarsPerTicker": 252,
    "maxTotalTickers": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/yahoo-finance-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": [
        "NVDA",
        "AAPL",
        "MSFT",
    ],
    "maxTickersPerSearch": 5,
    "maxPriceBarsPerTicker": 252,
    "maxTotalTickers": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/yahoo-finance-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": [
    "NVDA",
    "AAPL",
    "MSFT"
  ],
  "maxTickersPerSearch": 5,
  "maxPriceBarsPerTicker": 252,
  "maxTotalTickers": 200
}' |
apify call foxlabs/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,foxlabs/yahoo-finance-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/JKnvk35dLiEclhKve/builds/9crMuEiBghEai55Lu/openapi.json
