# Yahoo Finance Scraper: Quotes, Financials, Options — $0.84/1k (`fortuitous_pirate/yahoo-finance-scraper`) Actor

Yahoo Finance data for any ticker list, screener or trending feed: live quotes (86 fields), profile, key stats, income/balance/cash-flow statements, earnings, analyst targets, ownership, options chains, price history, news. No login or cookies. MCP-ready for AI agents. $0.84 per 1,000 records.

- **URL**: https://apify.com/fortuitous_pirate/yahoo-finance-scraper.md
- **Developed by:** [Fortuitous Pirate](https://apify.com/fortuitous_pirate) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Features:** Limited permissions
- **Stats:** 15 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.84 / 1,000 results

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

## Yahoo Finance Scraper: Quotes, Financials, Options, News

Pull Yahoo Finance data for any list of tickers, for a Yahoo screener (most active, day gainers, undervalued growth, crypto, funds, private companies) or for the trending feed, and choose exactly which data you want per ticker: live quote, company profile, key statistics, income statement, balance sheet, cash flow, earnings, analyst targets, ownership, options chains, price history and news.

Works for stocks, ETFs, mutual funds, indices, crypto, FX pairs and futures on every Yahoo-listed exchange (`AAPL`, `7203.T`, `SAP.DE`, `SPY`, `VFIAX`, `^GSPC`, `BTC-USD`, `EURUSD=X`, `GC=F`). No login, no API key, no browser. One row per ticker per data type, so a CSV export opens straight into a spreadsheet.

**Price: $0.84 per 1,000 rows** plus $0.001 per run. A quote for 500 tickers costs $0.42. Annual + quarterly statements for the S\&P 500 (3 statements x 2 periods x 500 tickers = 3,000 rows) cost about $2.50.

### What you get

Every row carries `recordType`, `symbol`, `shortName`, `source` (`input`, `list`, `search`, `trending`, `screener`), `rank` (position in the screener/trending list) and `scrapedAt`.

| `recordType` | Rows | Fields |
|---|---|---|
| `quote` | 1 per ticker | All 86 Yahoo quote fields: `regularMarketPrice` 343.93, `regularMarketChangePercent` 1.30, `regularMarketVolume`, `bid`/`ask`, `marketCap` 5019374977024, `trailingPE` 39.44, `forwardPE`, `epsTrailingTwelveMonths`, `epsForward`, `priceToBook`, `fiftyTwoWeekLow`/`High`, `fiftyDayAverage`, `twoHundredDayAverage`, `dividendRate`, `dividendYield`, `sharesOutstanding`, `averageAnalystRating` "2.3 - Buy", `earningsDate`, `marketState`, pre/post-market price when available |
| `profile` | 1 per ticker | `sector` Technology, `industry` Consumer Electronics, `fullTimeEmployees` 150000, `address1`/`city`/`state`/`country`/`phone`/`website`, `longBusinessSummary`, `officers[]` (name, title, age, totalPay), risk scores; for ETFs and funds: `fundProfile` (family, category, legal type, expense ratio), `topHoldings` (holdings with weights, sector weightings, bond ratings), `fundPerformance` (trailing and annual returns) |
| `keyStats` | 1 per ticker | `enterpriseValue`, `profitMargins` 0.276, `operatingMargins`, `returnOnEquity` 1.49, `returnOnAssets`, `revenueGrowth`, `earningsGrowth`, `beta` 1.069, `shortRatio`, `sharesShort`, `heldPercentInsiders`, `heldPercentInstitutions`, `trailingEps`, `forwardEps`, `pegRatio`, `enterpriseToRevenue`, `enterpriseToEbitda`, `totalCash`, `totalDebt`, `debtToEquity`, `currentRatio`, `freeCashflow`, `operatingCashflow`, `payoutRatio`, `lastSplitDate`, `52WeekChange` |
| `financials` | 1 per ticker per period | `periods[]`, newest first, one object per fiscal period with `asOfDate`, `periodType` and 23 line items: `totalRevenue` 416161000000, `costOfRevenue`, `grossProfit`, `operatingExpense`, `researchAndDevelopment`, `sellingGeneralAndAdministration`, `operatingIncome`, `pretaxIncome`, `taxProvision`, `netIncome`, `basicEPS` 7.49, `dilutedEPS`, `eBIT`, `eBITDA`, average shares |
| `balanceSheet` | 1 per ticker per period | 24 line items per period: `totalAssets`, `currentAssets`, `cashAndCashEquivalents`, `accountsReceivable`, `inventory`, `netPPE`, `totalLiabilitiesNetMinorityInterest`, `currentLiabilities`, `accountsPayable`, `currentDebt`, `longTermDebt`, `totalDebt`, `netDebt`, `stockholdersEquity`, `retainedEarnings`, `workingCapital`, `investedCapital`, `tangibleBookValue`, `shareIssued` |
| `cashFlow` | 1 per ticker per period | 19 line items per period: `operatingCashFlow`, `investingCashFlow`, `financingCashFlow`, `freeCashFlow` 136683000000, `capitalExpenditure`, `repurchaseOfCapitalStock`, `cashDividendsPaid`, `issuanceOfDebt`, `repaymentOfDebt`, `depreciationAndAmortization`, `stockBasedCompensation`, `changeInWorkingCapital`, `beginningCashPosition`, `endCashPosition` |
| `earnings` | 1 per ticker | `nextEarningsDate` 2026-11-02, `earningsCallDate`, `epsEstimateAverage`/`Low`/`High`, `revenueEstimateAverage`/`Low`/`High`, `exDividendDate`, `dividendDate`, `quarterlyHistory[]` (last 4 quarters: `epsActual`, `epsEstimate`, `surprisePercent`), `estimateTrend[]` (current/next quarter and year: EPS and revenue estimates, analyst counts, growth, EPS revisions), `earningsChart`, `financialsChart` |
| `analysts` | 1 per ticker | `targetHighPrice`, `targetLowPrice`, `targetMeanPrice` 328.35, `targetMedianPrice`, `recommendationMean`, `recommendationKey` buy, `numberOfAnalystOpinions` 39, `recommendationTrend[]` (strong buy / buy / hold / sell / strong sell counts for the last 4 months), `upgradeDowngradeHistory[]` (up to 100: date, firm, from/to grade, action, price target), `recommendedSymbols[]` (similar tickers with scores), `technicalOutlook` (Trading Central short / intermediate / long-term direction and score), `keyTechnicals` (support, resistance, stop loss), `valuation`, `companySnapshot`, `researchRecommendation` |
| `ownership` | 1 per ticker | `insidersPercentHeld` 0.0165, `institutionsPercentHeld` 0.664, `institutionsCount`, `institutions[]` (top holders: organization, pctHeld, position, value, pctChange, reportDate), `funds[]`, `insiderHolders[]`, `insiderTransactions[]` (up to 100: filer, relation, shares, value, date, text), `netSharePurchaseActivity` |
| `options` | 1 per ticker per expiration | `expirationDate`, `underlyingPrice`, `callCount`, `putCount`, `calls[]` and `puts[]` (each: `contractSymbol`, `strike`, `lastPrice`, `bid`, `ask`, `volume`, `openInterest`, `impliedVolatility`, `inTheMoney`, `lastTradeDate`), `strikes[]`, `availableExpirations[]` |
| `history` | 1 per ticker | `interval`, `range`, `dataPoints`, `firstDate`, `lastDate`, `history[]` candles (`date`, `open`, `high`, `low`, `close`, `adjClose`, `volume`), `dividends[]`, `splits[]` |
| `news` | 1 per article | `title`, `publisher`, `link`, `publishedAt`, `type`, `thumbnail`, `relatedTickers[]` |

Numbers are plain JSON numbers (no "5.02T" strings); dates are ISO 8601.

### Use cases

- **Portfolio and watchlist refresh**: schedule a daily `quote` run over your own ticker list (paste it, or point `listUrl` at a Google Sheet) and push the dataset into Sheets, Airtable or a database.
- **Fundamental screening**: pull `financials`, `balanceSheet`, `cashFlow` and `keyStats` for an index's constituents and rank by margins, growth, leverage or free cash flow yield.
- **Earnings calendar and surprise tracking**: `earnings` gives the next report date, consensus EPS/revenue and the last four quarters' surprises for every ticker you follow.
- **Analyst and price-target monitoring**: `analysts` returns consensus targets, the rating distribution and the upgrade/downgrade log; diff two runs to catch changes.
- **Options research**: `options` exports full chains with implied volatility and open interest for the nearest N expirations or specific dates.
- **Market movers**: `screener: day_gainers` / `most_actives` / `undervalued_growth_stocks` or `trending: true` give you Yahoo's lists with rank and live quote, ready for alerts.
- **News and sentiment feeds**: `news` with `maxNews` gives headline rows per ticker for an LLM or sentiment pipeline.
- **Backtesting data**: `history` with any `range`/`interval` or an explicit `startDate`/`endDate` window, including dividends and splits.

### Input

#### Choose tickers

| Field | Type | Default | Notes |
|---|---|---|---|
| `tickers` | string\[] | | Symbols or Yahoo quote URLs. `symbols` is accepted as an alias. |
| `listUrl` | string | | Public CSV/TSV or Google Sheet URL (shared as "anyone with the link"); first column = symbol, header row skipped. |
| `searchQuery` | string | | Company/fund name or ISIN; matching symbols are added. |
| `trending` + `trendingRegion` | boolean, string | false, US | Yahoo trending tickers for a region (US, GB, DE, FR, JP, HK, AU, IN...). |
| `screener` | enum | | One of 26 Yahoo predefined screeners (see the input form), or `custom`. |
| `screenerQuery`, `screenerQuoteType`, `screenerSortField`, `screenerSortType` | object, enum, string, enum | | Custom screener criteria in Yahoo's operand format (example below). |
| `maxDiscovered` | integer | 25 | Cap on symbols taken from search, trending and screener. |

With nothing set the actor runs a 3-ticker sample (AAPL, MSFT, GOOGL) so a test run always returns data.

#### Choose data

| Field | Type | Default | Notes |
|---|---|---|---|
| `dataTypes` | string\[] | `["quote"]` | Any of `quote`, `profile`, `keyStats`, `financials`, `balanceSheet`, `cashFlow`, `earnings`, `analysts`, `ownership`, `options`, `history`, `news`. |
| `statementPeriods` | string\[] | `["annual","quarterly"]` | Add `trailing` for TTM income statement and cash flow. |
| `range`, `interval` | enum | 1mo, 1d | History window and candle size (`1m`...`3mo`). Intraday candles exist for ~30 days (1m) to ~2 years (1h). |
| `startDate`, `endDate` | YYYY-MM-DD | | Explicit history window; overrides `range`. |
| `includePrePost` | boolean | false | Pre/post-market candles for intraday intervals. |
| `optionsExpirations` | integer | 1 | Nearest N expirations per ticker. |
| `optionsDates` | string\[] | | Specific expirations (YYYY-MM-DD). |
| `optionsAllExpirations` | boolean | false | Every listed expiration (20-30 rows per ticker). |
| `maxNews` | integer | 10 | Articles per ticker. |
| `region`, `lang` | string | US, en-US | Passed to Yahoo for localized names and news. |
| `maxItems` | integer | 10 | Hard cap on rows for the run. Raise it for real jobs. |
| `proxyConfiguration` | object | Apify proxy | Datacenter proxies are enough. |

Legacy fields from earlier versions keep working: `symbols`, `dataType` (`quote` / `historical` / `both`), `historyRange`, `historyInterval`.

#### Examples

Quotes for a list:

```json
{ "tickers": ["AAPL", "MSFT", "NVDA", "7203.T", "SAP.DE", "BTC-USD"], "maxItems": 1000 }
```

Quotes for every symbol in a Google Sheet:

```json
{ "listUrl": "https://docs.google.com/spreadsheets/d/1AbC.../edit#gid=0", "maxItems": 5000 }
```

Annual and quarterly statements plus key stats for two tickers:

```json
{ "tickers": ["AAPL", "MSFT"], "dataTypes": ["financials", "balanceSheet", "cashFlow", "keyStats"], "statementPeriods": ["annual", "quarterly"], "maxItems": 100 }
```

Today's day gainers with the live quote and analyst targets:

```json
{ "screener": "day_gainers", "maxDiscovered": 50, "dataTypes": ["quote", "analysts"], "maxItems": 200 }
```

Custom screener: US stocks over $10B market cap with P/E under 15, sorted by market cap:

```json
{
  "screener": "custom",
  "screenerQuery": { "operator": "AND", "operands": [
    { "operator": "EQ", "operands": ["region", "us"] },
    { "operator": "GT", "operands": ["intradaymarketcap", 10000000000] },
    { "operator": "LT", "operands": ["peratio.lasttwelvemonths", 15] } ] },
  "screenerSortField": "intradaymarketcap", "screenerSortType": "DESC",
  "maxDiscovered": 100, "maxItems": 100
}
```

Options chains for the next three expirations:

```json
{ "tickers": ["AAPL", "TSLA"], "dataTypes": ["options"], "optionsExpirations": 3, "maxItems": 10 }
```

Two years of daily candles with dividends and splits:

```json
{ "tickers": ["SPY"], "dataTypes": ["history"], "range": "2y", "interval": "1d" }
```

Trending tickers in the UK with news:

```json
{ "trending": true, "trendingRegion": "GB", "dataTypes": ["quote", "news"], "maxNews": 5, "maxItems": 100 }
```

### Output example

A `quote` row from a real run (trimmed to the most used of its 101 fields):

```json
{
  "recordType": "quote",
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "longName": "Apple Inc.",
  "quoteType": "EQUITY",
  "fullExchangeName": "NasdaqGS",
  "currency": "USD",
  "marketState": "REGULAR",
  "regularMarketPrice": 343.9299,
  "regularMarketChange": 4.429901,
  "regularMarketChangePercent": 1.3048309,
  "regularMarketPreviousClose": 339.5,
  "regularMarketOpen": 339.205,
  "regularMarketDayHigh": 345.25,
  "regularMarketDayLow": 338.83,
  "regularMarketVolume": 14119082,
  "averageDailyVolume3Month": 44069551,
  "bid": 335,
  "ask": 344.57,
  "marketCap": 5019374977024,
  "trailingPE": 39.4415,
  "forwardPE": 35.93571,
  "epsTrailingTwelveMonths": 8.72,
  "epsForward": 9.5707,
  "priceToBook": 46.729607,
  "fiftyTwoWeekLow": 243.42,
  "fiftyTwoWeekHigh": 348.15,
  "fiftyTwoWeekChangePercent": 31.360031,
  "fiftyDayAverage": 326.9164,
  "twoHundredDayAverage": 293.16254,
  "dividendRate": 1.08,
  "dividendYield": 0.32,
  "sharesOutstanding": 14594180000,
  "averageAnalystRating": "2.3 - Buy",
  "earningsDate": "2026-11-02T20:00:00.000Z",
  "lastUpdated": "2026-10-21T16:11:58.000Z",
  "source": "input",
  "scrapedAt": "2026-10-21T16:12:00.038Z"
}
```

An annual `financials` row holds `periods[]` like:

```json
{ "asOfDate": "2025-09-30", "periodType": "12M", "totalRevenue": 416161000000, "costOfRevenue": 220960000000, "grossProfit": 195201000000, "operatingIncome": 133050000000, "netIncome": 112010000000, "dilutedEPS": 7.46, "eBITDA": 144748000000 }
```

The run's key-value store also gets an `OUTPUT` record: `{ records, symbols, dataTypes, apiCalls, failed: [{ symbol, section, error }] }`. A section that fails for one ticker (unknown symbol, no options listed, fund without statements) is listed there; every other row is still saved.

### Pricing

Pay per row: **$0.000837 per row ($0.84 per 1,000)** plus $0.001 per run. There are no add-on fees for options, statements or news: a row is a row.

| Job | Rows | Cost |
|---|---|---|
| Daily quotes for 200 tickers | 200 | $0.17 |
| Quotes for the whole S\&P 500 from a CSV | 503 | $0.42 |
| Annual + quarterly statements (3 types) for 100 tickers | 600 | $0.50 |
| Options, nearest 4 expirations, 50 tickers | 200 | $0.17 |
| 10 news headlines for 100 tickers | 1,000 | $0.84 |

Apify platform usage (compute at 512 MB, a few MB of datacenter proxy traffic) is billed separately and is a few cents per run. `maxItems` caps what you can be charged.

### Limits and FAQ

**Is the data real-time?** Quotes are what Yahoo Finance shows: real-time for US exchanges, 15-20 minutes delayed for some international exchanges (`exchangeDataDelayedBy` says how much).

**Which tickers work?** Anything with a Yahoo Finance quote page. Use Yahoo's suffixes for non-US listings (`.L`, `.DE`, `.T`, `.HK`, `.AX`, `.TO`...). Unknown symbols are reported in `OUTPUT.failed` and skipped.

**Statements for ETFs, indices, crypto?** Yahoo has no financial statements for them; the actor skips those with a note instead of producing empty rows. ETFs and funds get `fundProfile`, `topHoldings` and `fundPerformance` in the `profile` row.

**ESG scores?** Yahoo stopped serving its `esgScores` data; every symbol returns HTTP 404 as of October 2026. `esg` is still accepted in `dataTypes` for older configurations but produces no rows.

**Options Greeks?** Yahoo publishes implied volatility, not Greeks. Compute delta/gamma from `impliedVolatility`, `strike`, `underlyingPrice` and `expirationDate` downstream if you need them.

**How many rows is a screener?** Up to `maxDiscovered` (Yahoo pages 250 at a time; `day_gainers` has ~150 entries on a typical day, `most_shorted_stocks` several thousand).

**Rate limits?** The actor makes one request per 50 tickers for quotes and one to three requests per ticker for the other data types, with short pauses. Thousands of tickers per run are fine; it refreshes its Yahoo session automatically if a request is refused.

**Why one row per ticker per data type instead of one giant record?** So each data type has a fixed, flat shape you can open in Excel or load into a table. Filter on `recordType`.

### Integrations

- **API**: start a run with `POST https://api.apify.com/v2/acts/fortuitous_pirate~yahoo-finance-scraper/runs?token=...` and read `.../runs/{id}/dataset/items?format=csv` (or `json`, `xlsx`). Use `run-sync-get-dataset-items` for small jobs to get the rows in the same call.
- **Python**: `from apify_client import ApifyClient; run = ApifyClient(token).actor("fortuitous_pirate/yahoo-finance-scraper").call(run_input={"tickers": ["AAPL"], "dataTypes": ["quote", "earnings"]}); rows = client.dataset(run["defaultDatasetId"]).list_items().items`.
- **JavaScript**: `const run = await new ApifyClient({ token }).actor('fortuitous_pirate/yahoo-finance-scraper').call({ screener: 'most_actives', maxDiscovered: 100, maxItems: 100 });`
- **Schedules**: run it every morning before the open and let a webhook (`ACTOR.RUN.SUCCEEDED`) notify your service with the dataset id.
- **Make / Zapier / n8n**: use the Apify module or node with this actor's id; map the dataset rows to Sheets, Slack, Notion or a database.
- **AI agents and MCP**: the actor is available through the Apify MCP server; an agent can call it with natural-language instructions such as "get analyst price targets and the next earnings date for NVDA and AMD".

### Support

Open an issue on this actor's Issues tab with the run id and the input. Reports of symbols or fields that look wrong are fixed quickly.

# Actor input Schema

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

Yahoo Finance symbols or quote URLs: stocks (AAPL), international (7203.T, SAP.DE), ETFs (SPY), indices (^GSPC), crypto (BTC-USD), FX (EURUSD=X), futures (GC=F), mutual funds (VFIAX). Leave empty to use a list file, search, trending or a screener. With nothing set the actor runs a 3-ticker sample.

## `listUrl` (type: `string`):

Public URL of a CSV/TSV file or a Google Sheet shared as 'anyone with the link'. First column = symbol, one per row (a header row is skipped). Appended to Tickers.

## `searchQuery` (type: `string`):

Company, fund or instrument name, e.g. 'Apple', 'Vanguard S\&P 500', 'US0378331005'. Matching symbols are added to the run (see Max discovered symbols).

## `trending` (type: `boolean`):

Add the symbols currently trending on Yahoo Finance for the Trending region.

## `trendingRegion` (type: `string`):

Region for trending symbols: US, GB, DE, FR, ES, IT, CA, AU, IN, HK, SG, JP, BR.

## `screener` (type: `string`):

Yahoo predefined screener to pull symbols from (most active, gainers, losers, undervalued, crypto, funds, private companies...). Pick 'custom' to use the Custom screener query below.

## `screenerQuery` (type: `object`):

Yahoo screener criteria as JSON, e.g. {"operator":"AND","operands":\[{"operator":"EQ","operands":\["region","us"]},{"operator":"GT","operands":\["intradaymarketcap",10000000000]},{"operator":"LT","operands":\["peratio.lasttwelvemonths",15]}]}. Fields: region, exchange, sector, industry, intradaymarketcap, intradayprice, dayvolume, percentchange, peratio.lasttwelvemonths, forward_dividend_yield, eodvolume, beta.

## `screenerQuoteType` (type: `string`):

Instrument type for the custom screener.

## `screenerSortField` (type: `string`):

e.g. intradaymarketcap, percentchange, dayvolume, intradayprice, peratio.lasttwelvemonths.

## `screenerSortType` (type: `string`):

Sort direction for the custom screener.

## `maxDiscovered` (type: `integer`):

Cap on symbols taken from search, trending and screener (each). Screeners page 250 at a time.

## `dataTypes` (type: `array`):

One row per ticker per data type (news: one row per article; options: one row per expiration). quote = live price + 86 market fields; profile = company/fund profile; keyStats = valuation & key statistics; financials/balanceSheet/cashFlow = statements (annual & quarterly); earnings = history, estimates, next date; analysts = price targets, ratings, upgrades, technical outlook; ownership = institutions, funds, insiders; options = chains; history = OHLCV candles + dividends/splits; news = articles. esg is accepted but Yahoo no longer serves ESG scores.

## `statementPeriods` (type: `array`):

Which periods to fetch for income statement, balance sheet and cash flow.

## `range` (type: `string`):

How far back for price history (ignored when Start date is set).

## `interval` (type: `string`):

Candle size. Intraday intervals only work for short ranges (Yahoo keeps ~30 days of 1m and ~2 years of 1h data).

## `startDate` (type: `string`):

YYYY-MM-DD. Overrides History range.

## `endDate` (type: `string`):

YYYY-MM-DD, inclusive. Defaults to today when Start date is set.

## `includePrePost` (type: `boolean`):

Intraday history only.

## `optionsExpirations` (type: `integer`):

How many upcoming expiration dates to fetch per ticker (one row each, full calls + puts chain).

## `optionsDates` (type: `array`):

YYYY-MM-DD values. When set, only these expirations are fetched.

## `optionsAllExpirations` (type: `boolean`):

Fetch every listed expiration (20-30 rows per ticker).

## `maxNews` (type: `integer`):

How many recent articles to return per ticker (one row each).

## `region` (type: `string`):

Market-data region passed to Yahoo (US, GB, DE, FR, JP, HK, AU, CA, IN...).

## `lang` (type: `string`):

Locale for names and news (en-US, de-DE, fr-FR, ja-JP, zh-Hant-HK...).

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

Hard cap on dataset rows for the whole run. You only pay for rows actually saved.

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

Yahoo answers Apify datacenter proxies; residential is only needed at very high volume.

## `symbols` (type: `array`):

Older name for Tickers; still accepted and merged with Tickers.

## `dataType` (type: `string`):

Older single-choice field: quote, historical or both. Merged into Data to collect.

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

Older name for History range; takes precedence when set.

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

Older name for History interval; takes precedence when set.

## Actor input object example

```json
{
  "tickers": [
    "AAPL",
    "MSFT",
    "GOOGL"
  ],
  "trending": false,
  "trendingRegion": "US",
  "screenerQuoteType": "EQUITY",
  "screenerSortField": "intradaymarketcap",
  "screenerSortType": "DESC",
  "maxDiscovered": 25,
  "dataTypes": [
    "quote"
  ],
  "statementPeriods": [
    "annual",
    "quarterly"
  ],
  "range": "1mo",
  "interval": "1d",
  "includePrePost": false,
  "optionsExpirations": 1,
  "optionsAllExpirations": false,
  "maxNews": 10,
  "region": "US",
  "lang": "en-US",
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset of quotes, statements, earnings, analysts, ownership, options, history and news rows (JSON).

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

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

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

```

## MCP server setup

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