Yahoo Finance data, three lines of Python.
yahooquery is a Python interface to the unofficial Yahoo Finance API. Pull prices, financials, options, and news for one ticker or a hundred — returned as clean pandas DataFrames.
Built for people who’d rather analyze than scrape
No HTML parsing, no brittle selectors. Data comes straight from Yahoo’s own API endpoints.
Fast by design
Data is retrieved through API endpoints instead of web scraping. Asynchronous requests are available with a single configuration flag.
Simple one-liners
Pass one symbol or a list of fifty. The same method calls work either way, and batch requests keep things quick.
Pandas native
Where it makes sense, responses come back as DataFrames — indexed, typed, and ready for analysis or plotting.
Premium support
Yahoo Finance Premium subscribers can pull the data their subscription unlocks by passing login credentials.
60+ data modules
Summary detail, financials, options chains, earnings history, news, holders, recommendations — nearly everything on the front-end.
Open source
MIT licensed and developed in the open on GitHub. Issues and pull requests are welcome.
One ticker, one line per question
Most data in yahooquery hangs off the Ticker class. Instantiate it with a symbol, then ask for what you need — properties return data immediately, methods take arguments for finer control.
from yahooquery import Ticker aapl = Ticker('aapl') aapl.summary_detail # dict: price, volume, market cap... aapl.financial_data # dict: margins, revenue, cash... aapl.history(period='1y') # DataFrame of daily OHLCV aapl.news() # list of recent stories
Whole watchlists in one call
Hand Ticker a list and every method fans out across all of them. Responses come back keyed by symbol, so merging into your own pipeline is trivial.
symbols = ['fb', 'aapl', 'amzn', 'nflx', 'goog'] faang = Ticker(symbols) faang.summary_detail # one dict per symbol
The majority of the data visible on the Yahoo Finance front-end is retrievable through yahooquery — without ever opening a browser.from the project overview
Up and running in three steps
Install the package
pip install yahooquery — or pip install yahooquery[premium] if you have a Yahoo Finance Premium subscription.
Make a Ticker
Ticker('aapl') for one company, or pass a list of symbols to batch every call you make afterwards.
Ask for data
Properties like summary_detail return instantly; methods like history() take arguments for period, interval, and range.
Star it, fork it, break it, fix it
yahooquery is developed in the open. Report bugs, request modules, or send a pull request on GitHub.
github.com/dpguthrie/yahooquery