For months I've been using a url like this, from perl:
http://finance.yahoo.com/d/quotes.csv?s=$s&f=ynl1 #returns yield, name, price;
Today, 11/1/17, it suddenly returns a 999 error.
Is this a glitch, or has Yahoo terminated the service?
I get the error even if I enter the URL directly into a browser as, eg:
http://finance.yahoo.com/d/quotes.csv?s=INTC&f=ynl1
so it doesn't seem to be a 'crumb' problem.
Note: This is NOT a question which has been answered in the past! It was working yesterday.That it happened on the first of the month is suspicious.
As noted in the other answers and elsewhere (e.g. currency helper of yahoo - Sorry, Unable to process request at this time -- error 999), Yahoo has indeed ceased operation of the Yahoo Finance API. However, as a workaround, you can access a trove of financial information, in JSON format, for a given ticker symbol, by doing a HTTPS GET request to: https://finance.yahoo.com/quote/SYMBOL (e.g. https://finance.yahoo.com/quote/MSFT). If you do a GET request to the above URL, you'll see that the financial data is contained within the response in JSON format. The following python script shows how you can parse individual values that you may be interested in:
The output of the script should look something like this:
What are you complaining about? You can still go to Yahoo and view the quote for any ticker symbol and write it down or type it into a spreadsheet. In fact, you can do this for a whole list of symbols.
What I can no longer do is download today's data for a whole list of symbols in spreadsheet format. At least I did that this morning. Now, suddenly, my computer cannot make a "secure connection" to Yahoo finance.
I am curious what terms of service were violated. Did somebody find a way to use the data profitably? That, of course, would be grossly immoral, unless all profits were donated to a worthy non-racist cause like the government of Zimbabwe or Venezuela.
This is the SECOND TIME that Yahoo has made it difficult to get data. I hereby forecast that in the future your requested data will be formatted as a .PNG file with a crazy font that defies any attempt at OCR.
var API = "https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL"; $.getJSON(API, function (json) {...});
call throws this error: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.microplan.at/sar' is therefore not allowed access.Yahoo confirmed that they terminated the service:
There is still a way to get this data by querying some APIs used by the finance.yahoo.com page. Not sure if Yahoo will be supporting it long term as the previous API was (hopefully they will).
I adapted the method used by https://github.com/pstadler/ticker.sh into the following python hack that takes a list of symbols from the command line and outputs some of the variables as a csv:
Sample Run:
My Python program using Yahoo Finance has recently stopped working properly, but it didn't return that error, it just replaced stock prices with 0's. I initially saw this when I debugged and then, when I went to the yahoo finance URLS for those stocks, I confirmed the error. Since the actual data is messed up, I don't think the work-arounds that have been suggested would fix my problems. Is this likely related to yahoo discontinuing their API? I can't understand what could explain this.
Examples: