# Yahoo Finance Scraper: Stock Quotes, History & Fundamentals (`datagleaner/yahoo-finance-scraper`) Actor

Yahoo Finance scraper and API: live quotes, price history (OHLCV), key statistics, analyst targets, earnings, financial statements, ETF holdings, news and options for stocks, ETFs, crypto, forex and indices. $0.30 per 1,000 symbols. No API key.

- **URL**: https://apify.com/datagleaner/yahoo-finance-scraper.md
- **Developed by:** [Data Gleaner](https://apify.com/datagleaner) (community)
- **Categories:** Automation, Developer tools, Other
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 symbols

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: Stock Quotes, History & Fundamentals

**Yahoo Finance Scraper** turns a list of tickers into one clean record per symbol. Give it `AAPL`, `SPY`, `BTC-USD`, `EURUSD=X`, `^GSPC` or `7203.T`, a company name such as `Toyota`, or one of Yahoo Finance's screeners (today's top gainers, most active, most shorted, top ETFs, crypto). Each record holds the **live quote**, **company profile**, **key statistics** (valuation, margins, growth, cash, debt, short interest, ownership), **analyst price targets and earnings**, and **price history** (OHLCV with adjusted close, dividends and splits). Turn on **financial statements**, **news** or the **options chain** when you need them. ETFs and funds also get their **top holdings, sector weights and expense ratio**. Stocks from any exchange Yahoo Finance covers, plus ETFs, mutual funds, indices, crypto, forex and futures. No API key, login or browser. It costs **$0.30 per 1,000 symbols**, with no start fee.

### What you can do with it

- **Stock screens and watchlists.** Pull price, market cap, P/E, margins, growth and analyst targets for hundreds of tickers in one run, then sort and filter in a spreadsheet.
- **Backtests and charts.** Download daily, weekly or intraday OHLCV history with adjusted close, as one row per bar (`historyAsRows`) ready for pandas, Excel or a database.
- **Fundamental research.** Annual and quarterly revenue, profit, EPS, EBITDA, assets, debt and free cash flow for any company (`includeFinancials`).
- **Market movers every day.** Schedule the Day Gainers, Day Losers or Most Active screener after the close and get each mover with its fundamentals.
- **Options analysis.** Calls and puts with bid, ask, volume, open interest and implied volatility for one or many expirations, nested or one row per contract.
- **ETF look-through.** Top holdings and sector weights of SPY, QQQ, VOO or any fund.
- **Feeds for AI agents and apps.** Plain JSON with the same field names for every symbol and asset type.

### Input

| Field | Type | What it does |
|---|---|---|
| `symbols` | list of text | Yahoo Finance symbols: `AAPL`, `BRK-B`, `7203.T`, `VOD.L`, `RELIANCE.NS`, `SPY`, `VFIAX`, `^GSPC`, `BTC-USD`, `EURUSD=X`, `GC=F`. One record each. |
| `searchQueries` | list of text | Company or fund names (`Toyota`, `Vanguard S&P 500`). Each is matched to Yahoo Finance's best symbol. |
| `screener` | choice | A predefined Yahoo Finance screener: `day_gainers`, `day_losers`, `most_actives`, `most_shorted_stocks`, `undervalued_growth_stocks`, `growth_technology_stocks`, `undervalued_large_caps`, `aggressive_small_caps`, `small_cap_gainers`, `top_etfs_us`, `top_mutual_funds`, `all_cryptocurrencies_us` and more. |
| `maxScreenerResults` | number | Symbols taken from the screener. Default 25, max 2,000. |
| `includeProfile` | true/false | Sector, industry, website, employees, description, address, officers. On by default. |
| `includeStatistics` | true/false | Valuation, margins, growth, cash, debt, ratios, cash flow, float, short interest, ownership. On by default. |
| `includeAnalyst` | true/false | Price targets, recommendation and its trend, next earnings date and estimates, last 4 quarters of EPS vs estimate. On by default. |
| `includeHistory` | true/false | OHLCV bars plus dividends and splits. On by default. |
| `historyRange` | choice | `1d`, `5d`, `1mo`, `3mo`, `6mo`, `1y` (default), `2y`, `5y`, `10y`, `ytd`, `max`. |
| `historyInterval` | choice | `1m` to `90m`, `1h`, `1d` (default), `5d`, `1wk`, `1mo`, `3mo`. |
| `historyStartDate`, `historyEndDate` | date | Exact window (YYYY-MM-DD). Overrides the range. |
| `historyAsRows` | true/false | Write each bar as its own row instead of inside the symbol record. |
| `includeFinancials` | true/false | Annual (4 years) and quarterly (5 quarters) statements. |
| `includeNews` | true/false | Latest headlines per symbol (`maxNewsPerSymbol`, default 10). |
| `includeOptions` | true/false | Options chain; `maxOptionExpirations` (default 1, nearest first). `optionsAsRows` writes one row per contract. |
| `maxConcurrency` | number | Symbols fetched at once. Default 5. |

