The Yahoo Finance API is not an official product, and it has not been one since 2017. Every library calling it today is scraping undocumented endpoints that can change on a Tuesday afternoon with no changelog and no apology.
Quick Answer
There is no supported Yahoo Finance API. Yahoo retired the official version in 2017, and modern tools like yfinance read undocumented Yahoo endpoints instead, which is why your bot throws a 429 or returns empty JSON for no visible reason, as community documentation on Yahoo Finance API endpoints explains. This guide, Yahoo Finance API Alternatives | 10 Stock Data APIs Priced, lines up ten real feeds by cost, latency, and history depth. Cheapest paid starting point: EODHD from $19.99/mo. Best free-plus-execution combo: Alpaca.
Key Takeaways
- Yahoo’s official finance API shut down in 2017;
yfinanceis an unofficial Python scraper and its maintainers state it is not affiliated, endorsed, or vetted by Yahoo. - Parallel requests to the yahoo finance api trigger throttling, HTTP 429 responses, or corrupted data with no SLA, per the yfinance README warnings.
- Massive (the new name for Polygon.io after the October 30, 2025 rebrand) runs tiers from $29 to $199/mo.
- Alpaca gives IEX real-time and historical market data free, with the full SIP feed at $99/mo on its data plans.
- Real-time entitlements commonly start near the $99 to $199 monthly band, as one 2026 stock API buying guide notes.
- Options tick data is a different universe: one trader quotes $20,000 per year for top-of-book OPRA coverage.
- Licensing beats latency as a budget risk. A personal-research price can jump hard once customers see the data, which EODHD’s commercial terms spell out plainly.
Is there an official Yahoo Finance API?
No. Yahoo discontinued the official product in 2017, and what the internet still calls the yahoo finance api is a collection of undocumented URLs behind the website, described in this Yahoo Finance endpoint breakdown. It works until it doesn’t.

What people actually get from it:
- Market data retrieval: quotes, historical price data, splits, and dividends by ticker symbol.
- In-depth analysis tools: earnings dates, balance sheet information, analyst targets.
- Broader market awareness: index levels, sector moves, currency exchange rates, plus crypto pairs as a side note, never the main course.
- Flexibility and customization: you pick the date range, interval, and fields from the raw JSON.
- Programming integration: Python, Go, JavaScript wrappers, all unofficial.
Note: free access to this information is the entire appeal. One roundup of alternatives to Yahoo Finance makes the same point, and our own comparison of free stock charts across TradingView, Finviz, and Yahoo covers the charting side of the same trade-off.
Yahoo Finance API: rate limits, errors, and why bot builders leave
The yahoo finance api has no published rate limit, no API key, and no support channel, so your bot is one silent schema change away from trading on stale numbers. That is a fine deal for a notebook and a bad deal for anything with money attached.
Rate limits and restrictions
There is no documented quota. Hammer it with threads and you get throttled, as Scrapfly’s guide to Yahoo Finance scraping describes. Unofficial mirrors on RapidAPI’s Yahoo Finance listing add their own request caps on top.
Authentication and API key
No API key exists. Scrapers pass a crumb token and cookie, plus a browser user agent string containing “KHTML, like Gecko” so the request looks like Chrome. When Yahoo rotates that handshake, every library breaks at once.
Real time data vs delayed
Quotes from the yahoo finance api are best treated as delayed, not real time. Paid feeds publish their latency; Yahoo publishes nothing.
Common errors and fixes
- 429 Too Many Requests: add backoff, cache, and cut concurrency.
- Empty JSON or a null result array: retry once, then fail loudly instead of writing zeros to your database.
- 401 after a cookie change: upgrade the library and wait for a maintainer patch.
- Symbol not found: Yahoo’s suffixes (
.TO,.L) differ from your broker’s. Learn the mapping once.
Search Reddit or the Stack Overflow thread on importing financial data from Yahoo and you find the same cycle: a fix, a stack of upvoted workarounds, and a broken script six months later.
What data does the Yahoo Finance API return in JSON?
It returns deeply nested JSON where almost no price is a bare number. The Go wrapper github.com/oscarli916/yahoo-finance-api maps that JSON into typed structs, and reading its docs is the fastest way to understand the response shape before you write a line of code.
Here is the quote field map.
| Field | Go type | JSON tag |
|---|---|---|
Currency | string | json:"currency" |
Symbol | string | json:"symbol" |
ShortName | string | json:"shortName" |
LongName | string | json:"longName" |
ExchangeName | string | json:"fullExchangeName" |
Range | string | json:"range" |
Open | float64 | json:"regularMarketOpen" |
Low | float64 | json:"regularMarketDayLow" |
High | float64 | json:"regularMarketDayHigh" |
PreviousClose | float64 | json:"regularMarketPreviousClose" |
Volume | int64 | json:"regularMarketVolume" |
MarketCap | int64 | json:"marketCap" |
Timestamp | int64 | json:"regularMarketTime" |
Tradeable | bool | json:"tradeable" |
RegularMarketPrice | PriceValue | json:"regularMarketPrice" |
FiftyTwoWeekLow | PriceValue | json:"fiftyTwoWeekLow" |
A LongName of “Apple Inc.” and a PriceValue instead of a plain float64 is the pattern across the whole payload. The pricevalue struct wraps a Raw float64 with a Fmt string for display, so every chart field is a nested JSON object, not a number. Miss that and your parser hands you zeros.
Search response fields, returned from a query string:
| Field | Go type | JSON tag |
|---|---|---|
Symbol | string | json:"symbol" |
ShortName | string | json:"shortname" |
LongName | string | json:"longname" |
Exchange | string | json:"exchange" |
QuoteType | string | json:"quoteType" |
TypeDisp | string | json:"typeDisp" |
Industry | string | json:"industry" |
Score | float64 | json:"score" |
IsYahooFinance | bool | json:"isYahooFinance" |
History and search parameters, with defaults:
| Parameter | Go type | Default |
|---|---|---|
period | string | "1mo" |
interval | string | "1d" |
events | string | "div,split" |
includeAdjustedClose | bool | default true |
includePrePost | bool | false |
period1 | int64 | none |
period2 | int64 | none |
query | string | none |
quotesCount | int | 6 |
newsCount | int | 4 |
The options chain is the heaviest payload. The YahooOptionResponse type nests calls and puts, each a struct of Strike float64, Bid float64, Ask float64, ImpliedVolatility float64, OpenInterest int64, Expiration int64, ContractSize string, and InTheMoney bool.
In Python the equivalent is two lines with yfinance from PyPI: import it, then call .history() for historical price data. Same JSON underneath, same fragility.
How do you inspect a JSON response before writing code?
Use an API client. Apidog lets you fire a request, read the raw JSON, and save the response shape as documentation, which matters when the yahoo finance api has no official schema to check against.

