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

Extract real-time stock prices, historical OHLCV data and company fundamentals from Yahoo Finance by ticker symbol. Get quotes, market cap, P/E, EPS, 52-week range, dividends, margins, sector and more for any stock, ETF or index. No login or API key required.

- **URL**: https://apify.com/sheshinmcfly/yahoo-finance-scraper.md
- **Developed by:** [Sheshinmcfly](https://apify.com/sheshinmcfly) (community)
- **Categories:** News, Automation, Developer tools
- **Stats:** 16 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

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

**Up to 59 data points per ticker — quotes, deep fundamentals and full price history in one run.** No login, no API key, no rate-limit headaches.

Feed it a list of symbols — stocks, ETFs, indices, currencies or crypto — and get back a clean structured record per ticker: the live quote with **pre- and post-market prices**, the **50- and 200-day moving averages**, the **analyst vote broken down** (not just "buy"), insider and institutional ownership, the next earnings date, and full OHLCV candles going back as far as Yahoo has them.

| | |
|---|---|
| ⚡ **Fast** | Quotes are batched and details run in parallel — hundreds of symbols in seconds. |
| 📊 **Deep** | 31 quote fields, plus a 55-field fundamentals block with analyst rating changes, forward estimates, top institutional holders and insider trades. |
| 🌍 **Anything Yahoo lists** | Stocks, ETFs, funds, indices (`^GSPC`), FX (`EURUSD=X`), crypto (`BTC-USD`). |
| 📈 **Full history** | OHLCV from 1 day to `max`, daily / weekly / monthly candles. |
| 🛡 **Resilient** | A dead proxy or one bad symbol degrades that record — it never takes the run down. |
| 🔓 **No credentials** | Nothing to sign up for, no key to rotate. |

***

### What data does it extract?

#### 💵 Quote

**Identity**: `symbol`, `shortName`, `longName`, `currency`, `financialCurrency`, `exchange`, `exchangeTimezone`, `quoteType`, `quoteSourceName`

**Price & session**: `price`, `change`, `changePercent`, `previousClose`, `open`, `dayHigh`, `dayLow`, `volume`, `marketState`

**Extended hours**: `preMarketPrice`, `preMarketChange`, `preMarketChangePercent`, `postMarketPrice`, `postMarketChange`, `postMarketChangePercent`

**Order book**: `bid`, `ask`, `bidSize`, `askSize`

**Moving averages**: `fiftyDayAverage`, `fiftyDayAverageChangePercent`, `twoHundredDayAverage`, `twoHundredDayAverageChangePercent`

**52-week context**: `fiftyTwoWeekHigh`, `fiftyTwoWeekLow`, `fiftyTwoWeekChangePercent`, `fiftyTwoWeekHighChangePercent`, `fiftyTwoWeekLowChangePercent`

**Volume & shares**: `averageDailyVolume3Month`, `averageDailyVolume10Day`, `sharesOutstanding`

**Valuation**: `marketCap`, `trailingPE`, `forwardPE`, `priceToBook`, `bookValue`, `eps`, `epsForward`, `epsCurrentYear`

**Dividends & events**: `dividendYield`, `dividendRate`, `dividendDate`, `earningsDate`

#### 🏢 Fundamentals (optional — 55 fields)

**Company**: `sector`, `industry`, `country`, `website`, `fullTimeEmployees`

**Profitability**: `profitMargins`, `grossMargins`, `operatingMargins`, `returnOnEquity`, `returnOnAssets`

**Financials**: `totalRevenue`, `revenueGrowth`, `earningsGrowth`, `totalCash`, `totalDebt`, `debtToEquity`, `currentRatio`, `freeCashflow`, `enterpriseValue`, `beta`, `pegRatio`

**Analyst coverage**: `recommendationKey`, `numberOfAnalystOpinions`, `targetMeanPrice`, `targetHighPrice`, `targetLowPrice`, and the vote itself — `analystStrongBuy`, `analystBuy`, `analystHold`, `analystSell`, `analystStrongSell`

> A "buy" backed by 41 analysts is a different signal from one backed by 2. The breakdown is why this block exists.

**Ownership & insiders**: `insidersPercentHeld`, `institutionsPercentHeld`, `insiderBuyShares6m`, `insiderSellShares6m`, `insiderNetShares6m`

**Earnings**: `nextEarningsDate`, `isEarningsDateEstimate`, `exDividendDate`, `dividendPayDate`, `lastEpsActual`, `lastEpsEstimate`, `lastEpsSurprisePercent`

**Rating changes** — `ratingChanges`: the last 10 analyst actions, each with the firm, the grade it moved from and to, and the price target before and after.

**Forward estimates** — `estimates`: next quarter and next year, with EPS average/low/high, how many analysts contributed, expected growth and revenue estimate.

**Top institutional holders** — `topInstitutions`: the 10 largest, with percent held, share count, position value and report date.

**Insider trades** — `insiderTrades`: the 10 most recent, with the insider's name, their role, the transaction description, shares and value.

**Quarterly history** — `quarterlyEarnings` (EPS actual vs estimate and surprise %) and `quarterlyRevenue` (revenue and earnings per quarter).

#### 📉 Historical (optional)

OHLCV candles — `date`, `open`, `high`, `low`, `close`, `adjClose`, `volume` — from `1d` to `max`, at daily, weekly or monthly resolution.

> Fields come back `null` when Yahoo genuinely has no value: an ETF has no P/E, a stock that pays no dividend has no ex-date. Nothing is guessed or padded.

***

### Who uses this, and for what

| Who | What they run it for |
|---|---|
| 📈 **Quant researchers** | Pull OHLCV history and factor data across a universe, free of API quotas |
| 🤖 **Algo & bot builders** | Feed live quotes, moving averages and extended-hours prices into strategies |
| 💼 **Analysts & PMs** | Track holdings against analyst targets, earnings dates and insider flow |
| 🏗 **Fintech builders** | Back a dashboard or app without paying for a market-data vendor |
| 📰 **Finance media** | Generate market tables and earnings previews on a schedule |
| 🎓 **Students & educators** | Build coursework datasets at no cost |

***

### Quick start — copy an input and run

**Live quotes for a watchlist** (fastest, good first run)

```json
{ "symbols": ["AAPL", "MSFT", "NVDA"], "dataTypes": ["quote"] }
```

**Full fundamentals with the analyst breakdown**

```json
{ "symbols": ["AAPL", "KO"], "dataTypes": ["quote", "fundamentals"] }
```

**Five years of daily candles**

```json
{ "symbols": ["TSLA"], "dataTypes": ["historical"], "range": "5y", "interval": "1d" }
```

**Everything, for one ticker**

```json
{
  "symbols": ["NVDA"],
  "dataTypes": ["quote", "fundamentals", "historical"],
  "range": "1y",
  "interval": "1wk"
}
```

**Beyond stocks — index, FX and crypto in one run**

```json
{ "symbols": ["^GSPC", "EURUSD=X", "BTC-USD"], "dataTypes": ["quote"] }
```

***

### How to use

1. Enter one or more **ticker symbols**.
2. Pick your **data types**: `quote`, `fundamentals`, `historical` — any combination.
3. For historical, choose a **range** (`1d` → `max`) and an **interval** (`1d`, `1wk`, `1mo`).
4. Run, then export as JSON, CSV or Excel — or pull it from the Apify API.

### Agent-ready (x402)

> **Agent-ready via x402:** AI agents can run this actor directly with USDC on Base — no Apify account needed. See the [x402 protocol docs](https://docs.apify.com/platform/integrations/x402).

***

### Output example

```json
{
  "symbol": "AAPL",
  "shortName": "Apple Inc.",
  "exchange": "NasdaqGS",
  "price": 305.59,
  "changePercent": 0.42,
  "marketState": "POSTPOST",
  "postMarketPrice": 305.15,
  "bid": 303.47,
  "ask": 307.98,
  "fiftyDayAverage": 309.19,
  "twoHundredDayAverage": 280.48,
  "fiftyTwoWeekChangePercent": 32.5,
  "sharesOutstanding": 14594180000,
  "priceToBook": 41.52,
  "epsForward": 9.51,
  "dividendRate": 1.08,
  "earningsDate": "2026-10-29",
  "fundamentals": {
    "sector": "Technology",
    "recommendationKey": "buy",
    "numberOfAnalystOpinions": 41,
    "analystStrongBuy": 6, "analystBuy": 21, "analystHold": 14,
    "analystSell": 3, "analystStrongSell": 2,
    "targetMeanPrice": 305.4, "targetHighPrice": 400, "targetLowPrice": 215,
    "institutionsPercentHeld": 0.6648,
    "insidersPercentHeld": 0.0165,
    "lastEpsActual": 2.02,
    "lastEpsEstimate": 1.89,
    "lastEpsSurprisePercent": 0.0674,
    "nextEarningsDate": "2026-10-29",
    "ratingChanges": [
      { "date": "2026-08-10", "firm": "Jefferies", "fromGrade": "Hold", "toGrade": "Underperform",
        "action": "down", "priorPriceTarget": 285.56, "currentPriceTarget": 263.66 }
    ],
    "estimates": [
      { "period": "0q", "endDate": "2026-09-30", "epsAvg": 1.98, "epsLow": 1.93,
        "epsHigh": 2.07, "epsAnalysts": 28, "growth": 0.0703 }
    ],
    "topInstitutions": [
      { "organization": "Blackrock Inc.", "reportDate": "2026-06-30",
        "percentHeld": 0.0797, "shares": 1162996939 }
    ],
    "insiderTrades": [
      { "date": "2026-08-11", "insider": "NEWSTEAD JENNIFER", "relation": "General Counsel",
        "description": "Sale at price 307.75 per share.", "shares": 1439, "value": 442852 }
    ],
    "quarterlyEarnings": [
      { "quarter": "3Q2025", "epsActual": 1.85, "epsEstimate": 1.77, "surprisePercent": 4.52 }
    ]
  },
  "scrapedAt": "2026-08-18T00:00:00.000Z"
}
```

***

### Performance & cost

Quotes are fetched in batches of 50, and the per-symbol detail calls run in parallel, so a large watchlist stays fast.

| Symbols | Estimated cost |
|---|---|
| 10 | $0.05 |
| 100 | $0.50 |
| 500 | $2.50 |
| 1,000 | $5.00 |

**Pay per result — $0.005 per symbol.** The Apify Free plan includes $5 of free usage to get started.

### Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `symbols` | array | — (required) | Ticker symbols to fetch |
| `dataTypes` | array | `["quote"]` | Any of `quote`, `historical`, `fundamentals` |
| `range` | string | `1mo` | `1d`,`5d`,`1mo`,`3mo`,`6mo`,`1y`,`2y`,`5y`,`10y`,`max` |
| `interval` | string | `1d` | `1d`, `1wk`, `1mo` |
| `proxyConfiguration` | object | Apify Proxy | Datacenter is fine; Residential only if rate-limited |

### FAQ

**Do I need a Yahoo Finance API key or account?**
No. No login, no key, nothing to rotate.

**Which symbols are supported?**
Anything Yahoo Finance lists: stocks, ETFs, mutual funds, indices (`^GSPC`), currencies (`EURUSD=X`) and crypto (`BTC-USD`).

**How fresh is the price data?**
Quotes reflect Yahoo's real-time / near-real-time regular market price at the moment of the run. Outside trading hours `marketState` tells you the session, and the pre/post-market fields carry the extended-hours price.

**Can I run many tickers at once?**
Yes. Quotes go out in batches of 50 and the detail calls run in parallel, so large lists finish quickly.

**What if a symbol is invalid?**
It is saved with empty fields, so your dataset stays aligned with your input list.

**Why is a field `null`?**
Because Yahoo has no value for it — an ETF has no P/E, a non-paying stock has no ex-dividend date, and a company with no analyst coverage has no target price. Nothing is invented to fill the gap.

### Other actors you may like

- **[FinViz Stock Screener](https://apify.com/sheshinmcfly/finviz-stock-screener)** — screen the US market with 92 data points per stock.
- **[SEC EDGAR Scraper](https://apify.com/sheshinmcfly/sec-edgar-scraper)** — filings, Form 4 insider trades, XBRL financials and 13F holdings.
- **[Dividend & ETF Scraper](https://apify.com/sheshinmcfly/dividend-etf-scraper)** — dividend history, ETF holdings, expense ratio and yield.
- **[Financial Calendar Scraper](https://apify.com/sheshinmcfly/financial-calendar-scraper)** — earnings, dividends, splits and IPO calendars.
- **[Zacks Rank Stock Scraper](https://apify.com/sheshinmcfly/zacks-rank-scraper)** — Zacks Rank (1-5) plus a full quote snapshot.
- **[Congressional Stock Trades Scraper](https://apify.com/sheshinmcfly/congress-stock-trades-scraper)** — House member trades disclosed under the STOCK Act.
- **[TradingView Screener](https://apify.com/sheshinmcfly/tradingview-screener)** — screen global markets by technical and fundamental filters.

### Legal disclaimer

This actor extracts **publicly available, factual market data** and does not access any private, authenticated or personal data. Market figures (prices, volumes, ratios) are facts and are not subject to copyright. Use the data in compliance with Yahoo's terms and applicable law (including Chile's Ley 19.628 on data protection). You are responsible for how you use the extracted data; this tool is intended for research, analysis and lawful business use. Nothing here is investment advice.

### Changelog

| Version | Date | Changes |
|---|---|---|
| 1.2 | 2026-08-18 | 22 → 59 fields per ticker: pre/post-market, bid/ask, 50- and 200-day averages, shares outstanding, price-to-book, forward EPS, dividend and earnings dates; fundamentals gains the analyst vote breakdown, high/low targets, insider and institutional ownership, and last-quarter EPS surprise. Detail calls now run in parallel, and a transport failure degrades one record instead of ending the run. Adds analyst rating-change history, forward EPS/revenue estimates, top institutional holders, recent insider trades and quarterly earnings/revenue. |
| 1.1 | 2026-07-01 | x402 agent-ready support; pricing table |
| 1.0 | 2026-06-10 | Initial release — quotes, historical OHLCV and fundamentals with cookie+crumb session handling and batch quote fetching |

***

**Keywords:** yahoo finance scraper, yahoo finance api, stock data scraper, stock price api, historical stock data, company fundamentals, financial data extraction, stock market data, ticker scraper, OHLCV data, P/E ratio scraper, dividend data, equities data api, analyst ratings scraper, pre market data, insider ownership data.

# Actor input Schema

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

Stock, ETF or index ticker symbols to fetch, e.g. AAPL, MSFT, TSLA, ^GSPC, BTC-USD.

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

Which data blocks to include for each symbol.

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

Time span for historical prices (only used when 'Historical prices' is selected).

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

Candle size for historical prices (only used when 'Historical prices' is selected).

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

Apify datacenter proxies work for Yahoo Finance. Switch to Residential only if you hit rate limits.

## Actor input object example

```json
{
  "symbols": [
    "AAPL",
    "MSFT",
    "TSLA"
  ],
  "dataTypes": [
    "quote"
  ],
  "range": "1mo",
  "interval": "1d",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

All extracted symbols stored in the default dataset.

# 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",
        "TSLA"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("sheshinmcfly/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",
        "TSLA",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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