Yahoo Finance Scraper avatar

Yahoo Finance Scraper

Pricing

Pay per event

Go to Apify Store
Yahoo Finance Scraper

Yahoo Finance Scraper

Get stock quotes, price history, and financial data from Yahoo Finance. Search by ticker symbol or company name.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

6

Total users

1

Monthly active users

2 hours ago

Last modified

Categories

Share

Extract real-time stock quotes, historical price data, cryptocurrency prices, and market index data from Yahoo Finance. Search by ticker symbol or company name.

What does Yahoo Finance Scraper do?

This actor extracts financial market data from Yahoo Finance, including:

  • Stock quotes — current price, daily change, 52-week range, volume
  • Historical OHLCV data — open, high, low, close, adjusted close, and volume for any date range
  • Cryptocurrency prices — BTC-USD, ETH-USD, and all Yahoo-supported crypto pairs
  • Market indices — S&P 500 (^GSPC), Dow Jones (^DJI), NASDAQ (^IXIC), and more
  • Company name search — enter "Apple" or "Tesla" and the actor resolves the correct ticker symbol

Why use Yahoo Finance Scraper?

  • No API key required — works out of the box with no registration or authentication
  • Smart symbol resolution — enter ticker symbols (AAPL) or company names (Apple) and the actor finds the right stock
  • Configurable date ranges — from 1 day to maximum available history
  • Flexible intervals — 1-minute to monthly data points
  • Multiple asset classes — stocks, ETFs, crypto, forex, indices, and commodities
  • Structured JSON output — clean, typed data ready for analysis or integration

Use cases

  • Portfolio tracking — monitor your holdings with real-time price data
  • Price monitoring — track stock prices and get historical trends for investment decisions
  • Financial analysis — download OHLCV data for backtesting trading strategies
  • Market research — compare stock performance across sectors and time periods
  • Academic research — gather financial data for economic studies and papers
  • Crypto monitoring — track Bitcoin, Ethereum, and other cryptocurrency prices
  • Index tracking — monitor major market indices like S&P 500 and NASDAQ
  • Competitive intelligence — compare stock performance of competing companies

Input parameters

ParameterTypeDefaultDescription
tickersarrayrequiredList of ticker symbols (e.g., AAPL, MSFT) or company names (e.g., Apple, Tesla)
dateRangestring1moHistorical price data range: 1d, 5d, 1mo, 3mo, 6mo, 1y, 2y, 5y, ytd, max
intervalstring1dFrequency of data points: 1m, 5m, 15m, 1h, 1d, 1wk, 1mo
includeHistorybooleantrueInclude historical OHLCV data in the output

Supported ticker formats

  • US stocks: AAPL, MSFT, GOOGL, AMZN, TSLA
  • International stocks: 7203.T (Toyota), BABA (Alibaba)
  • Crypto: BTC-USD, ETH-USD, SOL-USD
  • Indices: ^GSPC (S&P 500), ^DJI (Dow Jones), ^IXIC (NASDAQ)
  • ETFs: SPY, QQQ, VOO
  • Forex: EURUSD=X, GBPUSD=X
  • Company names: Apple, Microsoft, Tesla (auto-resolved to ticker)

Output example

Each item in the output dataset contains:

{
"symbol": "AAPL",
"name": "Apple Inc.",
"price": 264.72,
"previousClose": 269.99,
"change": -5.27,
"changePercent": "-1.95%",
"dayHigh": 266.53,
"dayLow": 260.2,
"fiftyTwoWeekHigh": 288.62,
"fiftyTwoWeekLow": 169.21,
"volume": 41576035,
"averageVolume": null,
"marketCap": null,
"currency": "USD",
"exchange": "NasdaqGS",
"exchangeTimezone": "America/New_York",
"quoteType": "EQUITY",
"priceHistory": [
{
"date": "2026-02-03",
"open": 235.46,
"high": 238.38,
"low": 233.14,
"close": 237.37,
"adjClose": 237.37,
"volume": 47628900
}
],
"dataRange": "1mo",
"dataInterval": "1d",
"scrapedAt": "2026-03-03T07:57:26.123Z"
}

How much does it cost to scrape Yahoo Finance?

This actor uses a pay-per-event pricing model:

EventPrice
Run started$0.001
Per ticker extracted$0.003

Cost examples

