# Yahoo Finance Scraper (`scrapesmith/yahoo-finance-scraper`) Actor

🔥$0.35/1000 results🔥Cheapest Yahoo Finance scraper. Extract stock quotes, historical prices, financials, earnings, analyst recommendations, holders, dividends, news. 9 modes, 100+ fields. JSON/CSV/Excel. API, MCP, webhook, AI-agent ready.

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

## Pricing

from $0.29 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## 📈 Yahoo Finance Scraper — Real-Time Stock Data API (2026)

**The cheapest, most flexible Yahoo Finance scraper on Apify.** Pull live stock quotes, historical price charts, earnings, analyst recommendations, institutional holders, dividends & splits, breaking financial news, and ticker search — all in structured JSON, CSV, or Excel, ready for Google Sheets, Python, Excel, BI dashboards, or your own trading app. No API keys. No accounts. No scraping know-how required. Just pick a mode, drop in your tickers, and go. 🚀

Whether you're building a **stock price scraper**, a **financial data API** for your app, a portfolio tracker, a trading bot's data feed, or an AI agent that needs live market data, this actor is built to be the fastest and most affordable way to get clean Yahoo Finance data at any scale — from a single ticker lookup to thousands of symbols in one run.

***

### 💡 Why This Yahoo Finance Scraper

- 💸 **Pay for what you use, not what you don't.** Most competing Yahoo Finance scrapers cram *everything* — quote, history, earnings, holders, dividends, news — into one giant bloated record per ticker, and charge you for all of it whether you need it or not. This actor is **mode-based**: pick exactly the data you want (quote, chart, earnings, holders, recommendations, dividends, search, or news) and you only pay for the rows you actually get. No more paying for a 300-field monster object when all you wanted was today's price.
- 🎯 **8 dedicated extraction modes** — each one purpose-built and independently priced, instead of one bloated "everything" mode.
- 🔢 **100+ fields on Quote mode alone** — one of the deepest single-ticker snapshots available on the Apify store: live pricing, pre/post-market, valuation ratios, 52-week stats, dividends, share statistics, full company profile, financial health metrics, analyst targets, and governance/risk scores.
- 🌍 **Every asset class Yahoo Finance covers** — common stocks, ETFs, mutual funds, market indices, forex pairs, and cryptocurrencies. If Yahoo Finance has a ticker page for it, this actor can pull it.
- ⚡ **Built for both quick lookups and serious bulk jobs** — check one ticker in seconds, or queue up hundreds of symbols for a scheduled daily pull. Same actor, same reliability, no separate "bulk mode" to configure.
- 🧩 **Zero setup** — no login, no API key, no cookies to manage, no configuration files. Paste tickers, hit run.
- 🗂️ **Clean, analysis-ready output** — every record is flat, typed, and zero-null (numbers default to `0`, text defaults to `""`), so it drops straight into a spreadsheet, a Pandas DataFrame, or a SQL table without any cleanup step.
- 🔄 **Resumable runs** — if a run is interrupted or migrated, it picks back up where it left off instead of re-billing you for tickers it already finished.

***

### 🧭 The 8 Modes Explained

| Mode | What You Get | Output Shape |
|------|--------------|--------------|
| 📊 **Quote** | Current price, pre/post-market, valuation ratios, 52-week range, dividends, share stats, full company profile, financial health, analyst targets, governance risk | 1 record per symbol, 100+ fields |
| 🕯️ **Chart** | Historical OHLCV candles with adjustable date range and interval | 1 record per candle |
| 📅 **Earnings** | Quarterly EPS actual vs. estimate, yearly/quarterly revenue & earnings, upcoming earnings date + estimates, forward-looking analyst earnings trend | Multiple records per symbol |
| 🏦 **Holders** | Institutional holders, mutual fund holders, insider holders, insider buy/sell transactions, and the overall ownership breakdown | Multiple records per symbol |
| 🎯 **Recommendations** | Analyst ratings trend (strong buy → strong sell counts) and full upgrade/downgrade history by firm | Multiple records per symbol |
| 💰 **Dividends** | Complete dividend payout history and stock split history | 1 record per event |
| 📰 **News** | Latest headlines and articles related to a ticker or search term | 1 record per article |
| 🔎 **Search** | Symbol and company name lookup across every exchange Yahoo Finance indexes | 1 record per match |

