API Directory › 💵 Finance & Stocks › Yahoo Finance (unofficial)
No authHTTPS

Yahoo Finance (unofficial) API

Widely-used community endpoints for Yahoo stock quotes and historical data.

Auth
No auth needed
HTTPS
Yes
CORS
No
Open Yahoo Finance (unofficial) docs ↗

What it does

There is no official public Yahoo Finance API (the last one was retired in 2017). ‘Yahoo Finance API’ refers to the undocumented JSON endpoints behind finance.yahoo.com — query1.finance.yahoo.com/v8/finance/chart/{symbol}, /v7/finance/quote, /v10/finance/quoteSummary/{symbol} — used by libraries like yfinance.

Base URL

https://query1.finance.yahoo.com

Authentication

No key. Some endpoints (notably /v7/finance/quote) now require a crumb token plus a matching cookie obtained by first loading a Yahoo page. This changes without notice — a maintained wrapper library is the practical way to keep up.

Code examples

curl (chart endpoint, usually crumb-free)
curl -s "https://query1.finance.yahoo.com/v8/finance/chart/AAPL?range=5d&interval=1d" \
  -H "User-Agent: Mozilla/5.0"
Python (use a library that handles crumbs/cookies)
import yfinance as yf

aapl = yf.Ticker("AAPL")
hist = aapl.history(period="5d")
print(hist["Close"])

Rate limits & quotas

Undocumented and actively rate-limited — heavy scraping gets HTTP 429 and IP throttling, and the endpoints, required headers and response shapes have all changed multiple times. There is no support channel and no SLA. Yahoo’s terms do not authorise programmatic use.

Key response fields

chart.result[0].meta.regularMarketPriceLatest price (v8 chart endpoint)
chart.result[0].timestamp[] + indicators.quote[0]OHLCV arrays for the range
quoteResponse.result[]Quote objects (v7, needs crumb+cookie)
quoteSummary.result[0]Modules: financialData, summaryDetail, defaultKeyStatistics…

Common errors

401 / "Invalid Crumb"Missing or stale crumb/cookie pair — refetch both.
429Rate limited — slow right down; consider a real data provider.
404Unknown symbol, or the endpoint/version was changed or removed.
(schema drift)Fields disappear or move between undocumented revisions — code defensively.

When to use it (and alternatives)

Acceptable for personal research, notebooks and quick scripts where an occasional break is fine — and then only through a maintained library (yfinance, yahoo-finance2). For anything you ship, use a real API with terms and support: Twelve Data, Finnhub, Polygon.io or Alpha Vantage.

FAQ

Is there a real Yahoo Finance API?

Not a public one. Yahoo shut down its official API in 2017. Everything since is reverse-engineered from the website’s internal calls.

Why does my code work one week and break the next?

Because you are depending on private endpoints Yahoo can and does change — new crumb requirements, renamed fields, moved paths. Pin a wrapper library and expect to update it.

Can I use it in a commercial product?

No — it is neither authorised by Yahoo’s terms nor reliable enough. License data from a provider that sells it.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

Currency ConverterROI Calculator

Related Finance & Stocks APIs

← Back

More Finance & Stocks APIs · All 196 APIs