ScenarioTickersCost
Single stock check1$0.004
FAANG portfolio5$0.016
S&P 500 top 2020$0.061
Large portfolio50$0.151

Platform costs (compute, storage) are additional but minimal — typically under $0.005 per run.

How to scrape Yahoo Finance stock data

  1. Open Yahoo Finance Scraper on Apify.
  2. Enter ticker symbols (e.g., AAPL, BTC-USD) or company names (e.g., Apple) in the tickers field.
  3. Select your desired date range and interval.
  4. Click Start and wait for the run to finish.
  5. Download results as JSON, CSV, or Excel from the Dataset tab.

Using the Apify API

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('automation-lab/yahoo-finance-scraper').call({
tickers: ['AAPL', 'MSFT', 'GOOGL', 'BTC-USD', '^GSPC'],
dateRange: '1mo',
interval: '1d',
includeHistory: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((stock) => {
console.log(`${stock.symbol}: $${stock.price} (${stock.changePercent})`);
});

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('automation-lab/yahoo-finance-scraper').call(run_input={
'tickers': ['AAPL', 'MSFT', 'GOOGL', 'BTC-USD', '^GSPC'],
'dateRange': '1mo',
'interval': '1d',
'includeHistory': True,
})
for stock in client.dataset(run['defaultDatasetId']).iterate_items():
print(f"{stock['symbol']}: ${stock['price']} ({stock['changePercent']})")

Integrations

Connect Yahoo Finance Scraper with your existing tools:

  • Google Sheets — automatically update spreadsheets with latest stock prices
  • Slack / Discord — send price alerts when stocks hit target levels
  • Zapier / Make — trigger workflows based on stock data changes
  • Webhooks — push data to any URL endpoint when a run completes
  • PostgreSQL / MongoDB — store historical data for long-term analysis

Tips and best practices

  • Start with daily intervals1d gives clean, reliable data. Use intraday intervals (1m, 5m) only when needed, as they have limited history (7-60 days).
  • Use ticker symbols when possible — direct symbols like AAPL are faster than company name lookups like Apple.
  • Batch your requests — it's more efficient to request 20 tickers in one run than to make 20 separate runs.
  • Historical data limits — intraday data (1m, 5m, 15m) is only available for the last 7-60 days depending on the interval.
  • Weekend/holiday data — stock markets are closed on weekends and holidays, so there will be no data points for those days. Crypto markets trade 24/7.
  • Set includeHistory: false for faster runs if you only need current prices.

Use with AI agents via MCP

Yahoo Finance Scraper is available as a tool for AI assistants via the Model Context Protocol (MCP).

Setup for Claude Code

$claude mcp add --transport http apify "https://mcp.apify.com"

Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com"
}
}
}

Example prompts

  • "Get stock price and financials for AAPL"
  • "Scrape Yahoo Finance data for these ticker symbols"
  • "Compare the 1-month price history of AAPL, MSFT, and GOOGL"

cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~yahoo-finance-scraper/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tickers": ["AAPL", "MSFT", "BTC-USD"],
"dateRange": "1mo",
"interval": "1d",
"includeHistory": true
}'

Scraping publicly available financial data from Yahoo Finance is generally considered legal. Stock quotes, historical prices, and company profiles are publicly visible to anyone with a browser. Court rulings such as hiQ Labs v. LinkedIn have affirmed that collecting publicly accessible data does not violate the Computer Fraud and Abuse Act.

Key points:

  • Only publicly available financial data is collected (stock prices, historical data, company info)
  • No login credentials or premium accounts are accessed
  • The scraper respects rate limits to minimize server impact
  • Financial data should be used responsibly — it may be delayed and should not be the sole basis for investment decisions

Always review Yahoo's Terms of Service and consult legal counsel for commercial use cases. For more details, see Apify's guide on web scraping legality.

Legality

Scraping publicly available data is generally legal according to the US Court of Appeals ruling (HiQ Labs v. LinkedIn). This actor only accesses publicly available information and does not require authentication. Always review and comply with the target website's Terms of Service before scraping. For personal data, ensure compliance with GDPR, CCPA, and other applicable privacy regulations.

FAQ

The scraper returns no data for my ticker symbol. Verify the ticker symbol is valid on Yahoo Finance by searching for it at finance.yahoo.com. International stocks may need exchange suffixes (e.g., "7203.T" for Toyota on the Tokyo Stock Exchange). Company name lookup may fail for ambiguous names -- use the exact ticker symbol instead.