Every mode is switched with a single `mode` input field — no separate actors, no separate pricing plans to juggle.

***

### 📊 Mode 1: Quote — Live Stock Price & Company Snapshot

The flagship mode. One call returns a **105-field** snapshot of a ticker: real-time price action, valuation, dividends, ownership, company profile, financial health, and Wall Street analyst targets.

| Field | Description |
|---|---|
| `symbol`, `shortName`, `longName` | Ticker and company name |
| `quoteType`, `exchange`, `exchangeName`, `currency`, `marketState` | Instrument type, listing exchange, currency, open/closed state |
| `regularMarketPrice`, `regularMarketChange`, `regularMarketChangePercent` | Live price and change |
| `regularMarketDayHigh`, `regularMarketDayLow`, `regularMarketVolume`, `regularMarketOpen`, `regularMarketPreviousClose`, `regularMarketTime` | Today's trading range and volume |
| `preMarketPrice`, `preMarketChange`, `preMarketChangePercent` | Pre-market price action |
| `postMarketPrice`, `postMarketChange`, `postMarketChangePercent` | After-hours price action |
| `marketCap`, `enterpriseValue` | Company valuation |
| `trailingPE`, `forwardPE`, `pegRatio`, `priceToBook`, `priceToSalesTrailing12Months`, `bookValue`, `trailingEps`, `forwardEps` | Valuation & earnings ratios |
| `fiftyTwoWeekHigh`, `fiftyTwoWeekLow`, `fiftyDayAverage`, `twoHundredDayAverage`, `fiftyTwoWeekChange`, `sandP52WeekChange` | 52-week range & moving averages |
| `averageVolume`, `averageVolume10days` | Trading volume averages |
| `dividendRate`, `dividendYield`, `exDividendDate`, `payoutRatio`, `fiveYearAvgDividendYield`, `trailingAnnualDividendRate`, `trailingAnnualDividendYield`, `lastDividendValue`, `lastDividendDate` | Dividend profile |
| `beta` | Volatility vs. market |
| `bid`, `ask`, `bidSize`, `askSize` | Order book snapshot |
| `sharesOutstanding`, `floatShares`, `sharesShort`, `shortRatio`, `shortPercentOfFloat`, `heldPercentInsiders`, `heldPercentInstitutions` | Share structure & short interest |
| `sector`, `industry`, `country`, `city`, `state`, `website`, `phone`, `fullTimeEmployees`, `longBusinessSummary` | Company profile |
| `totalRevenue`, `revenuePerShare`, `revenueGrowth`, `grossProfits`, `grossMargins`, `operatingMargins`, `profitMargins`, `ebitda`, `ebitdaMargins`, `totalDebt`, `totalCash`, `totalCashPerShare`, `debtToEquity`, `returnOnAssets`, `returnOnEquity`, `freeCashflow`, `operatingCashflow`, `earningsGrowth`, `earningsQuarterlyGrowth`, `currentRatio`, `quickRatio` | Financial health metrics |
| `targetMeanPrice`, `targetHighPrice`, `targetLowPrice`, `targetMedianPrice`, `numberOfAnalystOpinions`, `recommendationKey`, `recommendationMean` | Analyst price targets & consensus |
| `auditRisk`, `boardRisk`, `compensationRisk`, `shareHolderRightsRisk`, `overallRisk` | Governance risk scores |
| `scrapedAt` | Timestamp of extraction |

**Real example (AAPL, live):**

```json
{
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "regularMarketPrice": 341.395,
  "regularMarketChangePercent": 0.0038667447,
  "marketCap": 5014189768704,
  "trailingPE": 41.331112,
  "dividendYield": 0.0032,
  "sector": "Technology",
  "industry": "Consumer Electronics",
  "fiftyTwoWeekHigh": 343.67,
  "beta": 1.097,
  "totalRevenue": 451442016256,
  "returnOnEquity": 1.4147099,
  "targetMeanPrice": 319.71722,
  "recommendationKey": "buy",
  "fullTimeEmployees": 166000,
  "scrapedAt": "2026-07-29T16:29:13.000Z"
}
```

