Bye Yahoo, and thanks for all the fish

Just a quick post in the light of a very recent event. Users of financial functions of R, MatLab, Python, or Zorro got a bad surprise in the last days. Scripts and programs based on historical price data suddenly didn’t work anymore. And our favorite free historical price data provider, Yahoo, now responds on any access to their API in this way:

No, they won’t be right back. Their engineers went fishing and, from what I hear, won’t start working on the issue anytime soon. The Yahoo Finance API is dead. Without prior announcement, Yahoo has abandoned their only remaining service that was clearly ahead of the competition.

Many scripts that I’ve posted on this blog use Yahoo for downloading price data. So here’s a quick workaround. Before running the Yahoo based script, run this one:

void main()
	string MyAsset;
	while(MyAsset = loop("SPY","TNT","XIV","GLD","AAPL","YHOO")) // ... enter your assets here 
		string URL = strf("",MyAsset);
		string Content = http_transfer(URL,0);
		if(!Content) continue;
		printf(" %s",MyAsset);

This script downloads the data with the Google API. When you afterwards start the script with the Yahoo download, it will detect that the data is already there, and not access the Yahoo API.

Why haven’t I used the Google API already in the first place? Their data quality is not as good (many gaps and outliers), and it’s not dividend adjusted. So the results will be a bit different than results with Yahoo data. And then there’s also this ominous message:

Like the Yahoo message, this one is also wrong, but in a more positive sense. The Google Finance API is still available and was so for years, but nobody knows how long it will remain. For the moment, the above script will do, but it’s only a temporary solution. Free stock data can alternatively be downloaded from Quandl with a similar script, but for ETFs they want 50 bucks per month (I hope they didn’t bribe Yahoo and Google into abandoning their APIs!).

I’ve added the above script to the 2017 repository, in order to make all the Yahoo accessing scripts work again, although with slightly different results. You’ll need the current Zorro version 1.58 or above. And if you know a free and reliable API for ETF EOD history, please post a comment!

Addendum (June 2017): Readers mentioned AlphaVantage ( and Stooq ( as free alternatives to Yahoo. And indeed, they provide also dividend and split adjusted data. From what I’ve seen, their data has better quality than Google’s. AlphaVantage also includes the unadjusted prices, which are sometimes required for special cases. Only problem that I’ve found is that some price histories don’t go further back than 5 years. Downloading price data from AlphaVantage and Stooq was implemented in the latest Zorro version 1.60.

31 thoughts on “Bye Yahoo, and thanks for all the fish”

  1. Thanks for the link! I didn’t know this one, but indeed they also support ETFs, at least some that I tried. I’ll have to check in which way the data is adjusted.

  2. QuantQuote Free Data– QuantQuote offers free daily resolution data for the S&P500 at this web page under the Free Data tab. The data accounts for symbol changes, splits, and dividends, and is largely free of the errors found in the Yahoo data. Note, only 500 symbols are available unlike Yahoo which provides all listed symbols.


  3. The cookie field is not for preventing robots, but for disabling all API access by software. You can indeed step around the cookie method with some tricks, even automated, but that’s not really a professional solution. And Yahoo could easily counter. Next would be a captcha. If they don’t want us to use their API, they can effectively prevent it.

    – Alphavantage makes a good impression at first glance, but the problem – aside from the JSON format, not the best choice for financial data – is that they do not adjust for splits and dividends. However they told me they’re considering this.

  4. How can I get only historical weekly data. What parameter has to be added ?


  5. I don’t know if the Google API has a parameter for weekly data, but you can trivially convert it from daily.

  6. I posed the qiestion to alphavantage about adjustment of their prices and they quickly reponded the following:

    We have just beta-launched the adjusted close price feature for our daily prices API. The API call, while not yet updated on our documentation page, should look something like:

    Best regards,

    Team Alpha Vantage

    So Alphavantage does offer and will offer dividend adjusted data.

  7. Hello, Can you contact me at support at

  8. I have shifted my scripts from pandas datareader to Intrinio data web API. There are download limits for the free data, but I don’t exceed them for my needs. Data quality is good too.

  9. Also Intrinio’s EOD stock data is split and dividend adjusted. I think it’s mostly from the same vendor as Quandl’s EOD data but it also has ETF prices. Notably, it does not have mutual fund price history like Yahoo.

  10. I tried to find alternatives to the API and found several interesting services:

    EOD Histotrical Data ( – cheapest and with the best coverage. They have similar to Yahoo! Finance API and instructions how to migrate from Yahoo to EOD.

    Quandl and Intrinio are good, but a little bit expensive for personal usage.
    Alphavantage has very poor data (for examples, without adjusted closes).

  11. One question; How can Alpha Vantage give access for free? Indeed the are not as big as Google or Yahoo. What’s the business model? How can they sustain service costs??

  12. This is indeed an important question, since the long-term availability of their data depends on it. I hope they have a solid business model by advertising or selling premium data once they’ve built up a large user base. Maybe Denis knows more?

    – The current Zorro beta version now supports AlphaVantage as a data source.

  13. While Alpha Vantage has great data and a well-documented API, it’s pretty sketchy that they don’t describe their business model or have an “About Us” page that gives a company address and information about the actual human beings who work there.

    I’d love to use it, but it’s hard to trust it at the moment.

  14. I checked AlphaVantage’s service, its looking usefull. I am in the same worry as turtlein, After 2 months of building the system with Alphavantage, will we meet with unbearable costs?

    Dear AlphaVantage,
    What is your profit model? Do you have a gain model? It’s a very nice service, but we want it to be permanent 🙂

    Also, how can i get yours supported instrument list?

  15. I’m afraid it’s not so easy. That “crumb” in your URL is a code connected to a cookie on your PC. No cookie, no data.

  16. Problem is that it does not help to get around it. You could connect to the Yahoo main page for generating the cookie, then analyze the cookie for getting the download link. But to what avail? Yahoo will change the cookie code next month or add a captcha. Besides, the data that they still provide for manual access is not comparable to their prior service – it is not anymore dividend adjusted and full of gaps.

Leave a Reply

Your email address will not be published. Required fields are marked *