- Paste the endpoint into Apidog and inspect the JSON tree before committing to a parser.
- Apidog saves example responses, so when a provider changes a field you can diff the old JSON against the new one.
- Mock the endpoint in Apidog and your bot keeps running while the live feed is down.
- Use API Hub to compare two providers’ JSON for the same ticker. If
volumedisagrees, that is a reconciliation bug waiting to happen.
Good API design shows up here: clear JSON, documented error codes, stable field names.
Comparison table: 10 stock data APIs priced
Ten feeds worth a bot builder’s time, with the price column last. Verify every figure on the provider’s own pricing page before you commit, since plans change monthly.
| API | Free tier | Real time | WebSocket | History depth | Price |
|---|---|---|---|---|---|
| yfinance | Yes, unofficial scrape | Delayed | No | Decades, unverified | Free |
| Alpha Vantage | Yes, daily caps | Paid tiers | No | 20+ years daily | From $49.99/mo |
| Alpaca | Yes, IEX real time | Yes | Yes | Full SIP history free | SIP $99/mo |
| Massive | Limited | Yes | Yes | 10+ years | $29 to $199/mo |
| Tiingo | Yes, limited | Add-on | Yes | 30+ years EOD | About $30/mo |
| EODHD | Demo keys | Add-on | Yes | 30+ years, 60+ exchanges | From $19.99/mo |
| Finnhub | Yes | Paid tiers | Yes | Varies by plan | See pricing page |
| Twelve Data | Yes, 800 calls/day | Paid tiers | Yes | 20+ years | See pricing page |
| FMP | Yes | Paid tiers | Yes | 30+ years fundamentals | See pricing page |
| Databento | Credits | Yes, tick | Yes | Full depth, MBO | Around $199/mo, usage based |
Three more worth naming from the alternatives to Yahoo Finance crowd: Morningstar for research-grade fundamentals, CurrencyLayer for currency exchange rates, and Marketstack for simple REST quotes. The apilayer roundup of financial market APIs covers that family, and edgeful’s Yahoo Finance API alternatives post reaches a similar shortlist. For futures and commodities coverage, see our Barchart API breakdown.
Which stock data API fits a beginner bot?
Start with Alpaca. Free IEX real time plus free historical data plus paper trading in one account means you can build and test without a subscription, and our Alpaca API keys setup guide walks through the first request.
Looking for the best free stock api beyond Alpaca? The alpha vantage api and the finnhub stock api both issue free keys with daily or per-minute caps, which works for end-of-day research but runs thin for a live bot. Treat any free stock market api as a starting point, then budget for a paid stock market data api once real money is on the line.
| Trader type | Pick | Why |
|---|---|---|
| First bot, equities | Alpaca | Free data, paper trading, live execution in one API |
| Backtest researcher | EODHD or Tiingo | Long history, low monthly cost |
| Intraday scanner | Massive | WebSocket, clean JSON, mid tier pricing |
| Fundamentals screener | Alpha Vantage or FMP | Wide financial statement coverage |
| Options or futures tick | Databento | Real depth, usage based billing |
Decision rule: if your strategy holds longer than a day, a cheap end-of-day feed is enough. If it holds minutes, pay for the stream. On the old Alpha Vantage versus IEX Cloud question, IEX Cloud closed its data business in 2024, so the live comparison is Alpha Vantage pricing against Alpaca’s IEX feed, and Alpaca wins on cost. Independent API comparison guides reach the same split between delayed-and-cheap and live-and-paid.
How do you avoid a single data vendor failing you?
Run two feeds, not one, and reconcile them daily. A bot with one data source has a single point of failure that nobody notices until a bar goes missing mid-trade.

