Yahoo Finance Chart API
Free Yahoo Finance chart endpoint with no key: stock quotes, historical OHLC prices and volume for equities, ETFs, indices and currencies. Tested example.
Endpoint tested and returned HTTP 200 on 20 Aug 2026
What is the Yahoo Finance Chart API?
The Yahoo Finance chart endpoint is a free, key-free API returning stock market data — current quotes, historical open/high/low/close prices, volume and metadata — for equities, ETFs, indices, currencies and commodities.
Free stock market data is genuinely scarce; nearly every provider gates it behind registration and tight quotas. This Yahoo endpoint remains publicly accessible and covers global equities, ETFs, indices, forex and crypto.
It is undocumented and unsupported, which is the honest caveat. Yahoo has changed and restricted these endpoints before, and it requires a browser-like User-Agent to respond at all. Treat it as convenient rather than dependable, and do not build anything critical on it without a fallback.
Quick facts
- Base URL
https://query1.finance.yahoo.com/v8/finance/chart- Authentication
- No API key, but a browser-like User-Agent header is required or requests are rejected.
- Rate limit
- Not published. Aggressive use gets IP-blocked.
- Pricing
- Free but unofficial. Yahoo's terms restrict redistribution — check before commercial use.
- CORS
- Not enabled — call it from your server
- Official docs
- Read the docs
How to use the Yahoo Finance Chart API
Every request below was executed against the live API on 20 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch stock price data
GET https://query1.finance.yahoo.com/v8/finance/chart/AAPL?range=1d&interval=1d
curl 'https://query1.finance.yahoo.com/v8/finance/chart/AAPL?range=1d&interval=1d' \
-H 'User-Agent: Mozilla/5.0'const res = await fetch("https://query1.finance.yahoo.com/v8/finance/chart/AAPL?range=1d&interval=1d", {
headers: {
"User-Agent": "Mozilla/5.0",
},
});
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
headers = {
"User-Agent": "Mozilla/5.0",
}
res = requests.get("https://query1.finance.yahoo.com/v8/finance/chart/AAPL?range=1d&interval=1d", headers=headers, timeout=20)
res.raise_for_status()
print(res.json()){
"chart": {
"result": [
{
"meta": {
"currency": "USD",
"symbol": "AAPL",
"exchangeName": "NMS",
"fullExchangeName": "NasdaqGS",
"instrumentType": "EQUITY",
"firstTradeDate": 345479400,
"regularMarketTime": 1787169601,
"hasPrePostMarketData": true,
"gmtoffset": -14400,
"timezone": "EDT",
"exchangeTimezoneName": "America/New_York",
"regularMarketPrice": 316.83,
"fiftyTwoWeekHigh": 344.57,
"fiftyTwoWeekLow": 223.78,
"regularMarketDayHigh": 319.28,
"regularMarketDayLow": 309.6,
"regularMarketVolume": 50009121,
"longName": "Apple Inc.",
"shortName": "Apple Inc.",
"chartPreviousClose": 310.03,
"priceHint": 2,
"currentTradingPeriod": {
"pre": {
"timezone": "EDT",
"start": 1787126400,
"end": 1787146200,
"gmtoffset": -14400
},
"regular": {
"timezone": "EDT",
"start": 1787146200,
"end": 1787169600,
"gmtoffset": -14400
},
"post": {
"timezone": "EDT",
"start": 1787169600,
"end": 1787184000,
"gmtoffset": -14400
}
},
"dataGranularity": "1d",
"range": "1d",
"validRanges": [
"1d",
"5d",
"1mo",
"3mo",
"6mo",Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
<symbol> | path | Required | Ticker symbol. AAPL |
range | string | Optional | 1d, 5d, 1mo, 3mo, 6mo, 1y, 5y, max. 1mo |
interval | string | Optional | 1m, 5m, 1h, 1d, 1wk, 1mo. 1d |
User-Agent | header | Required | Browser-like UA — required. Mozilla/5.0 |
Response fields
chart.result[].meta.symbolstring- The ticker returned.
chart.result[].meta.regularMarketPricenumber- Current or most recent price.
chart.result[].meta.currencystring- Trading currency.
chart.result[].timestamparray- Unix timestamps for each data point.
chart.result[].indicators.quote[0]object- Parallel arrays of open, high, low, close and volume.
chart.errorobject|null- Error detail when the request fails.
What you can build with the Yahoo Finance Chart API
- Display stock prices on a portfolio dashboard
- Chart historical price data for analysis
- Track index and ETF performance
- Prototype financial tools before paying for market data
Common errors and how to fix them
401 or 429 without a browser User-Agent
Yahoo rejects default HTTP client user agents.
Fix: Send a browser-like User-Agent header; without it the endpoint refuses to respond.
Parallel arrays are confusing
Timestamps and OHLC values are separate arrays.
Fix: Zip them by index — timestamp[i] corresponds to quote[0].close[i].
Nulls inside the price arrays
Gaps occur on non-trading periods.
Fix: Filter nulls before charting rather than plotting them as zero.
Yahoo Finance Chart API — frequently asked questions
Is the Yahoo Finance API official?
No. These endpoints are undocumented and unsupported. They work today and are widely used, but Yahoo has restricted them before — do not build anything critical on this without a fallback.
Why do my requests get rejected?
Yahoo blocks default HTTP client user agents. Send a browser-like User-Agent header and the endpoint responds normally.
How is the price data structured?
As parallel arrays: `timestamp` alongside separate open, high, low, close and volume arrays. Zip them by index to reconstruct candles.
Can I use this commercially?
Be careful. Yahoo's terms restrict redistribution of market data. For a commercial product, use a licensed market data provider.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Percentage Calculator
Calculate what X% of a number is, what percent one number is of another, and percentage increase or decrease between two values — instantly and free.
Timestamp Converter
Convert timestamps to human-readable dates and dates back to timestamps. Auto-detects seconds vs milliseconds, shows local, UTC and ISO 8601 formats.
Alternatives to Yahoo Finance Chart API
If Yahoo Finance Chart does not fit, these finance & crypto apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| CoinGecko | Free cryptocurrency price API covering 10,000+ coins. Live prices, market cap and volume in any currency, no API key on the public tier. Tested curl example. | No key | Yes | 19 Aug 2026 |
| Binance Public API | Binance public market data API needs no API key: live ticker prices, order books, klines and 24h stats for every trading pair. Tested curl example and response. | No key | Yes | 19 Aug 2026 |
| Coinbase Exchange Rates | Coinbase public exchange rates API with no key: convert any cryptocurrency to 100+ fiat currencies in a single request. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| Frankfurter | Free currency exchange rate API with no key, built on European Central Bank data. Latest and historical rates, time series and conversion. Tested curl example. | No key | Yes | 19 Aug 2026 |
| aWATTar Market Data | Free aWATTar API with no key: hourly German and Austrian day-ahead electricity market prices in EUR/MWh, published as soon as the exchange releases them. Tested example. | No key | Yes | 21 Aug 2026 |
| AwesomeAPI Economia | Free Brazilian currency API with no key: real-time bid and ask for USD-BRL, EUR-BRL, crypto and 150+ pairs, plus daily history. Tested curl example and live response. | No key | Yes | 21 Aug 2026 |
Yahoo Finance Chart is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 20 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.