Example:

```json
{
  "symbols": ["AAPL", "MSFT", "SPY", "BTC-USD"],
  "searchQueries": ["Toyota"],
  "historyRange": "5y",
  "historyInterval": "1wk",
  "includeFinancials": true
}
```

An empty input `{}` runs a small example (AAPL, MSFT, NVDA, SPY and BTC-USD), and the status message says so.

### Output

One record per symbol (`"type": "symbol"`). A shortened example:

```json
{
  "type": "symbol",
  "symbol": "AAPL",
  "name": "Apple Inc.",
  "quoteType": "EQUITY",
  "exchangeName": "NasdaqGS",
  "currency": "USD",
  "price": 343.99,
  "change": 4.48999,
  "changePercent": 1.32253,
  "volume": 35368592,
  "marketCap": 5020252110848,
  "trailingPE": 39.44839,
  "forwardPE": 35.94199,
  "dividendYield": 0.32,
  "fiftyTwoWeekHigh": 348.15,
  "fiftyTwoWeekLow": 243.42,
  "marketTime": "2026-10-21T20:00:01Z",
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "employees": 150000,
  "website": "https://www.apple.com",
  "revenue": 466822987776,
  "grossMargin": 0.48653,
  "profitMargin": 0.27619,
  "freeCashFlow": 107721875456,
  "targetMeanPrice": 328.35025,
  "recommendation": "buy",
  "analystCount": 39,
  "nextEarningsDate": "2026-11-02",
  "history": [
    {"date": "2026-10-20", "open": 339.859985, "high": 343.059998, "low": 338.700012, "close": 339.5, "adjClose": 339.5, "volume": 35851400}
  ],
  "dividends": [{"date": "2026-08-10", "amount": 0.27}],
  "annualFinancials": [
    {"periodEnd": "2025-09-30", "currency": "USD", "totalRevenue": 416161000000, "netIncome": 112010000000, "dilutedEps": 7.46, "freeCashFlow": 98767000000}
  ],
  "yahooUrl": "https://finance.yahoo.com/quote/AAPL/",
  "source": "symbols",
  "input": "AAPL",
  "scrapedAt": "2026-10-22T00:09:10Z"
}
```

