Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yahoo Finance API stock/ticker lookup only allowing exact match

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&region=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?

like image 890
jco40 Avatar asked Oct 02 '15 01:10

jco40


People also ask

What happened to Yahoo Finance API?

Yahoo Finance API is Discontinued.

Is Yahoo Finance API real-time?

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 Yahoo Finance API legal?

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.

Does Yahoo Finance have intraday data?

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.


1 Answers

The following works (the returned data stream has lots of escape characters):

http://autoc.finance.yahoo.com/autoc?query=alphabet&region=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=
like image 102
Des Avatar answered Sep 20 '22 15:09

Des