← All posts

Yahoo Finance API: Official Status, Limits and Alternatives

Yahoo documents no Yahoo Finance API, and yfinance’s README says that API is for personal use only. Limits and terms compared, plus a documented option.

Yahoo does not list a Yahoo Finance API among its developer APIs. The APIs page of the Yahoo Developer Network, checked on 16 November 2026, lists OAuth, the Fantasy Sports API and Sign In With Yahoo, and no finance data API. What most code calls the Yahoo Finance API is the set of JSON endpoints behind finance.yahoo.com, reached through open-source wrappers such as yfinance, whose README states that it “is not affiliated, endorsed, or vetted by Yahoo, Inc.” and that “the Yahoo! finance API is intended for personal use only”. Yahoo publishes no documentation for those endpoints and so no request limits, and its Terms of Service prohibit automated collection without permission. A documented financial data API such as xfinlink gives daily prices, statements and ratios with stated limits, terms and request costs.

Is there an official Yahoo Finance API?

Not one that Yahoo documents for public use. The Yahoo Developer Network APIs page describes three offerings, and none of them carries market data. Yahoo’s Terms of Service, last updated on 1 November 2026, say users must not “try to access them using a method other than the interface and the instructions that we provide”, and must not “access or collect data, or attempt to access or collect data, from our Services using any automated means, devices, programs, algorithms or methodologies, including but not limited to robots, spiders, scrapers, data mining tools, or data gathering or extraction tools, for any purpose without our express, prior permission.”

The same terms restrict commercial use of the service, and what that means for a business is the subject of can you use Yahoo Finance data commercially. For a developer choosing a data source the practical point is narrower. Nothing on Yahoo’s side documents the endpoints, their limits or their stability, so code that depends on them depends on behaviour that can change without notice.

What do yfinance and other wrappers actually call?

yfinance sends its requests to query1.finance.yahoo.com and query2.finance.yahoo.com, the hosts named in the library’s own source, and turns the JSON into pandas objects. The README describes it as “an open-source tool that uses Yahoo’s publicly available APIs, and is intended for research and educational purposes”, and it points readers to Yahoo’s terms “for details on your rights to use the actual data downloaded”. Version 1.8.0 was current on PyPI on 16 November 2026.

For a personal notebook it is quick to start. The yfinance quick start builds yf.Ticker("MSFT") with no key and no account, and the library reaches price history, statements, options chains and news. Limits exist even though Yahoo’s developer pages state none. The library’s source raises YFRateLimitError, with the message “Too Many Requests. Rate limited. Try after a while.”, when Yahoo answers HTTP 429, and its screener function documents a cap of 250 results per call, marked as Yahoo’s maximum.

What limits and terms apply to each route?

Route Who documents it Published request limits Terms for the data
Yahoo’s JSON endpoints, called directly Not Yahoo, which lists no finance API None Yahoo Terms of Service. Automated collection needs Yahoo’s “express, prior permission”
yfinance The open-source project documents its own functions Yahoo’s, unpublished. 250 results per screener call Defers to Yahoo’s terms. README says “personal use only”
xfinlink REST API and Python client The provider, in the docs Per day, 100 on Free, 10,000 on Pro and 50,000 on Max, with one request per ticker A published data licence per plan. Free is non-commercial

Sources, all read on 16 November 2026, are the Yahoo Developer Network APIs page, Yahoo Terms of Service, the yfinance README and screen reference, and the xfinlink rate limits page and pricing page.

How do you get the same data from a documented API?

The request is a plain HTTPS call with a key in the X-API-Key header, so any language that can send one works. The request below asks for two trading days of prices and market cap for two companies.

curl -s -H "X-API-Key: YOUR_API_KEY" \
  "https://api.xfinlink.com/v1/prices/AAPL,MSFT?start=2026-11-12&end=2026-11-13&fields=close,adj_close,market_cap" \
  | python3 -m json.tool | head -16

Output:

{
    "data": [
        {
            "entity_id": 10000086,
            "ticker": "MSFT",
            "entity_name": "MICROSOFT CORP",
            "gics_sector": "Information Technology",
            "date": "2026-11-12",
            "close": 523,
            "adj_close": 523,
            "price_basis": "trade",
            "market_cap": 3883899750696,
            "shares_as_of": "2026-10-22",
            "shares_source": "filing",
            "shares_stale": false
        },

The same call from the Python client returns a DataFrame.

import xfinlink as xfl

xfl.set_api_key("YOUR_API_KEY")  # Pro or higher: Free takes one ticker per request

px = xfl.prices(["AAPL", "MSFT"], start="2026-11-12", end="2026-11-13",
                fields=["close", "adj_close", "market_cap"])
print(px[["ticker", "date", "close", "adj_close", "market_cap"]].to_string(index=False))

Output:

ticker       date  close  adj_close   market_cap
  AAPL 2026-11-12 354.88     354.88 5.157181e+12
  AAPL 2026-11-13 356.27     356.27 5.177380e+12
  MSFT 2026-11-12 523.00     523.00 3.883900e+12
  MSFT 2026-11-13 523.88     523.88 3.890435e+12

Each call counts two requests, one per ticker, and needs a paid plan, since Free takes one ticker per request, and every counted response reports what is left of the day in the X-RateLimit-Remaining-Day header, as the rate limits page describes. close is the price as traded, adj_close is adjusted for splits, and market_cap is in whole dollars for that share class. Daily prices on paid plans reach back to 1962, documented on the prices reference, and the Free plan returns the most recent twelve months.

The other endpoints cover what scripts usually take from Yahoo. Financial statements built from SEC filings come from /v1/fundamentals, ratios such as P/E from /v1/metrics, and insider transactions and 13F holdings from their own endpoints on paid plans. A line-by-line map from yfinance calls to these, with the column differences that change results, is in how to replace yfinance in a Python script, and the return types of the common Python data libraries are compared in Python stock data libraries.

When does the difference matter?

For a chart in a personal notebook, rarely. A script that runs unattended is different, because a documented API answers a stated limit with a stated error, while a library around undocumented endpoints can only pass on whatever comes back. Research over long periods adds identity. Every price, statement and index row carries an entity_id, a permanent number that stays with a security or a company when its ticker changes, and xfl.index("sp500", as_of=...) returns index members on past dates, the ones later delisted included.

Once anyone else sees the output, the licence has to cover that use too, and the pricing page states which plan covers which. The Free plan costs nothing and takes one ticker per request, enough to test each of these calls one company at a time, and the xfinlink home page sets out what each part of the API covers.

FAQ

Is the Yahoo Finance API free?
yfinance installs and runs without a key or a payment. Yahoo documents no finance API behind it, publishes no limits, and its terms require permission for automated collection.

Does yfinance need an API key?
No. The yfinance quick start creates a Ticker object without any authentication step.

Which documented API gives Yahoo-style daily data?
Any provider that publishes endpoints, limits and a licence. xfinlink covers daily prices, statements from SEC filings, ratios, index membership, insider transactions and 13F holdings for US-listed securities, with a free key to start.

Built with xfinlink — free financial data API for Python.