| Fields | What they hold |
|---|---|
| `price`, `change`, `changePercent`, `open`, `dayHigh`, `dayLow`, `previousClose`, `volume`, `bid`, `ask`, `preMarketPrice`, `postMarketPrice`, `marketTime`, `marketState` | The quote. Exchange data is delayed as Yahoo shows it (`dataDelayMinutes`, usually 15 for US stocks). |
| `marketCap`, `sharesOutstanding`, `trailingPE`, `forwardPE`, `epsTrailing12Months`, `epsForward`, `priceToBook`, `dividendRate`, `dividendYield`, `fiftyTwoWeekHigh/Low`, `fiftyDayAverage`, `twoHundredDayAverage`, `earningsDate`, `analystRating` | Quote statistics. |
| `sector`, `industry`, `website`, `employees`, `description`, `address`, `country`, `phone`, `officers` | Company profile. |
| `enterpriseValue`, `pegRatio`, `priceToSales`, `revenue`, `revenueGrowth`, `earningsGrowth`, `grossMargin`, `operatingMargin`, `profitMargin`, `returnOnEquity`, `totalCash`, `totalDebt`, `debtToEquity`, `freeCashFlow`, `sharesShort`, `shortPercentOfFloat`, `heldPercentInstitutions` and more | Key statistics. |
| `targetMeanPrice`, `targetHighPrice`, `targetLowPrice`, `recommendation`, `recommendationTrend`, `nextEarningsDate`, `earningsEpsEstimate`, `earningsHistory`, `yearlyFinancials` | Analyst view and earnings. |
| `history`, `dividends`, `splits`, `historyBarCount` | Price history. |
| `annualFinancials`, `quarterlyFinancials` | Revenue, gross profit, operating income, net income, diluted EPS, EBITDA, assets, liabilities, equity, cash, debt, operating cash flow, capex, free cash flow. |
| `topHoldings`, `sectorWeights`, `fundFamily`, `fundCategory`, `expenseRatio` | ETFs and mutual funds. |
| `news`, `options`, `optionExpirations` | When turned on. |
| `source`, `input`, `scrapedAt` | Where the record came from (`symbols`, `search` or `screener`, and what you typed) and when. |

Units: `changePercent`, `dividendYield` and `fiftyTwoWeekChangePercent` are in percent (1.32 means 1.32%), as Yahoo shows them. Margins, growth, returns, ownership and `weight` are fractions (0.27 means 27%). Dates are ISO 8601; timestamps are UTC.

With `historyAsRows`, each bar is its own row: `{"type": "priceBar", "symbol": "AAPL", "date": "2026-10-21", "open": ..., "high": ..., "low": ..., "close": ..., "adjClose": ..., "volume": ..., "interval": "1d"}`. With `optionsAsRows`, each contract is a row with `"type": "optionContract"`, `contractSymbol`, `optionType` (call or put), `expiration`, `strike`, `bid`, `ask`, `lastPrice`, `volume`, `openInterest`, `impliedVolatility`, `inTheMoney` and `underlyingPrice`. The dataset has views for quotes, fundamentals, price rows and option rows.

Fill rates on Apify over Yahoo's 250 most active US stocks (2026-10-22): price, market cap and history 100%; sector, description, officers, analyst targets and next earnings date 99%; revenue 99%; trailing P/E 70% (companies with losses have none). Crypto, forex, indices and futures carry the quote and history but no company fields.

### How much does it cost to scrape Yahoo Finance?

You pay per result saved to the dataset. These prices are final:

| Event | Price | Per 1,000 |
|---|---|---|
| `symbol`: one symbol record, with every section you turned on (history and options inside it included) | $0.0003 | $0.30 |
| `price-bar`: one price-history row, only with `historyAsRows` | $0.00005 | $0.05 |
| `option-contract`: one option-contract row, only with `optionsAsRows` | $0.0002 | $0.20 |

There is no start fee. Symbols that are not found, failed requests and retries are free. Platform usage is included in the price. The run stops by itself when it reaches your **maximum total charge**.

Examples:

- **A watchlist of 50 stocks** with quote, profile, statistics, analyst view and one year of daily history inside each record: **$0.015**.
- **The whole S\&P 500**, every section including financial statements: 500 symbols = **$0.15**.
- **Ten years of daily bars for 100 tickers as rows** (about 251,000 bars) plus their 100 records: **$12.58**. Kept inside the records instead, the same history costs **$0.03**.
- **SPY options for the next 3 expirations as rows** (771 contracts on 2026-10-22) plus the SPY record: **$0.15**.

### Limits