- Pick a primary with an SLA. Keep the yahoo finance api as a backup only.
- Store every bar locally. Your own database is the cheapest insurance in this stack.
- Compare close prices across both providers each night. Flag any gap over 0.1 percent.
- Watch exchange-level changes. Euronext scheduled an SBE 366 upgrade for September 28, 2026 and WSE planned one for October 5, per Trading Technologies’ support updates.
- Use the same feed for backtest and live. Massive corrected trade and quote data across REST and WebSocket starting September 7, 2026, and that correction flows through to historical files per its changelog.
Top 5 favorite features by use case
Five picks, each with real drawbacks, because no feed is clean.
- Alpaca, data plus execution. Index options went live September 2, 2026 covering SPX, VIX, XSP, and DJX, per Alpaca’s product updates. Watch out: free tier is IEX only, roughly 2 to 3 percent of volume, and the SIP upgrade is $99/mo.
- Massive, machine-payable access. It added x402 payments on September 1, 2026 so agents can buy single requests without an API key, per Massive’s own site. Watch out: pay-per-request billing is hard to forecast, and the rebrand means older Polygon.io tutorials now point at stale names.
- EODHD, cheapest wide history. Good breadth for the money. Watch out: real time is an add-on, and commercial redistribution needs a pricier license.
- Databento, honest tick data. Watch out: usage billing surprises people, and OPRA options coverage runs into five figures annually.
- Benzinga, news as structured JSON. Meritz Securities added its Stock News API on September 8, 2026, per this report on the integration. Watch out: sentiment is not a signal, and news licensing is separate from price data.
Regional coverage is improving too. J-Quants moved its Margin Trading Outstanding API from weekly to daily data from September 25, 2026 and added EPS, BPS, ROE, and PER fields, per the J-Quants release notes.
What we like and what we don’t like
We like that free is still viable in 2026. We don’t like how many builders treat an unofficial scrape as production infrastructure.
Likes: Alpaca’s free real-time IEX feed; EODHD’s entry price; clean JSON with documented error codes; Apidog for checking a payload before coding; SIX Market Signal’s September 9, 2026 launch bringing API-based European data to retail users.
Dislikes: no SLA on the yahoo finance api; licensing fine print that Tiingo’s write-up on the Yahoo Finance API warns about; FMP’s public refund complaints, which is why we point at its pricing page instead of quoting numbers; providers that advertise “real time” and deliver 15-minute data, a gap one 2026 provider comparison keeps flagging.
What do real users say?
Traders on r/algotrading are blunt about cost and reliability, and their verdicts mostly match the pricing pages.
“Trading is free, historic SIP is free, historical and real-time IEX is free.” source
“I use Databento and find their realtime and historical MBO prices fair.” (u/Haunting_Map1269) source
“It’s $20k for a year of OPRA CMBP-1 data for the top 8 by volume. How is that inexpensive?” (u/Virtual_Plantain_863) source
“I use eodhd2 and have never had issues.” (u/Got_Engineers) source
“The bigger risk is backtesting on one feed and trading on another.” (u/Livid_Parsnip_2816) source
That last line is the whole argument. We collect this kind of unsolicited feedback in our roundup of honest AI stock tool reviews and what real users say.
Our Take
Keep the yahoo finance api for research notebooks and kill it in production. Move the bot to Alpaca’s free tier today, add a paid backup when real money is on the line, and budget for licensing before latency. A feed that costs $30 a month and never lies to you is cheaper than a free one that writes bad data into your backtest. Process over prediction: your data pipeline is part of your risk management, not an afterthought. Pair it with a disciplined screen, like the filters in our AI stock scanner breakdown, and compare bot options in our guide to free AI stock trading bots beginners keep flocking to.
This article compares tools, not trades. For scored breakdowns of the software behind these feeds, browse our reviews at aistockpickerapp.com/reviews.
Conclusion
Yahoo built a great website and a terrible platform promise. The yahoo finance api works right up to the moment your bot depends on it, which is exactly the wrong time to discover a 429. Three next steps: open a free Alpaca account and pull one day of bars tonight, inspect the JSON in Apidog before you write the parser, and write the nightly reconciliation script that compares two feeds. Then price the paid tier you would switch to on a bad day. Data over noise, and a feed you can audit beats a feed you can only hope about. Browse scored tool breakdowns anytime at aistockpickerapp.com, and see which platforms made our list of best AI stock tools for 2026.
Pricing note: data vendors reprice faster than Yahoo changes its endpoints. Check the provider’s page before you swipe a card.
This is education, not financial advice, and nothing here is a recommendation about your investment decisions.
Your market edge starts with the right tool. Stay alpha.
Frequently Asked Questions
Is Yahoo Finance API free?
Yes, and that is the only guarantee. There is no paid tier, no API key, and no support. Free access also means no uptime promise and no legal clarity for commercial use. Unofficial mirrors on RapidAPI charge for convenience, not for reliability. Treat it as free research data, not paid infrastructure.
Does Yahoo Finance have APIs?
Not officially. Yahoo shut its public finance API in 2017 and never shipped a documented replacement. The endpoints that power the website still return JSON, and libraries read them, but nothing about that arrangement is supported, versioned, or protected from changing without notice.
Is it possible to get stock data from Yahoo Finance for free?
Yes. Scrapers and wrappers pull quotes, historical price data, dividends, and some fundamentals at no cost. Expect throttling under load, occasional empty results, and symbol suffixes that differ from your broker's. For anything automated, mirror the data into your own database so one bad day does not erase your history.
Is YFinance free to use?
Yes, yfinance is free and open source. Its maintainers state it is not affiliated with or vetted by Yahoo and is meant for research and education. That makes it fine for notebooks and weak as the only dependency behind a live trading bot or a product with paying customers.
Is yahoo finance api safe for beginners?
For learning, yes. For live capital, no. The risks are silent: a stale quote, a missing bar, or a null field parsed as zero. Beginners should prototype on it, then switch to a provider with documented error codes and a status page before any order hits a real market.
Does Yahoo have a Finance app?
Yes. Yahoo Finance ships iOS and Android apps with watchlists, portfolio tracking, news, and charts. The apps are consumer products, not developer tools, so they offer no programmatic access. Reading a price on your phone and feeding a bot are two separate problems with two separate solutions.
Is there an API that can access historical stock data?
Yes, several. EODHD and Tiingo cover decades of end-of-day history cheaply, Alpaca provides free historical SIP bars, and Databento sells full tick and order-book depth. Pick based on resolution: daily bars for swing systems, minute or tick data for intraday testing. Always store what you download locally.
How can I connect Excel to Yahoo Finance?
Excel's built-in STOCKHISTORY and Stocks data types pull market data without touching Yahoo. For Yahoo specifically, Power Query against an unofficial endpoint works but breaks when the schema shifts. A cleaner route is a provider with a documented REST API and a CSV export you can refresh on a schedule.
Does Yahoo Finance Python still work?
Mostly, with maintenance. yfinance keeps working because volunteers patch it every time Yahoo changes cookies, crumbs, or JSON field names. Expect periodic breakage, pin your version, and keep a paid fallback configured. If a two-day outage would cost you money, it is not a production dependency.
Contributing writer at AI Stock Trading Bots.