***

### 🕯️ Mode 2: Chart — Historical Stock Price Data (OHLCV)

Perfect for backtesting, technical indicators, and price charting. Choose any range from 1 day to full history, at intervals from 1 minute up to 3 months.

| Field | Description |
|---|---|
| `symbol` | Ticker symbol |
| `date` | Candle timestamp (ISO 8601) |
| `open`, `high`, `low`, `close` | OHLC prices for the period |
| `adjClose` | Dividend/split-adjusted close |
| `volume` | Shares traded |
| `currency` | Listing currency |
| `scrapedAt` | Extraction timestamp |

**Real example:**

```json
{
  "symbol": "AAPL",
  "date": "2026-07-24T13:30:00.000Z",
  "open": 321.79,
  "high": 334.37,
  "low": 321.62,
  "close": 333.02,
  "adjClose": 333.02,
  "volume": 47489400,
  "currency": "USD"
}
```

***

### 📅 Mode 3: Earnings — EPS, Revenue & Forward Estimates

Everything an earnings calendar and analyst-estimate tracker needs, in one mode. Returns four kinds of records per ticker, all tagged with a `type` field so you can filter easily.

| Record Type | Field | Description |
|---|---|---|
| `quarterly_eps` | `date`, `epsActual`, `epsEstimate` | Reported vs. estimated EPS per quarter |
| `financials_yearly` / `financials_quarterly` | `date`, `revenue`, `earnings` | Historical revenue and net earnings |
| `upcoming_earnings` | `date`, `earningsAverage`, `earningsHigh`, `earningsLow`, `revenueAverage`, `revenueHigh`, `revenueLow` | Next earnings date and analyst estimate range |
| `earnings_trend` | `period`, `endDate`, `epsAvg`, `epsHigh`, `epsLow`, `epsGrowth`, `revenueAvg`, `epsGrowthRate` | Forward-looking analyst EPS/revenue consensus by period (this quarter, next quarter, this year, next year) |

Every record also carries `symbol` and `scrapedAt`.

**Real example:**

```json
{
  "symbol": "TSLA",
  "type": "upcoming_earnings",
  "date": "2026-10-21T20:00:00.000Z",
  "earningsAverage": 0.45577,
  "earningsHigh": 0.6,
  "earningsLow": 0.27,
  "revenueAverage": 27481750990
}
```

***

### 🏦 Mode 4: Holders — Institutional, Insider & Fund Ownership

Who owns the stock, and are insiders buying or selling? Five record types, tagged by `holderType`.

| Holder Type | Fields | Description |
|---|---|---|
| `breakdown` | `insidersPercentHeld`, `institutionsPercentHeld`, `institutionsFloatPercentHeld`, `institutionsCount` | Overall ownership split |
| `institutional` | `name`, `shares`, `value`, `percentHeld`, `percentChange`, `reportDate` | Top institutional shareholders (funds, banks) |
| `fund` | `name`, `shares`, `value`, `percentHeld`, `percentChange`, `reportDate` | Top mutual fund shareholders |
| `insider` | `name`, `relation`, `shares`, `latestTransDate`, `transactionDescription` | Company insiders and their current stake |
| `insider_transaction` | `name`, `relation`, `shares`, `value`, `transactionText`, `startDate` | Recent insider buy/sell transactions |

Every record also carries `symbol` and `scrapedAt`.

**Real example:**

```json
{
  "symbol": "MSFT",
  "holderType": "institutional",
  "name": "Blackrock Inc.",
  "shares": 593328571,
  "value": 234750445494,
  "percentHeld": 0.0799,
  "reportDate": "2026-03-31T00:00:00.000Z"
}
```

***

### 🎯 Mode 5: Recommendations — Analyst Ratings & Upgrades

Track what Wall Street thinks. Two record types, tagged by `type`.

