Until yesterday a query such as this http://autoc.finance.yahoo.com/autoc?query=a&callback=YAHOO.Finance.SymbolSuggest.ssCallback yielded a long list of fuzzy/broadmatch results for both ticker and company name.
Since today you are a.) required to specific region and language and b.) it is only yielding exact match results only for the ticker and not for the company name. Thus usually you get only one results back.
Thus for http://autoc.finance.yahoo.com/autoc?query=y®ion=US&lang=en&callback=YAHOO.Finance.SymbolSuggest.ssCallback there's now only one result: YAHOO.Finance.SymbolSuggest.ssCallback({"ResultSet":{"Query":"a","Result":[{"symbol":"A","name":"Agilent Technologies Inc.","exch":"NYQ","type":"S","exchDisp":"NYSE","typeDisp":"EQUITY"}]}});
Any idea how to a.) broaden the match type and b.) include the company name as the searched field?
Yahoo Finance API is Discontinued.
Yahoo! Finance API is one of the most widely used real-time stock data APIs on the market. Given its popularity, this API is great for developers who want to build their own stock-tracking apps. Yahoo! Finance provides data from the New York Stock Exchange (NYSE) and the Nasdaq Stock Exchange (Nasdaq).
Is it legal to scrape Yahoo Finance? Web scraping is legal, but note that personal data is protected by GDPR in the European Union and by other regulations around the world. You should not scrape personal data unless you have a legitimate reason to do so.
Yahoo Finance also offers 1min historical intraday data for up to 10 days. Of course, you need to persist the data in a flat-file or database before the 10-day window expires as the example here.
The following works (the returned data stream has lots of escape characters):
http://autoc.finance.yahoo.com/autoc?query=alphabet®ion=EU&lang=en-GB
Or expanded in the YQL Console
:
https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D'http%3A%2F%2Fautoc.finance.yahoo.com%2Fautoc%3Fquery%3Dalphabet%26region%3DEU%26lang%3Den-GB'&format=json&callback=
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With