Historical data only goes back a few days for intraday intervals. Yahoo Finance limits intraday data availability: 1-minute data is available for the last 7 days, 5-minute for 60 days, and 15-minute for 60 days. For longer history, use daily (1d), weekly (1wk), or monthly (1mo) intervals.

Limitations

  • Data is sourced from Yahoo Finance and subject to their availability and accuracy
  • Intraday data (1m, 5m, 15m intervals) has limited historical availability
  • Some tickers may not be available in all markets
  • Rate limits may apply for very large batches of tickers

How do you track stock price changes and get alerts when a price hits a target?

  1. Schedule a daily run in Apify Console with your target tickers.
  2. Set includeHistory: false and dateRange: "1d" for the fastest, cheapest run — you only need current price.
  3. Connect a webhook to Make or Zapier that fires when the run completes.
  4. In your workflow, filter the dataset for tickers where price is below (or above) your target threshold.
  5. Send the alert via Slack, email, or SMS.

This approach costs fractions of a cent per run (e.g., tracking 10 stocks daily costs ~$0.04/day). For intraday monitoring, reduce the schedule interval and use dateRange: "1d" with interval: "5m" for recent price movement context.

How do you download historical stock data for backtesting a trading strategy?

  1. Enter your ticker list in the tickers field (e.g., ["AAPL", "SPY", "QQQ"]).
  2. Set dateRange to max to retrieve the full available price history.
  3. Set interval to 1d for daily OHLCV data (the standard format for most backtesting frameworks).
  4. Set includeHistory: true.
  5. Export the dataset as CSV or JSON.

Each row in priceHistory contains date, open, high, low, close, adjClose, and volume — compatible with pandas DataFrames, backtrader, QuantConnect, and most Python backtesting libraries. Adjusted close (adjClose) accounts for splits and dividends, making it the correct field for return calculations.

Note: intraday intervals (1m, 5m, 15m) have limited historical availability (7–60 days). For multi-year backtests, use 1d or 1wk.

How does Yahoo Finance Scraper compare to the official Yahoo Finance API?

Yahoo Finance deprecated its official API in 2017. Since then, most developers have relied on unofficial access to Yahoo Finance's internal endpoints — which is exactly what this scraper uses. There is no approved API key program; the alternatives are:

  • This scraper — no setup, pay-per-use, handles symbol resolution and data normalization
  • yfinance (Python library) — free but requires local setup, no cloud hosting, rate-limited
  • Paid data providers (Alpha Vantage, Polygon.io, Quandl) — higher data quality and uptime guarantees, but expensive for broad coverage

For most individual developers and small teams, this scraper is the most convenient option: no API keys, no server setup, and it runs on Apify's infrastructure on a schedule.

How do you monitor cryptocurrency prices with this scraper?

Use crypto ticker symbols in the format SYMBOL-USD (e.g., BTC-USD, ETH-USD, SOL-USD). These are the same symbols Yahoo Finance uses for cryptocurrency pairs against the US dollar.

Key differences when scraping crypto vs. stocks:

  • Crypto markets run 24/7 — no gaps for weekends or holidays in the price history
  • Intraday data is available for a longer rolling window than stocks
  • The exchange field will show CCC (Crypto Currency Center) for crypto tickers
  • marketCap and averageVolume may be null depending on the specific ticker

For a crypto portfolio dashboard, schedule hourly runs with includeHistory: false to get current prices only — significantly cheaper than fetching full history on every run.

Can you get financial data for international stocks with Yahoo Finance Scraper?

Yes. Yahoo Finance covers stocks from most major global exchanges. Use the exchange suffix format:

  • Tokyo Stock Exchange: 7203.T (Toyota), 6758.T (Sony)
  • London Stock Exchange: HSBA.L (HSBC), BP.L (BP)
  • Frankfurt: BMW.DE, SAP.DE
  • Hong Kong: 0700.HK (Tencent)
  • Toronto: SHOP.TO (Shopify)

Prices are returned in the local currency of each exchange. The currency field in the output indicates which currency the price is denominated in. For cross-currency comparison, combine this scraper with the Exchange Rate Scraper to normalize everything to USD.

Other finance and data scrapers on Apify