apiwren
Guide Yahoo Finance

Do you need a Yahoo Finance API key?

Yahoo has not offered an official finance API or API key since 2017. What yfinance does instead, why it gets rate-limited, and how to get a working key.

By Terrell Louis · Updated

Short answer

There is no official Yahoo Finance API key. Yahoo shut down its public finance API in 2017 and never replaced it. Today you either use an open-source library such as yfinance, which needs no key but gets rate-limited, or a hosted Yahoo Finance API that you call with a key from a marketplace such as RapidAPI.

What happened to the official Yahoo Finance API

Yahoo’s finance API, the CSV and YQL services many spreadsheets and apps used for quotes, stopped working in 2017. Developers documented the shutdown at the time (AlgoTrading101, Bluecoins). Yahoo did not publish a successor, so there is no developer portal, no sign-up and no key to request.

Your three options

Criterionyfinance (library)Hosted Yahoo Finance APIOther market data vendors
API keyNoneRapidAPI keyVendor’s own key
How it gets dataCalls Yahoo’s web endpoints from your machineProvider calls Yahoo and returns JSON over HTTPSVendor’s own feeds
Rate limitsYahoo’s, unannounced; 429 errorsYour plan’s quota, stated up frontYour plan’s quota
LanguagesPythonAny language with HTTPAny language with HTTP
Data shapepandas DataFramesYahoo’s JSON fieldsVendor’s own fields

If your code already reads Yahoo’s field names, such as regularMarketPrice, a hosted Yahoo Finance API keeps them. Switching to another vendor means rewriting the code that parses responses.

Why yfinance gets rate-limited

yfinance is an open-source Python library that is not affiliated with Yahoo. It requests the same pages and JSON the Yahoo Finance website loads. Since early 2025 many users have hit YFRateLimitError: Too Many Requests, Yahoo’s HTTP 429 response, even on single calls (yfinance #2422, discussion #2431). Reported workarounds are upgrading yfinance, adding delays between calls and changing networks. None of them is guaranteed, because the limit is Yahoo’s and is not documented.

yfinance is fine for notebooks and research. For a scheduled job, a bot or a product that must not fail at 9:30 in the morning, use an API with a stated quota.

How to get a key for Yahoo Finance Turbo

  1. Create a free account on RapidAPI.
  2. Open the Yahoo Finance Turbo listing, choose a plan on the Pricing tab and subscribe.
  3. Copy X-RapidAPI-Key from any endpoint’s code snippet. Keep it in an environment variable, not in your code.
  4. Send it with the host header on every request:
curl --request GET \
  --url 'https://yahoo-finance-turbo.p.rapidapi.com/market/v2/get-quotes?region=US&symbols=AAPL' \
  --header 'X-RapidAPI-Key: YOUR_RAPIDAPI_KEY' \
  --header 'X-RapidAPI-Host: yahoo-finance-turbo.p.rapidapi.com'
import os, requests

resp = requests.get(
    "https://yahoo-finance-turbo.p.rapidapi.com/market/v2/get-quotes",
    params={"region": "US", "symbols": "AAPL"},
    headers={
        "X-RapidAPI-Key": os.environ["RAPIDAPI_KEY"],
        "X-RapidAPI-Host": "yahoo-finance-turbo.p.rapidapi.com",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json()["quoteResponse"]["result"][0]["regularMarketPrice"])

Turbo has 37 endpoints: real-time quotes for up to 20 symbols per call, historical charts, fundamentals, options, holders, SEC filings, screeners, earnings calendars and news. The Yahoo Finance API page lists them all and maps common yfinance calls to the matching endpoint, and the stock price API page shows quotes and daily history end to end.

Yahoo Finance Turbo

37 endpoints, 178 ms median, drop-in for YH Finance clients.

Get a Yahoo Finance Turbo key

FAQ

Is there an official Yahoo Finance API?
No. Yahoo retired its public finance API in 2017 and has not replaced it. Every “Yahoo Finance API” today is either an unofficial library such as yfinance or a third-party hosted API.
Where do I get a Yahoo Finance API key?
Yahoo does not issue one. Hosted Yahoo Finance APIs such as Yahoo Finance Turbo use a RapidAPI key instead: sign up on RapidAPI, subscribe to the API, and copy the key from the listing’s code examples.
Does yfinance need an API key?
No. yfinance reads the same web endpoints the Yahoo Finance site uses, without a key. That is also why Yahoo can rate-limit it: there is no account or quota behind the requests.
Why does yfinance say “Too Many Requests”?
Yahoo returns HTTP 429 when it sees too many requests from one network. yfinance raises YFRateLimitError. Users have reported blocks lasting a day or more, and changing IP did not always help.
Is a hosted Yahoo Finance API affiliated with Yahoo?
No. Yahoo Finance Turbo and similar APIs are run by third parties and are not affiliated with or endorsed by Yahoo.