Yahoo Finance API

Finance / No Auth Required Intermediate HTTPS
Free to Use ~2,000 calls/hour (internal endpoints, IP-based, unofficial)

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

Symbol
Current Price
Currency
coin price in USD/EUR
market capitalization
24h price change

Example Response

JSON 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

401 or 403 Unauthorized Yahoo occasionally requires specific cookies or headers that change without notice.
Use the yfinance library (pip install yfinance) which manages headers automatically, or rotate your User-Agent string.
Empty or null result for a valid ticker The ticker symbol format may be wrong for non-US stocks (e.g., missing .L suffix for London stocks).
Append the exchange suffix to the symbol (e.g., HSBA.L for London, 7203.T for Tokyo).
Too Many Requests / rate limited Sending too many requests in a short window triggers Yahoo's rate limiter.
Add a 1-2 second sleep between requests and cache responses locally for at least 15 minutes.

Matrix Score Breakdown

🌐 Reachability 15/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 15/15
Response Time 497ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →