ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
14.87k stars 2.44k forks source link

Add ticker symbol and news search #837

Closed a0rtega closed 1 year ago

a0rtega commented 3 years ago

The YF API search endpoint has two functionalities that would be nice to add to yfinance:

The information is easily accessible using the endpoint https://query2.finance.yahoo.com/v1/finance/search?q=apple, see the quotes and news keys of the JSON response.

The basic search above is probably enough, although the endpoint supports many parameters to customize the search. This is a full search query added for reference: https://query2.finance.yahoo.com/v1/finance/search?q=apple&lang=en-US&region=US&quotesCount=6&newsCount=2&listsCount=2&enableFuzzyQuery=false&quotesQueryId=tss_match_phrase_query&multiQuoteQueryId=multi_quote_single_token_query&newsQueryId=news_cie_vespa&enableCb=true&enableNavLinks=true&enableEnhancedTrivialQuery=true&enableResearchReports=true&researchReportsCount=2

Thank you in advance!

silvavn commented 3 years ago

Hi @a0rtega those are excellent suggestions and we would be glad to review a push request if you would like to implement i!