# Yahoo Finance Scraper — Stock Price & History API | $0.50/1k (`glasswing/yahoo-finance-scraper`) Actor

Stock market data from Yahoo Finance without an API key: quotes with price, change, market cap, P/E, EPS and dividend yield; daily, weekly or intraday OHLCV history with adjusted close, dividends and splits; sector, industry, employees and 50+ ratios. Stocks, ETFs, indices, crypto, FX.

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

## Pricing

from $0.50 / 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

### What does Yahoo Finance Scraper do?

Yahoo Finance Scraper turns **ticker symbols into clean rows of stock market data** from [Yahoo Finance](https://finance.yahoo.com/), in three shapes:

- **Quotes**: one snapshot per symbol with price, change, day range, volume, market cap, 52-week range, P/E, EPS, dividend yield and market state.
- **Historical prices**: one row per bar with date, open, high, low, close, adjusted close and volume, for daily, weekly, monthly or intraday bars, with dividends and stock splits marked on the bar they fall in.
- **Fundamentals**: one row per company with sector, industry, employees, website, country and about 50 figures on valuation, margins, growth, balance sheet, cash flow and analyst targets.

It works as a **Yahoo Finance API alternative** (Yahoo retired its public API years ago): no API key, no account, no browser and no proxy. Stocks, ETFs, indices, crypto, currencies and futures from any exchange Yahoo covers. One request answers up to 50 quotes, so a watchlist of 500 tickers is ten requests and takes seconds. Export as JSON, CSV or Excel, or read the dataset from your own code or an AI agent.

The data is **informational only and is not financial advice**. Prices are as Yahoo Finance publishes them, which is delayed for many exchanges (each quote row says by how much in `exchangeDelayMinutes`). This Actor is independent and is not affiliated with, endorsed by or sponsored by Yahoo.

#### Use cases for this stock data API

- **Watchlists and dashboards**: schedule a run every 15 minutes and push quotes for your tickers to Google Sheets, Airtable or a database through Apify integrations, webhooks, n8n, Make or Zapier.
- **Backtests and research**: pull 10 years of daily bars with adjusted close, dividends and splits for a universe of symbols, then load the CSV into pandas, R or Excel.
- **Screening**: compare P/E, margins, growth, debt and analyst targets across a sector with the fundamentals rows.
- **AI agents and MCP**: the Actor runs with no input at all, every row says what it is (`dataType`, `status`), and a ticker Yahoo does not know comes back as one free `not_found` row instead of an empty dataset.
- **Name to ticker**: give company names (`Coca-Cola`, `Toyota`) and get the ticker and its data back.

### What data can Yahoo Finance Scraper extract?

Every row carries `symbol`, `dataType`, `status`, `url` and `scrapedAt`; the other columns depend on the data type. A value Yahoo does not publish for a symbol (an index has no P/E, a currency no market cap) is left out; nothing is guessed.

**Quotes** (`dataType: quote`), the default table view:

| Field | Type | Description |
|---|---|---|
| `symbol` | string | Yahoo Finance ticker: `AAPL`, `BRK-B`, `^GSPC`, `BTC-USD`, `EURUSD=X`, `SAP.DE` |
| `name` | string | Company, fund, index or pair name |
| `price` | number | Last regular-market price |
| `change` | number | Change against the previous close, in `currency` |
| `changePercent` | number | Change in percent (1.53 = +1.53 %) |
| `currency` | string | Currency of the prices (GBp and ZAc mean pence and cents) |
| `marketCap` | number | Market capitalisation |
| `volume` | number | Today's volume |
| `dayLow` / `dayHigh` | number | Today's range |
| `fiftyTwoWeekLow` / `fiftyTwoWeekHigh` | number | 52-week range |
| `trailingPE` | number | Price / earnings, trailing twelve months |
| `eps` | number | Earnings per share, trailing twelve months |
| `dividendYield` | number | Dividend yield as a fraction (0.0032 = 0.32 %) |
| `marketState` | string | `REGULAR`, `PRE`, `POST`, `CLOSED` ... at the time of the run |
| `exchange` | string | Exchange name, e.g. NasdaqGS, NYSE, XETRA |
| `timestamp` | string | Time of the price, ISO 8601 UTC |
| `status` | string | `ok`, `not_found` or `error` (see below) |
| `error` | string | Reason, on `not_found` and `error` rows only |

Quote rows also carry `quoteType`, `exchangeCode`, `open`, `previousClose`, `averageVolume3Month`, `bid`, `ask`, `fiftyTwoWeekChangePercent`, `fiftyDayAverage`, `twoHundredDayAverage`, `forwardPE`, `epsForward`, `dividendRate`, `priceToBook`, `bookValue`, `sharesOutstanding`, `earningsDate`, `analystRating`, `preMarketPrice`, `preMarketChangePercent`, `postMarketPrice`, `postMarketChangePercent`, `exchangeDelayMinutes`, `quoteSource` and `timezone`; ETFs add `ytdReturnPercent`, `netAssets` and `netExpenseRatioPercent`; futures add `openInterest` and `expireDate`; crypto adds `circulatingSupply` and `maxSupply`.

**Historical prices** (`dataType: history`), one row per bar, newest first: `date` (the trading day at the exchange), `timestamp` (bar start, UTC), `open`, `high`, `low`, `close`, `adjClose` (adjusted for splits and dividends; daily and longer bars), `volume`, `dividend` (per share, on the ex-date bar), `splitRatio` (e.g. `10:1`), `interval`, `currency`, `exchange` and `name`.

**Fundamentals** (`dataType: fundamentals`), one row per symbol: `sector`, `industry`, `fullTimeEmployees`, `website`, `city`, `state`, `country`, `businessSummary`, `price`, `marketCap`, `enterpriseValue`, `trailingPE`, `forwardPE`, `pegRatio`, `priceToBook`, `priceToSales`, `enterpriseToRevenue`, `enterpriseToEbitda`, `beta`, `eps`, `epsForward`, `bookValue`, `dividendRate`, `dividendYield`, `payoutRatio`, `exDividendDate`, `sharesOutstanding`, `floatShares`, `heldPercentInsiders`, `heldPercentInstitutions`, `shortPercentOfFloat`, `shortRatio`, `totalRevenue`, `revenueGrowth`, `earningsGrowth`, `grossMargins`, `operatingMargins`, `profitMargins`, `ebitdaMargins`, `ebitda`, `netIncome`, `returnOnAssets`, `returnOnEquity`, `totalCash`, `totalDebt`, `debtToEquity`, `currentRatio`, `quickRatio`, `freeCashflow`, `operatingCashflow`, `targetMeanPrice`, `targetHighPrice`, `targetLowPrice`, `recommendationKey`, `recommendationMean`, `analystCount`, `lastFiscalYearEnd`, `mostRecentQuarter`, `lastSplitFactor` and `lastSplitDate`. ETFs and funds add `fundFamily`, `fundCategory`, `fundLegalType`, `fundInceptionDate`, `totalAssets`, `ytdReturn`, `threeYearAverageReturn` and `fiveYearAverageReturn`. Ratios such as margins, growth and returns are fractions (0.27 = 27 %).

Company officers and executives (names, ages, pay) are **never** included, and neither are head-office phone numbers or street addresses.

#### Result status (tri-state output)

| `status` | Meaning | Billed? |
|---|---|---|
| `ok` | One quote, one history bar or one fundamentals record. | Yes |
| `not_found` | Yahoo answered but has no such ticker, no bars in the period you asked for, or no match for a name. One row per ticker or name, with the reason in `error`. | No |
| `error` | Yahoo could not be read after retries (network error, rate limit, or a changed response). `error` says why. | No |

A run whose only rows are `not_found` finishes successfully: "no such ticker" is an answer, not a failure.

### How to get stock data with Yahoo Finance Scraper

1. Open the Actor in Apify Console and click **Try for free**. The prefilled input already returns quotes for six symbols.
2. Pick a **Data type**: quote snapshot, historical prices or fundamentals.
3. Type your **Ticker symbols**, one per line, or **Company or fund names** to look up. Tickers outside the US need Yahoo's exchange suffix (`SAP.DE`, `VOD.L`, `7203.T`, `SHOP.TO`).
4. For history, choose a **Period** and **Bar size**, or a **Start date** and **End date**. Every bar is one row, so set **Maximum results** high enough: a year of daily bars is about 250 rows per symbol.
5. Click **Start**. Rows appear in seconds; open the **Output** tab (it has Quotes, Historical prices and Fundamentals views) or **Export** as JSON, CSV, Excel, XML or HTML.

To automate it, use the **API** tab (Node.js, Python, curl examples) or add a **Schedule**.

### Input

See the **Input** tab for the full schema. The main options:

| Field | Type | Default | Description |
|---|---|---|---|
| `dataType` | string | `quotes` | `quotes`, `history` or `fundamentals` |
| `symbols` | array of strings | - | Yahoo tickers; a line that is not a ticker is looked up by name |
| `searchTerms` | array of strings | - | Company or fund names to turn into tickers first |
| `searchResultsPerTerm` | integer | `1` | Tickers taken per name, best match first |
| `historyRange` | string | `1mo` | `1d`, `5d`, `1mo`, `3mo`, `6mo`, `ytd`, `1y`, `2y`, `5y`, `10y`, `max` |
| `historyInterval` | string | `1d` | `1m` ... `90m`, `1h`, `1d`, `5d`, `1wk`, `1mo`, `3mo` |
| `startDate` / `endDate` | string | - | `YYYY-MM-DD`; override `historyRange` |
| `maxItems` | integer | `20` | Stop after this many rows |
| `startUrls` | array of strings | six quote pages | Advanced: finance.yahoo.com quote pages or query1/query2 API URLs; their symbols are fetched too |
| `proxyConfiguration` | object | Apify Proxy off | Not needed; the datacenter group helps only if you ever see HTTP 429 |

With no input at all the Actor returns quotes for AAPL, MSFT, NVDA, BTC-USD, ^GSPC and EURUSD=X.

Quotes for a watchlist:

```json
{
    "symbols": ["AAPL", "MSFT", "SPY", "^GSPC", "BTC-USD", "EURUSD=X", "SAP.DE"],
    "maxItems": 50
}
```

Daily prices for one quarter, with adjusted close, dividends and splits:

```json
{
    "dataType": "history",
    "symbols": ["NVDA", "MSFT"],
    "startDate": "2024-04-01",
    "endDate": "2024-06-30",
    "maxItems": 200
}
```

Ten years of monthly bars:

```json
{
    "dataType": "history",
    "symbols": ["^GSPC"],
    "historyRange": "10y",
    "historyInterval": "1mo",
    "maxItems": 150
}
```

Fundamentals, starting from company names:

```json
{
    "dataType": "fundamentals",
    "searchTerms": ["Coca-Cola", "Toyota", "Johnson & Johnson"]
}
```

### Output

You can download the dataset in various formats such as JSON, HTML, CSV or Excel. Real rows from runs on the Apify platform on 2026-09-28 (runs `t2V9yuPf6UaM3H6J3`, `WNubwT6VOQOdTJT7f`, `ZTJFhyB51hNILWP6b` and `xQVGs5BfpztjcaaNX`): a quote from the default run, one daily bar, a fundamentals row (trimmed: `businessSummary` shortened and about 40 ratio columns left out here) and the free `not_found` row a fundamentals run gave for a ticker Yahoo does not know.

```json
[
    {
        "url": "https://finance.yahoo.com/quote/AAPL/",
        "status": "ok",
        "symbol": "AAPL",
        "dataType": "quote",
        "name": "Apple Inc.",
        "quoteType": "EQUITY",
        "exchange": "NasdaqGS",
        "exchangeCode": "NMS",
        "currency": "USD",
        "marketState": "CLOSED",
        "price": 341.07,
        "change": 5.149994,
        "changePercent": 1.5331,
        "open": 336.04,
        "dayHigh": 341.67,
        "dayLow": 334.53,
        "previousClose": 335.92,
        "volume": 30002507,
        "averageVolume3Month": 47789836,
        "bid": 340.03,
        "ask": 342.48,
        "marketCap": 4977636933632,
        "fiftyTwoWeekHigh": 345.34,
        "fiftyTwoWeekLow": 243.42,
        "fiftyTwoWeekChangePercent": 34.0526,
        "fiftyDayAverage": 321.832,
        "twoHundredDayAverage": 287.76636,
        "trailingPE": 39.0687,
        "forwardPE": 35.5824,
        "eps": 8.73,
        "epsForward": 9.5854,
        "dividendRate": 1.08,
        "dividendYield": 0.0032,
        "priceToBook": 46.341,
        "bookValue": 7.36,
        "sharesOutstanding": 14594180000,
        "earningsDate": "2026-07-30T20:00:00Z",
        "analystRating": "2.2 - Buy",
        "postMarketPrice": 341.4603,
        "postMarketChangePercent": 0.1144,
        "exchangeDelayMinutes": 0,
        "quoteSource": "Nasdaq Real Time Price",
        "timezone": "America/New_York",
        "timestamp": "2026-09-25T20:00:01Z",
        "scrapedAt": "2026-09-27T23:22:26.565Z"
    },
    {
        "url": "https://finance.yahoo.com/quote/AAPL/history/",
        "status": "ok",
        "symbol": "AAPL",
        "dataType": "history",
        "name": "Apple Inc.",
        "exchange": "NasdaqGS",
        "currency": "USD",
        "interval": "1d",
        "date": "2026-09-25",
        "timestamp": "2026-09-25T13:30:00Z",
        "open": 336.04,
        "high": 341.67,
        "low": 334.53,
        "close": 341.07,
        "adjClose": 341.07,
        "volume": 29950100,
        "scrapedAt": "2026-09-27T23:22:34.964Z"
    },
    {
        "url": "https://finance.yahoo.com/quote/AAPL/",
        "status": "ok",
        "symbol": "AAPL",
        "dataType": "fundamentals",
        "name": "Apple Inc.",
        "quoteType": "EQUITY",
        "exchange": "NasdaqGS",
        "currency": "USD",
        "sector": "Technology",
        "industry": "Consumer Electronics",
        "fullTimeEmployees": 150000,
        "website": "https://www.apple.com",
        "city": "Cupertino",
        "state": "CA",
        "country": "United States",
        "businessSummary": "Apple Inc. designs, manufactures, and markets smartphones, personal computers, tablets, wearables, and accessories worldwide. ...",
        "price": 341.07,
        "marketCap": 4977636933632,
        "enterpriseValue": 4999582056448,
        "trailingPE": 39.068733,
        "forwardPE": 35.582424,
        "pegRatio": 2.74,
        "beta": 1.085,
        "eps": 8.73,
        "dividendYield": 0.0032,
        "exDividendDate": "2026-08-10",
        "totalRevenue": 466822987776,
        "revenueGrowth": 0.164,
        "profitMargins": 0.27618998,
        "returnOnEquity": 1.4875101,
        "totalCash": 62399000576,
        "totalDebt": 84343996416,
        "freeCashflow": 107721875456,
        "targetMeanPrice": 328.22205,
        "recommendationKey": "buy",
        "analystCount": 39,
        "mostRecentQuarter": "2026-06-27",
        "lastSplitFactor": "4:1",
        "timestamp": "2026-09-25T20:00:01Z",
        "scrapedAt": "2026-09-27T23:22:41.420Z"
    },
    {
        "url": "https://finance.yahoo.com/quote/NOTATICKERX/",
        "status": "not_found",
        "error": "Yahoo Finance has no quote for \"NOTATICKERX\". Check the ticker as Yahoo writes it (BRK-B not BRK.B; add the exchange suffix for listings outside the US, such as SAP.DE, VOD.L or 7203.T), or put the company name in searchTerms.",
        "symbol": "NOTATICKERX",
        "dataType": "fundamentals",
        "scrapedAt": "2026-09-28T00:16:50.280Z"
    }
]
```

In every mode an unknown ticker gets exactly one free `not_found` row with `symbol`, `dataType` and the reason. For history and fundamentals the Actor asks Yahoo which tickers exist before fetching, so unknown ones are never requested and are reported first, even when **Maximum results** is small.

### How much does it cost to get Yahoo Finance data?

This Actor uses **pay-per-event** pricing, and the price includes the platform compute for the run:

| Event | Price |
|---|---|
| Actor start | $0.005 per run |
| Result (`status: ok` row) | $0.0005 per row |

A result is one quote, one history bar or one fundamentals record. Examples: the default run of 6 quotes costs about $0.008 ($0.005 + 6 x $0.0005); 1,000 daily bars (four years of one stock) cost about $0.505; fundamentals for the 30 Dow stocks cost about $0.02. Rows with `status` `not_found` or `error` are never billed. The free Apify plan includes enough credit to try the Actor on thousands of rows. You can cap spending per run with **Maximum results** and in the run's **Max total charge** option.

### Tips

- Use Yahoo's own ticker spelling: `BRK-B` (not `BRK.B`), `^GSPC` for the S\&P 500, `EURUSD=X` for a currency pair, `GC=F` for gold futures, and the exchange suffix for listings outside the US (`.L` London, `.DE` XETRA, `.PA` Paris, `.T` Tokyo, `.TO` Toronto, `.HK` Hong Kong).
- Not sure of the ticker? Put the company name in **Company or fund names**; the best match is used and the row tells you which ticker it was.
- History rows come newest first, so a small **Maximum results** keeps the latest bars.
- Use `adjClose` for returns across dividends and splits; `close` is the traded price (split-adjusted, as Yahoo shows it).
- For many symbols, quotes are the cheapest in time: 50 symbols share one request.

### Limitations

- Data comes from Yahoo Finance's public web endpoints, not from a licensed market-data feed. Many exchanges are delayed (15 minutes for XETRA, 10 for COMEX futures; see `exchangeDelayMinutes`), and runs return snapshots, not a live stream.
- Intraday bars go back only as far as Yahoo keeps them: 1-minute bars about 7 days, 2 to 90-minute bars 60 days, hourly bars 2 years. A longer period for an intraday bar size is narrowed automatically and the log says so.
- Quotes and fundamentals need an anonymous Yahoo session (a cookie and a "crumb", no login), which the Actor fetches at the start of each run and also uses to check history tickers before fetching them. The crumb travels in a request header, so it never appears in your dataset or in the run log. If Yahoo ever refuses the session, quotes are still read from the chart endpoint with fewer fields (no market cap, P/E, EPS or dividend fields), tickers are checked with the chart endpoint instead, and the log says so.
- Options chains, news, earnings transcripts, analyst notes and insider trades are not included.
- Measured from Apify's datacenter on 2026-09-28: 1,170 Yahoo requests over three test runs, one transient HTTP 500 and no rate limiting. If Yahoo ever throttles the shared address, the Actor backs off and retries, then writes an `error` row; enabling the Apify datacenter proxy group gives the run its own address.
- If Yahoo changes a response format, rows come back as `error` and the Actor is updated quickly (report it in the **Issues** tab).

### FAQ

#### Do I need a Yahoo account or an API key?

No. The Actor reads the public endpoints Yahoo Finance's own web pages use. There is nothing to sign up for and nothing to paste in.

#### Is this Yahoo's own finance API?

No. Yahoo retired its public finance API in 2017; this Actor is an independent alternative that reads the same public data the finance.yahoo.com pages show. It is not affiliated with Yahoo.

#### Are the prices real time?

As fresh as Yahoo shows them without a login: some US stocks carry Nasdaq's real-time price, while many quotes, especially outside the US, are delayed 10 to 20 minutes. Each quote row has `exchangeDelayMinutes`, `quoteSource` and `timestamp`, so you always know how fresh a price is. Do not use it for order execution.

#### Which markets are covered?

Everything Yahoo Finance lists: stocks and ETFs on US and international exchanges, indices, mutual funds, crypto pairs, currency pairs and futures.

#### Can I use this Actor from an AI agent or MCP client?

Yes. It runs with no arguments (six example quotes), inputs are plain strings, every row is self-describing (`dataType`, `status`, `error`), and results can be fetched through the dataset API or the Apify MCP server.

#### Why did I get fewer rows than I expected?

For history, every bar is a row and **Maximum results** stops the run; raise it. Otherwise a ticker may be misspelled (see its `not_found` row), a name may have matched nothing, or the run hit your **Max total charge** limit. The run log says "Stopping gracefully" when a limit was reached.

#### Is it legal to use this data?

The Actor reads public market data without logging in, and it leaves out the only personal data Yahoo shows (executives' names and pay). You are responsible for how you use the output; read the notice below and Yahoo's terms of service.

### Related Actors

- [Crypto Data API — CoinGecko, DexScreener, DefiLlama](https://apify.com/glasswing/coingecko-dexscreener-crypto-api) - use it for crypto prices alongside stock and index data.
- [Google News Scraper & News API](https://apify.com/glasswing/google-news-scraper) - use it to pull headlines that may explain a price move.
- [Domain Intelligence: SPF, DMARC, SSL, WHOIS](https://apify.com/glasswing/domain-intelligence-report) - use it to check a company's own domain as part of due diligence.

### Legal and data-protection notice

This Actor extracts only market and company data that Yahoo Finance publishes publicly; it does not log in, get around access controls or collect private user data. Executives' names, ages and compensation, and head-office phone numbers and street addresses, are deliberately not extracted, so the output contains no personal data. You are responsible for making sure your use of the output complies with Yahoo's terms of service and with applicable law, including the GDPR where it applies, and for any licensing that redistribution of market data may require. The data is provided as published by a third party, may be delayed, incomplete or wrong at the source, and is for information only: it is not investment, financial, legal or tax advice.

This Actor is an independent tool and is not affiliated with, endorsed by or sponsored by Yahoo or its owners. Yahoo and Yahoo Finance are trademarks of their respective owners.

# Changelog

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

# Actor input Schema

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

`quotes` = one snapshot row per symbol: price, change, day range, volume, market cap, 52-week range, P/E, EPS, dividend yield, market state. `history` = one row per symbol per bar: date, open, high, low, close, adjusted close, volume, plus dividends and splits. `fundamentals` = one row per symbol: sector, industry, employees, website, country and about 50 valuation, profitability, balance-sheet and analyst figures.

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

Yahoo Finance tickers, one per line: stocks `AAPL`, `BRK-B`, ETFs `SPY`, indices `^GSPC`, `^DJI`, crypto `BTC-USD`, currencies `EURUSD=X`, futures `GC=F`, and listings outside the US with their exchange suffix: `SAP.DE`, `VOD.L`, `7203.T`, `SHOP.TO`. Case does not matter. A line that is not a ticker (a company name) is looked up by name. A ticker Yahoo does not know gives one free `not_found` row.

## `searchTerms` (type: `array`):

Names to turn into tickers first, one per line: `Tesla`, `Coca-Cola`, `Vanguard S&P 500`, `Toyota`. Each name is looked up with Yahoo's symbol search and the best match is fetched with the data type above. A name with no match gives one free `not_found` row.

## `searchResultsPerTerm` (type: `integer`):

How many tickers to take for each name, best match first. `1` takes the primary listing (Tesla -> TSLA); raise it to also get other listings, share classes or futures on the same company.

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

How far back to go when no dates are given. Ignored when a start or end date is set.

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

Size of one bar. Yahoo serves 1-minute bars only for about the last 7 days, 2 to 90-minute bars for the last 60 days and hourly bars for 2 years; a longer period is narrowed automatically and the log says so.

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

First day to include, `YYYY-MM-DD`. With no end date, bars run up to today. Overrides the period above.

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

Last day to include, `YYYY-MM-DD`. With no start date, all history up to this day (newest first, cut by `Maximum results`).

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

Stop after this many rows have been saved. Each saved row with status `ok` is one billable result: one quote, one history bar or one fundamentals record. For history, raise it to the number of bars you want (about 21 per symbol per month of daily bars). The default of 20 keeps a first run cheap.

## `startUrls` (type: `array`):

Optional. finance.yahoo.com quote pages (`https://finance.yahoo.com/quote/AAPL/`, also `/history/` and other tabs) or query1/query2.finance.yahoo.com API URLs. The symbols in them are fetched with the data type above, together with Ticker symbols and names. When this list holds only its built-in example and you gave symbols or names, the example is skipped.

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

Optional and off by default: Yahoo Finance answers Apify's datacenter IPs directly (measured 2026-09-28). If you ever see HTTP 429 in `error` rows, enable Apify Proxy with the datacenter group so the run gets its own address. Residential proxies are not needed.

## Actor input object example

```json
{
  "dataType": "quotes",
  "symbols": [
    "AAPL",
    "MSFT",
    "NVDA",
    "BTC-USD",
    "^GSPC",
    "EURUSD=X"
  ],
  "searchResultsPerTerm": 1,
  "historyRange": "1mo",
  "historyInterval": "1d",
  "maxItems": 20,
  "startUrls": [
    "https://finance.yahoo.com/quote/AAPL/",
    "https://finance.yahoo.com/quote/MSFT/",
    "https://finance.yahoo.com/quote/NVDA/",
    "https://finance.yahoo.com/quote/BTC-USD/",
    "https://finance.yahoo.com/quote/%5EGSPC/",
    "https://finance.yahoo.com/quote/EURUSD%3DX/"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "dataType": "quotes",
    "symbols": [
        "AAPL",
        "MSFT",
        "NVDA",
        "BTC-USD",
        "^GSPC",
        "EURUSD=X"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("glasswing/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 = {
    "dataType": "quotes",
    "symbols": [
        "AAPL",
        "MSFT",
        "NVDA",
        "BTC-USD",
        "^GSPC",
        "EURUSD=X",
    ],
    "maxItems": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("glasswing/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 '{
  "dataType": "quotes",
  "symbols": [
    "AAPL",
    "MSFT",
    "NVDA",
    "BTC-USD",
    "^GSPC",
    "EURUSD=X"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call glasswing/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

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