Yahoo Finance API

Finance / No Auth Required Intermediate HTTPS
Free to Use ~2,000 calls/hour (internal endpoints, IP-based, unofficial)
61 C
Measured Score 0 50 100 Speed 26/30 Consistency 13/20 Security 18/20 Browser access 0/15 Transparency 4/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://query1.finance.yahoo.com/v8/finance/chart/AAPL?interval=1d&range=5d
Result
HTTP 200 · application/json · 1,609 bytes
Response time
41 ms (median of 3) · fastest 34 ms
Transport
TLSv1.3 · TLS_AES_128_GCM_SHA256 · certificate issued by DigiCert Inc
Browser CORS
No Access-Control-Allow-Origin header — call it from a server, not the browser
Served by
ATS
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
chart object {2 fields}

Captured Response

Captured from a real request to https://query1.finance.yahoo.com/v8/finance/chart/AAPL?interval=1d&range=5d on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "chart": {
    "result": [
      {
        "…": "(3 more fields)"
      }
    ],
    "error": null
  }
}

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
// 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.

How This API Fails

We deliberately sent this API a broken request and recorded exactly what came back on 2026-08-10. Knowing the shape of an error before you hit it makes error handling much easier to write.

HTTP 404 Requesting a path that does not exist text/html

Returned an HTML error page rather than JSON — worth knowing if your client assumes every response can be parsed as JSON.

HTTP 400 Sending an invalid value for "interval" application/json
{
  "chart": {
    "result": null,
    "error": {
      "code": "Bad Request",
      "description": "Invalid input - interval=!!!invalid!!! is not supported. Valid intervals: [1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 4h, 1d, 5d, 1wk, 1mo, 3mo]"
    }
  }
}

Common Errors & Troubleshooting

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

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.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 26/30
Consistency 13/20
Security 18/20
Browser access 0/15
Transparency 4/15
Endpoint Response Time 41ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Endpoint last called: 2026-08-10

Similar APIs

View All →