| Type | Fields | Description |
|---|---|---|
| `trend` | `period`, `strongBuy`, `buy`, `hold`, `sell`, `strongSell` | Analyst rating counts by month |
| `upgrade_downgrade` | `firm`, `toGrade`, `fromGrade`, `action`, `date` | Individual analyst rating change history |

Every record also carries `symbol` and `scrapedAt`.

**Real example:**

```json
{
  "symbol": "AAPL",
  "type": "upgrade_downgrade",
  "firm": "Morgan Stanley",
  "toGrade": "Overweight",
  "fromGrade": "Overweight",
  "action": "main",
  "date": "2026-07-23T17:45:07.000Z"
}
```

***

### 💰 Mode 6: Dividends — Payout & Split History

The complete corporate-action history for a ticker: every dividend ever paid, and every stock split ever executed.

| Type | Fields | Description |
|---|---|---|
| `dividend` | `date`, `amount` | Dividend payment date and per-share amount |
| `split` | `date`, `numerator`, `denominator`, `ratio` | Stock split date and ratio (e.g. `2.0:1.0`) |

Every record also carries `symbol` and `scrapedAt`.

***

### 📰 Mode 7: News — Latest Financial Headlines

Real-time news aggregation for any ticker or search term — perfect for sentiment analysis, news monitoring pipelines, or feeding an AI summarizer.

| Field | Description |
|---|---|
| `title` | Headline |
| `publisher` | News outlet |
| `link` | Article URL |
| `publishedAt` | Publish timestamp |
| `type` | Article type |
| `relatedTickers` | Tickers mentioned |
| `thumbnail` | Cover image URL |
| `uuid` | Unique article ID |
| `query` | Your search query or symbol |
| `scrapedAt` | Extraction timestamp |

***

### 🔎 Mode 8: Search — Symbol & Company Lookup

Turn a company name or partial ticker into a full list of matching symbols across every exchange Yahoo Finance covers — global listings included.

| Field | Description |
|---|---|
| `symbol` | Matched ticker |
| `shortName`, `longName` | Company name |
| `exchange` | Listing exchange |
| `quoteType` | Instrument type (equity, ETF, index, etc.) |
| `sector`, `industry` | Classification |
| `score` | Match relevance score |
| `isYahooFinance` | Whether it's a recognized Yahoo Finance instrument |
| `query` | Your search term |
| `scrapedAt` | Extraction timestamp |

***

### 👥 Who This Is For

- **Traders & investors** who want a live stock price scraper feeding their own dashboard or spreadsheet
- **Quant developers & data scientists** building backtests, factor models, or ML pipelines that need historical OHLCV data at scale
- **Fintech builders** who need a lightweight financial data API without paying for an enterprise market-data license
- **Portfolio & wealth management tools** tracking prices, dividends, and analyst sentiment across client holdings
- **News & sentiment platforms** that need a real-time financial news feed tied to tickers
- **AI agents and LLM applications** that need structured, reliable market data as a tool call
- **Academic researchers** running bulk financial data extraction across hundreds of tickers for a study
- **No-code builders** wiring stock data into Zapier, Make, n8n, Google Sheets, or Airtable

***

### 🛠️ How To Use It

1. **Pick a mode** — `quote`, `chart`, `earnings`, `holders`, `recommendations`, `dividends`, `news`, or `search`.
2. **Add your tickers** — a simple list like `AAPL`, `TSLA`, `MSFT`, `BTC-USD`, `^GSPC`, `EURUSD=X`. For search/news mode, add search terms instead.
3. **(Chart mode only)** choose a history range (1 day → max) and candle interval (1 minute → 3 months).
4. **Run it.** Results stream into the dataset in real time — export as JSON, CSV, or Excel whenever you're ready.

No proxies to configure, no cookies to paste in, no rate-limit tuning. It just works.

***

### 🤖 API, MCP & AI-Agent Integration

This actor is built to be called from anywhere, by anything:

- 🔌 **REST API** — trigger runs and pull results over plain HTTP from any language
- 🧠 **MCP server** — plug it directly into Claude, ChatGPT, or any MCP-compatible AI agent as a live financial-data tool
- 🟨 **JavaScript/TypeScript SDK** — `npm install apify-client`
- 🐍 **Python SDK** — `pip install apify-client`
- ⚡ **Zapier, Make, n8n** — drop it into a no-code automation with zero setup
- 🔔 **Webhooks** — get notified the instant a run finishes
- ⏰ **Scheduled runs** — automatic daily, hourly, or pre-market data pulls

Export to **JSON, CSV, or Excel** — ready to pipe straight into a database, BI tool, spreadsheet, or your own app's backend.

***

### ❓ Frequently Asked Questions

**What tickers and asset classes are supported?**
Anything Yahoo Finance tracks: US and international equities, ETFs, mutual funds, market indices (`^GSPC`, `^DJI`), forex pairs (`EURUSD=X`), and cryptocurrencies (`BTC-USD`, `ETH-USD`).

**Do I need a Yahoo Finance account or API key?**
No. Zero setup — no login, no API key, no authentication of any kind.

**How is this different from other Yahoo Finance scrapers?**
Most alternatives bundle every category of data — quote, history, financials, dividends, news, holders — into a single giant record per ticker, whether you need it or not, and price you for the whole bundle. This actor splits everything into 8 focused modes so **you only pull and pay for the exact data you need.** Want just today's price for 500 tickers? Run Quote mode only — you're not charged for history, holders, or news you never asked for.

**How many tickers can I process in one run?**
As many as you like — from a single symbol to hundreds in one run, with no drop-off in reliability as volume scales up.

**How fresh is the data?**
Every run pulls live from Yahoo Finance at the moment it executes — this is real-time market data, not a cached snapshot.

**Can I get historical price data going back years?**
Yes — Chart mode supports ranges up to `max`, which returns the full available price history for the ticker, at intervals from 1 minute to 3 months.

**Does this work for cryptocurrencies and forex, not just stocks?**
Yes. Yahoo Finance tracks crypto (`BTC-USD`) and forex pairs (`EURUSD=X`) the same way it tracks equities, and this actor pulls all of them through the same modes.

**Can I automate this to run on a schedule?**
Yes — use Apify's built-in scheduler to run it daily, hourly, or at market open/close, and combine it with a webhook to push fresh data to your own system automatically.

**What output formats are supported?**
JSON, CSV, and Excel (XLSX), all exportable directly from the dataset tab or via the API.

**Is there a free tier to try it out?**
Yes — every mode can be tested for free up to a small result cap before you need to pay, so you can verify the data quality before committing to a bulk run.

***

### 🔑 Keywords

Yahoo Finance scraper, stock data scraper, stock price scraper, financial data API, stock market API, real-time stock quotes, historical stock prices, OHLCV data scraper, stock market scraper, dividend history scraper, earnings data scraper, analyst ratings scraper, institutional holders data, insider trading data, stock news scraper, ticker symbol lookup, crypto price scraper, forex data scraper, stock screener data, fundamental analysis data, Apify Yahoo Finance, financial data extraction, stock market data API, AI agent stock data, MCP finance tool, trading bot data feed, portfolio tracking API, market research data, quantitative finance data, stock backtest data.

# Actor input Schema

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

Stock ticker symbols to scrape (e.g. AAPL, TSLA, MSFT, BTC-USD, ^GSPC). Used for all modes except search.

## `queries` (type: `array`):

Search terms for search and news modes. If empty in news mode, symbols are used instead.

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

Type of data to extract from Yahoo Finance.

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

Maximum number of result rows to return. Leave empty for no limit (subject to plan cap).

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

Time range for chart mode. Ignored in other modes.

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

Candle interval for chart mode. Ignored in other modes.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "TSLA",
    "MSFT"
  ],
  "mode": "quote",
  "historyRange": "1mo",
  "historyInterval": "1d"
}
```

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

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

# Run the Actor and wait for it to finish
run = client.actor("scrapesmith/yahoo-finance-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "TSLA",
    "MSFT"
  ]
}' |
apify call scrapesmith/yahoo-finance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesmith/yahoo-finance-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/guYqdnZszCYUeLibr/builds/mcMjZEdXwrqQUuCWo/openapi.json