- **Delayed quotes.** Prices are what Yahoo Finance shows, usually 15 minutes delayed for US exchanges and real time for crypto. This is not a trading feed.
- **Intraday history.** Yahoo keeps 1-minute bars for the last 7 days, other minute bars for 60 days and hourly bars for 2 years. Longer requests are cut to that window.
- **Statements depth.** Yahoo's free data covers the last 4 fiscal years and 5 quarters.
- **Speed.** On Apify, 250 symbols with every default section took 47 seconds, 1,000 funds (quote, profile, statistics, holdings) took 88 seconds, and 10 tickers with 5 years of daily rows (12,530 bars) took 9 seconds.
- **Search.** `searchQueries` takes Yahoo Finance's first match (for "Toyota", the NYSE listing TM). Use `symbols` for an exact listing such as `7203.T`.
- Yahoo Finance can change its data at any time. The Actor retries failed requests, moves to Apify Proxy if Yahoo rate-limits the run, and lists symbols it could not fetch in the status message.

### Use with Python

```python
## pip install apify-client
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("datagleaner/yahoo-finance-scraper").call(
    run_input={"symbols": ["AAPL", "MSFT", "NVDA"], "historyRange": "5y", "historyAsRows": True}
)
for row in client.dataset(run.default_dataset_id).iterate_items():
    if row["type"] == "priceBar":
        print(row["symbol"], row["date"], row["close"])
```

### Use with JavaScript / Node.js

```js
// npm install apify-client
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('datagleaner/yahoo-finance-scraper').call({
    screener: 'day_gainers',
    maxScreenerResults: 25,
    includeHistory: false,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const s of items) console.log(s.symbol, s.changePercent, s.marketCap, s.sector);
```

### Use it from n8n, Make, Zapier or an AI agent

Actor ID: `datagleaner/yahoo-finance-scraper`

Minimal input:

```
{"symbols": ["AAPL", "MSFT"]}
```

Each tool below runs this Actor with your own Apify API token.

- **n8n:** add the **Apify** node (`@apify/n8n-nodes-apify`) and choose **Run an Actor and get dataset**. Set the Actor to `datagleaner/yahoo-finance-scraper` and paste the input above.
- **Make:** use the Apify app's **Run an Actor** module, then **Get Dataset Items**.
- **Zapier:** use the Apify action **Run Actor**, then the search **Fetch dataset items**.
- **AI agents (MCP):** connect to `https://mcp.apify.com?tools=datagleaner/yahoo-finance-scraper`. In Claude Code:

  ```
    claude mcp add --transport http apify "https://mcp.apify.com?tools=datagleaner/yahoo-finance-scraper"
  ```

  Then run `/mcp` to sign in to Apify, and ask in plain language. For example: "Use the Yahoo Finance scraper to compare the margins, growth and analyst targets of NVDA, AMD and INTC."

### FAQ

**Is there a Yahoo Finance API?** Yahoo closed its official finance API in 2017. This Actor works like one: send symbols, get JSON back, through the Apify API, its clients, or the integrations above.

**How do I download historical stock data from Yahoo Finance?** Set `symbols`, a `historyRange` (up to `max`) or exact dates, an interval, and turn on `historyAsRows`. Export the dataset as CSV or Excel from Apify.

**Does it work for crypto, forex, indices and non-US stocks?** Yes. Use Yahoo's symbols: `BTC-USD`, `ETH-USD`, `EURUSD=X`, `^GSPC`, `^N225`, `GC=F`, `7203.T` (Tokyo), `VOD.L` (London), `RELIANCE.NS` (India), `SAP.DE` (Xetra).

**Can I get ETF holdings?** Yes. ETF and fund records include the top 10 holdings with weights, sector weights, fund family, category and expense ratio.

**Is the data real time?** It is what Yahoo Finance shows: real time for crypto and some markets, usually 15 minutes delayed for US stocks (`dataDelayMinutes`).

**Do I need a Yahoo account, API key or proxy?** No. You only need an Apify account.

### Responsible use

This Actor collects market data that Yahoo Finance shows publicly. Company officer names and pay come from public filings as Yahoo lists them. **You** are responsible for how you use the results, including Yahoo's terms, any data-licensing rules for market data in your use case, and any data protection rules that apply where you work. Nothing here is investment advice, and this is not legal advice.

