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
| Criterion | yfinance (library) | Hosted Yahoo Finance API | Other market data vendors |
|---|---|---|---|
| API key | None | RapidAPI key | Vendor’s own key |
| How it gets data | Calls Yahoo’s web endpoints from your machine | Provider calls Yahoo and returns JSON over HTTPS | Vendor’s own feeds |
| Rate limits | Yahoo’s, unannounced; 429 errors | Your plan’s quota, stated up front | Your plan’s quota |
| Languages | Python | Any language with HTTP | Any language with HTTP |
| Data shape | pandas DataFrames | Yahoo’s JSON fields | Vendor’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
- Create a free account on RapidAPI.
- Open the Yahoo Finance Turbo listing, choose a plan on the Pricing tab and subscribe.
- Copy
X-RapidAPI-Keyfrom any endpoint’s code snippet. Keep it in an environment variable, not in your code. - 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.