To scrape Yahoo Finance, give a scraper a list of tickers and let it collect what Yahoo Finance shows for each one: the live quote, company profile, price history, income statement, balance sheet, cash flow, dividends, analyst ratings, holders, options and earnings dates. On Scrape.ly that's one Actor and one row per ticker at $0.54 per 1,000 tickers, with no Yahoo account, API key or proxy to manage.
This guide covers the data you get, the no-code steps, the same job in curl, Python, Node.js and through an AI agent, and a real run from 26 October 2026 for Apple, Alphabet and Microsoft, with the log and the exact cost.
What data you can get from Yahoo Finance
The Yahoo Finance Scraper saves one dataset item per ticker, holding up to 15 data blocks you pick in dataSections:
| Block | What it holds |
|---|---|
| Top-level fields | ticker, name, quote_type, sector, industry, exchange, currency, current_price, change_percent, market_cap |
stock_info | Profile and key stats: P/E, forward P/E, EPS, beta, dividend yield (in %), 52-week range, moving averages, analyst target, employees, business summary |
price_info | Price, previous close, change, market state, pre- and post-market price, quote time |
history | OHLCV candles with adjusted close, from 1-minute to 3-month intervals |
financials | Income statement, balance sheet and cash flow, annual and/or quarterly |
dividends, splits | Full dividend and split history |
recommendations | Analyst strong-buy to strong-sell counts, month by month |
holders | Major holders plus top institutional and mutual-fund holders |
options | Calls and puts with bid, ask, volume, open interest and implied volatility |
earnings, calendar, key_statistics | Earnings data, next earnings date with estimates, and extended statistics |
news | Latest headlines with summary and publisher |
insiders, fund | Insider holders and transactions; ETF and fund top holdings |
It works for US and international stocks (SAP.DE, 7203.T), ETFs, mutual funds, crypto (BTC-USD), forex (EURUSD=X), indices (^GSPC) and futures (GC=F). Blocks Yahoo doesn't publish for an instrument, such as financial statements for a currency pair, come back as empty lists or nulls.
How to scrape Yahoo Finance without code
- Open the Actor's page in the Scrape.ly Store.
- Pick the preset Apple, Google and Microsoft data. "Try this input" loads it in the console. This is the exact input of our run:
{
"tickers": ["AAPL", "GOOG", "MSFT"],
"startDate": "2025-01-01",
"endDate": "2025-06-30",
"maxItems": 15,
"dataSections": ["profile", "price", "history", "financials", "dividends", "splits", "news",
"recommendations", "holders", "options", "earnings", "statistics", "calendar", "fund"],
"historyRange": "1y",
"historyInterval": "1d",
"includePrePost": false,
"financialsPeriod": "annual",
"newsCount": 5,
"optionsExpirations": 1,
"screenerLimit": 5
}- Swap in your own tickers and click Start. Three tickers with every block took under 9 seconds.
- Open the Overview view for the headline numbers, or export JSON, CSV, Excel or HTML for the full records.
The fields that matter most:
tickers: symbols, company names (tesla), ISINs or Yahoo Finance quote URLs. One result per ticker.dataSections: the blocks to collect. Fewer blocks make the run faster and the records smaller.startDate,endDate,historyRange,historyInterval: the price-history window and candle size. A start date overrides the range.financialsPeriod:annual,quarterlyorboth. The quarterly financials preset pairs quarterly statements with intraday prices.screeners: add tickers from Yahoo's screeners, such asmost_activesorday_gainers, capped byscreenerLimit.
Scrape Yahoo Finance with the API
Create a token under Settings → API & Integrations in the dashboard and export it as SCRAPELY_TOKEN. A few tickers finish in seconds, so the synchronous endpoint can return the records in one call:
curl -X POST "https://api.scrape.ly/v2/actors/querystone~yahoo-finance-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer $SCRAPELY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"tickers": ["AAPL", "GOOG", "MSFT"], "dataSections": ["profile", "price", "financials", "recommendations", "calendar"]}'The call waits up to 45 seconds and returns a JSON array. The Actor handles roughly 4 tickers per second with all blocks, so a list of hundreds can pass 45 seconds. Then the call answers 408 while the run keeps going; don't call again. Start large runs with POST /v2/actors/querystone~yahoo-finance-scraper/runs, poll /v2/actor-runs/RUN_ID?waitForFinish=60, and read /v2/actor-runs/RUN_ID/dataset/items. The Actors API docs show the full flow.
Python (pip install scrapely-client-python). This script builds a small valuation screen and writes each ticker's daily closes to a CSV:
import csv
import os
from scrapely_client import ScrapelyClient
client = ScrapelyClient(os.environ["SCRAPELY_TOKEN"], api_url="https://api.scrape.ly")
run = client.actor("querystone/yahoo-finance-scraper").call(
run_input={
"tickers": ["AAPL", "GOOG", "MSFT"],
"dataSections": ["profile", "price", "history", "financials"],
"historyRange": "6mo",
"historyInterval": "1d",
}
)
for t in client.dataset(run.default_dataset_id).iterate_items():
info = t["stock_info"]
upside = info["target_mean_price"] / t["current_price"] - 1
print(f'{t["ticker"]:5} ${t["current_price"]:>8.2f} P/E {info["pe_ratio"]:5.1f} '
f'target ${info["target_mean_price"]:.2f} ({upside:+.1%})')
with open(f'{t["ticker"]}-daily.csv', "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=["date", "open", "high", "low", "close", "adj_close", "volume"])
writer.writeheader()
writer.writerows(t["history"]["data"])Node.js (npm install scrapely-client):
import { ScrapelyClient } from 'scrapely-client';
const client = new ScrapelyClient({ token: process.env.SCRAPELY_TOKEN, baseUrl: 'https://api.scrape.ly' });
const run = await client.actor('querystone/yahoo-finance-scraper').call({
tickers: ['AAPL', 'GOOG', 'MSFT'],
dataSections: ['profile', 'price', 'recommendations'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((t) => [t.ticker, t.current_price, t.market_cap, t.stock_info.recommendation_key]));The Python client docs cover the rest; the JavaScript client works the same way. If you came looking for an endpoint rather than a scraper, our Yahoo Finance API page presents the same Actor as an API product.
With an AI agent (MCP)
Scrape.ly runs a hosted MCP server at https://mcp.scrape.ly. In Cursor, add it to ~/.cursor/mcp.json:
{
"mcpServers": {
"scrapely": {
"url": "https://mcp.scrape.ly",
"headers": { "Authorization": "Bearer YOUR_TOKEN" }
}
}
}In Claude Code, run claude mcp add --transport http scrapely https://mcp.scrape.ly and sign in with /mcp. Add ?actors=querystone/yahoo-finance-scraper to the URL to expose only this tool. Then ask: "Use scrapely to get Yahoo Finance data for NVDA, AMD and INTC with profile, price and financials, and compare their P/E, revenue and net margin in a table." The agent calls call-actor and get-actor-output; our run below was started the same way. The MCP docs list the other clients.
A real run: Apple, Alphabet and Microsoft
We ran the preset on 26 October 2026 at 14:25 UTC, during US market hours. It saved 3 tickers with all 14 selected blocks in 8.8 seconds, and its list price was $0.0016. The Overview view:
| Ticker | Name | Sector | Exchange | Price | Change | Market cap |
|---|---|---|---|---|---|---|
| AAPL | Apple Inc. | Technology | NasdaqGS | $345.25 | −0.71% | $5.04T |
| MSFT | Microsoft Corporation | Technology | NasdaqGS | $527.11 | +0.50% | $3.91T |
| GOOG | Alphabet Inc. | Communication Services | NasdaqGS | $316.90 | −0.12% | $3.88T |
And a few fundamentals from the same records:
| Ticker | P/E | Fwd P/E | Analyst target | Fiscal year | Revenue | Net income | Buy / Hold / Sell | Next earnings |
|---|---|---|---|---|---|---|---|---|
| AAPL | 39.6 | 36.1 | $329.25 | Sep 2025 | $416.2B | $112.0B | 24 / 14 / 6 | 2026-11-02 |
| MSFT | 29.4 | 22.3 | $601.73 | Jun 2026 | $331.8B | $133.7B | 54 / 3 / 0 | 2026-10-28 |
| GOOG | 15.9 | 20.6 | $422.36 | Dec 2025 | $402.8B | $132.2B | 56 / 5 / 0 | 2026-10-28 |
2026-10-26T14:25:26.225Z [Scrapely] Container started (setup 0.8 s)
2026-10-26T14:25:27.384Z [scrapely.actor] INFO [Scrapely] Initializing API storage for run 697688491f864a758
2026-10-26T14:25:27.550Z [scrapely.proxy_configuration] INFO Platform proxy access check succeeded.
2026-10-26T14:25:27.550Z [scrapely.actor] INFO [Status message]: Scraping 3 ticker(s)...
2026-10-26T14:25:33.811Z [scrapely.actor] INFO Saved 3 tickers in 6.3s, 30 requests, 0.89 MB, retries 0, codes none, slowest 5.8s (https://feeds.finance.yahoo.com/rss/2.0/headline 5.6s; https://query2.finance.yahoo.com/v1/test/getcrumb 5.7s; https://query2.finance.yahoo.com/v8/finance/chart/GOOG 5.7s).
2026-10-26T14:25:34.312Z [Scrapely] Container state: status=exited exitCode=0 oomKilled=falseWhat three records tell you:
- Apple traded above its analyst target. At $345.25 it sat 4.6% over the $329.25 mean target, while Microsoft had 14.2% to go to $601.73 and Alphabet 33.3% to $422.36. Apple also had the most cautious analysts: 6 of 44 rated it sell or strong sell; Microsoft and Alphabet had none.
- Margins differ more than size. From the latest annual income statements, Microsoft kept 40.3% of revenue as net income, Alphabet 32.8% and Apple 26.9%, though Apple had the largest revenue at $416.2 billion.
- Fiscal years don't line up. Apple's latest year ended in September 2025, Alphabet's in December 2025 and Microsoft's in June 2026. Compare by the period in each record, not by "last year".
- History follows the window you set. The preset asks for 1 January to 30 June 2025, so each record carries 122 daily candles. Over that half-year Microsoft rose 18.8% (from $418.58 to $497.41 at the close), Alphabet fell 6.9% and Apple 15.9%.
- Everything else rides along. Each record also held 5 news items, one options expiration (Apple: 49 calls and 49 puts) and full dividend histories, 92 payments for Apple going back to 1987. All three records came to about 340 KB of JSON, from 30 requests with zero retries.
We left out the names of company officers that stock_info includes; the companies, institutional holders and market data are what this sample is about.
What it costs
The Actor has one charge event: $0.000537 per ticker saved ($0.54 per 1,000), with all the blocks you select and platform usage (compute and proxy) included. Tickers that aren't found aren't charged. Prices checked on 26 October 2026.
- Our run: 3 tickers × $0.000537 = $0.0016 at list price. Our account was billed $0.0013 after its plan's 20% Store discount.
- The S&P 500, daily: about 500 tickers × $0.000537 = $0.27 per run, roughly $5.90 for a month of 22 trading days.
- A 10-ticker watchlist every 15 minutes in market hours: 26 runs × 10 tickers = 260 tickers a day, $0.14 a day.
The Free plan's $5 of monthly credit covers over 9,300 ticker records. A maximum charge per run stops a run cleanly at your cap; see pricing for plans.
What to watch out for
- Delays are Yahoo's. Data is subject to Yahoo Finance's delays: many non-US exchanges lag by 15 to 20 minutes. Check
price_info.market_stateand the quote time before you act on a price. - Intraday history is short. Yahoo keeps 1-minute candles for about 7 days, other minute intervals for about 60 days and hourly candles for about 2 years. Daily, weekly and monthly candles go back to the first trading day. Ask for more and
history_errorsays why the block is empty. - Big records get trimmed. Fifty option expirations plus minute candles can exceed the 9 MB item limit; the Actor trims the block and marks it
"truncated": true. Select only the blocks you need. - News is capped. Yahoo's feeds return at most about 50 recent articles per ticker, often about 20.
- Not every block exists for every instrument. Crypto, forex and indices have no statements, holders or options, and some small caps have no analyst coverage. You get empty values, not invented ones.
- Not included: ESG scores and the full analyst upgrade and downgrade history.
Is it legal to scrape Yahoo Finance?
The Actor reads market data Yahoo Finance shows to any visitor without signing in. Yahoo's Terms of Service are explicit, though: users agree not to "access or collect data, or attempt to access or collect data, from our Services using any automated means, devices, programs, algorithms or methodologies, including but not limited to robots, spiders, scrapers, data mining tools, or data gathering or extraction tools, for any purpose without our express, prior permission." Market data also often comes from exchanges and data vendors with their own licenses, so redistributing it, for example in a paid app, raises separate questions. Even the open-source yfinance library says it is "intended for research and educational purposes" and points users to Yahoo's terms.
Company financials and prices aren't personal data, but officer names and insider transactions are about people, which is why our sample drops them. For research and internal analysis at modest volumes, keep a record of what you collect and why. This is general information, not legal advice: if Yahoo Finance data feeds a commercial product, ask a lawyer about your case.
Why Scrape.ly for Yahoo Finance data
- One record instead of a dozen calls. Libraries like yfinance hand you a quote, a history frame and three statements from separate calls that you then join. The Actor returns all 15 blocks for a ticker in one row.
- No rate-limit babysitting. Guides such as webscraping.cc's warn that too many requests from one IP bring "429 Too Many Requests or empty payloads". The Actor brings its own datacenter proxy, so you never manage IPs; our run made 30 requests with zero retries.
- No selectors to refresh. HTML scraping is fragile here: Scrapfly's guide notes "Yahoo rotates its DOM often". The Actor reads Yahoo Finance's JSON endpoints directly, without a browser.
- Pennies at scale, ready to schedule. $0.54 per 1,000 tickers, platform usage included. Schedule it, send rows to a sheet or webhook, and combine it with filings from the SEC EDGAR Scraper, as in our guide to alternative data for investors.
FAQ
Does Yahoo Finance have an official API?
Not anymore. Yahoo shut its official finance API down in 2017, and what people call the "Yahoo Finance API" today is unofficial JSON endpoints and libraries built on them. The Actor reads those same public endpoints and returns one clean record per ticker.
Can you scrape Yahoo Finance with Python?
Yes. Install scrapely-client-python, call querystone/yahoo-finance-scraper with your tickers and iterate over the dataset, as in the valuation-screen example above. The scraping runs in the cloud, so your script needs no browser, proxy or retry logic.
How do I download historical stock prices from Yahoo Finance?
Select the history block and set startDate and endDate, or historyRange and historyInterval. Each record holds OHLCV candles with adjusted close. Daily candles go back to the first trading day; intraday ones only days to weeks.
Can I scrape Yahoo Finance financial statements?
Yes. Select financials and set financialsPeriod to annual, quarterly or both. You get the income statement, balance sheet and cash flow with every line item Yahoo reports, keyed by fiscal period end.
Can I scrape crypto, forex and indices too?
Yes. Use Yahoo's symbols: BTC-USD, EURUSD=X, ^GSPC, GC=F. Blocks that don't apply, such as financial statements for a currency pair, come back empty.
How much does it cost to scrape Yahoo Finance?
$0.000537 per ticker with every block you select, platform usage included, so $0.54 per 1,000 tickers. Our three-ticker run cost $0.0016 at list price.