### Feedback

If this Actor saved you time, a rating on its Store page helps others find it. Problems or requests: open an issue on the Issues tab.

# Actor input Schema

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

Yahoo Finance symbols: stocks (AAPL, TSLA, 7203.T, VOD.L, RELIANCE.NS), ETFs and funds (SPY, VOO, VFIAX), indices (^GSPC, ^IXIC), crypto (BTC-USD), forex (EURUSD=X) and futures (GC=F, CL=F). One record per symbol.

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

Names or partial names (Toyota, Nvidia, Vanguard S\&P 500). Each is matched to Yahoo Finance's best symbol, which is then scraped like a symbol above.

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

Take the symbols from one of Yahoo Finance's predefined screeners, in Yahoo's order (e.g. today's top gainers). Combined with any symbols above.

## `maxScreenerResults` (type: `integer`):

How many symbols to take from the screener.

## `includeProfile` (type: `boolean`):

Sector, industry, website, employees, business description, address and officers.

## `includeStatistics` (type: `boolean`):

Valuation (enterprise value, PEG, price/sales), margins, growth, cash, debt, ratios, cash flow, float, short interest and ownership.

## `includeAnalyst` (type: `boolean`):

Price targets, recommendation and its 4-month trend, next earnings date and estimates, last 4 quarters of EPS actual vs estimate, yearly revenue and earnings.

## `includeHistory` (type: `boolean`):

OHLCV bars with adjusted close, plus dividends and splits, for the range and interval below.

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

How far back the price history goes. Ignored when a start or end date is set.

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

Bar size. Yahoo keeps 1-minute bars for the last 7 days, other intraday bars for 60 days (hourly for 2 years); longer requests are cut to that window.

## `historyStartDate` (type: `string`):

Optional YYYY-MM-DD. Overrides the range.

## `historyEndDate` (type: `string`):

Optional YYYY-MM-DD (inclusive). Defaults to today.

## `historyAsRows` (type: `boolean`):

Off: the bars sit inside each symbol record (no extra charge). On: each bar is its own dataset row (symbol, date, open, high, low, close, adjClose, volume), ready for a spreadsheet or backtest, billed per bar.

## `includeFinancials` (type: `boolean`):

Annual (last 4 years) and quarterly (last 5 quarters) revenue, gross profit, operating income, net income, diluted EPS, EBITDA, assets, liabilities, equity, cash, debt, operating cash flow, capex and free cash flow.

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

Latest Yahoo Finance news headlines for the symbol, with publisher, link, time and related symbols.

## `maxNewsPerSymbol` (type: `integer`):

Headlines per symbol when news is on.

## `includeOptions` (type: `boolean`):

Calls and puts with strike, bid, ask, last price, volume, open interest, implied volatility and in-the-money flag.

## `maxOptionExpirations` (type: `integer`):

How many expiration dates to fetch, nearest first. All expiration dates are always listed.

## `optionsAsRows` (type: `boolean`):

Off: contracts sit inside each symbol record (no extra charge). On: each contract is its own dataset row, billed per contract.

## `maxConcurrency` (type: `integer`):

Symbols fetched at the same time.

## `requestDelaySeconds` (type: `number`):

Extra pause after each request, per worker.

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

Optional. By default the Actor connects directly and moves to Apify Proxy on its own if Yahoo rate-limits the run.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT"
  ],
  "maxScreenerResults": 25,
  "includeProfile": true,
  "includeStatistics": true,
  "includeAnalyst": true,
  "includeHistory": true,
  "historyRange": "1y",
  "historyInterval": "1d",
  "historyAsRows": false,
  "includeFinancials": false,
  "includeNews": false,
  "maxNewsPerSymbol": 10,
  "includeOptions": false,
  "maxOptionExpirations": 1,
  "optionsAsRows": false,
  "maxConcurrency": 5,
  "requestDelaySeconds": 0
}
```

# 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 = {
    "symbols": [
        "AAPL",
        "MSFT"
    ]
};

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

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

```

## MCP server setup

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