Yahoo Finance API
Overview
Yahoo Finance provides unofficial access to stock quotes, historical prices, currency exchange rates, and cryptocurrency data through community-maintained libraries and endpoints. There has been no official public API since 2017, but many developers use wrapper libraries like yfinance (Python) to pull this data reliably. Be aware that the underlying endpoints can change without notice, so build in error handling.
Beginner Tip
Use the yfinance Python library instead of calling Yahoo Finance endpoints directly — it handles authentication headers and URL changes automatically.
Available Data
Example Response
{
"id": "bitcoin",
"symbol": "btc",
"current_price": 65432.1,
"market_cap": 1280000000000,
"price_change_24h": 1250.5,
"price_change_percentage_24h": 1.95,
"total_volume": 28500000000
} Field Reference
symbol The ticker symbol you requested. regularMarketPrice Current or most recent market price of the stock. regularMarketChangePercent Percentage price change since the previous market close. timestamp List of Unix timestamps corresponding to each data point in the chart. close Closing prices matching each timestamp in the chart series. Implementation Example
// Using unofficial internal endpoint (no guarantees)
const symbol = "AAPL";
const url = `https://query1.finance.yahoo.com/v8/finance/chart/${symbol}?interval=1d&range=5d`;
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
const meta = data.chart.result[0].meta;
console.log(`Symbol: ${meta.symbol}`);
console.log(`Current Price: $${meta.regularMarketPrice}`);
console.log(`Currency: ${meta.currency}`);
console.log("⚠️ Warning: This is an unofficial endpoint and may break without notice"); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Similar APIs
View All →Alpha Vantage
⭐ Beginner's PickAlpha Vantage delivers free real-time and historical stock, forex, and cryptocurrency data through a simple REST API.
Polygon
Polygon.io is a comprehensive market data API providing real-time and historical stock, forex, and cryptocurrency data.
IEX Cloud
IEX Cloud provides programmatic access to realtime & historical stock and market data via REST API.
Finnhub
⭐ Beginner's PickFinnhub is a popular financial API offering real-time stock quotes, company fundamentals, news, forex rates, and cryptocurrency data through both REST and WebSocket connections.
Twelve Data
⭐ Beginner's PickTwelve Data provides real-time and historical stock, forex, cryptocurrency, and ETF market data through a clean and well-documented REST API.