yfinance
Download market data from Yahoo! Finance API
Decision gist · record as of 2026-08-14
Yes, if your use case is research or personal analysis. yfinance is widely used, actively maintained, and has low install friction. However, do not use it for commercial applications or high-volume data collection without confirming compliance with Yahoo's terms of service. The Apache-2.0 license is permissive, but Yahoo's data restrictions are separate and binding.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Yahoo Finance API is intended for personal use only; commercial or high-volume use may violate Yahoo's terms of service.
- Low friction install with a pure-Python wheel and 12 runtime dependencies.
- Actively maintained with a recent release and 24986 repository stars.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Note that yfinance itself is not affiliated with Yahoo, Inc., and you must comply with Yahoo's terms of use for the data you download.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 24,986 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 29,190,204 downloads/mo, #823 on PyPI
Alternatives
Verify before relying
pip install yfinance
import yfinance as yf
data = yf.download('AAPL')- Whether the 12 runtime dependencies are all actively maintained and free of known vulnerabilities.
- Current rate limits or throttling policies enforced by Yahoo Finance on API requests.
- Whether live streaming via WebSocket and AsyncWebSocket is stable and fully documented.
- Specific date range parameters and filtering options supported by the download function.
What it is and what it does
yfinance is a Python wrapper around Yahoo Finance's publicly available APIs that lets you download historical and real-time market data without needing to write raw HTTP requests. It handles the details of authentication, parsing, and data formatting, returning results as pandas DataFrames or other standard Python objects. The package includes components for single and multiple ticker lookups, historical downloads, live streaming, market searches, and sector/industry information.
The library is designed for research and educational use. It depends on pandas, numpy, requests, beautifulsoup4, and several other libraries for HTTP, parsing, and data handling. While installation is straightforward and the project is actively maintained, you should be aware that yfinance is not affiliated with Yahoo and that Yahoo's terms of service restrict the data to personal use only.
Use it for
- Backtest trading strategies by downloading historical OHLC data for multiple tickers.
- Build a portfolio tracker that pulls current prices and market data into a pandas DataFrame.
- Research sector and industry performance by querying market information and screening equities.
- Stream live market quotes and price updates using WebSocket for real-time monitoring.
- Fetch fundamental data and news for a set of stocks to support investment analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if your use case is research or personal analysis.
yfinance is widely used, actively maintained, and has low install friction. However, do not use it for commercial applications or high-volume data collection without confirming compliance with Yahoo's terms of service. The Apache-2.0 license is permissive, but Yahoo's data restrictions are separate and binding.
Install
yfinance on PyPI
Before you install
Low friction install with a pure-Python wheel and 12 runtime dependencies. Actively maintained with a recent release and 24986 repository stars.
Yahoo Finance API is intended for personal use only; commercial or high-volume use may violate Yahoo's terms of service.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Note that yfinance itself is not affiliated with Yahoo, Inc., and you must comply with Yahoo's terms of use for the data you download.
Quickstart
pip install yfinance
import yfinance as yf
data = yf.download('AAPL')
Verify before relying
- Whether the 12 runtime dependencies are all actively maintained and free of known vulnerabilities.
- Current rate limits or throttling policies enforced by Yahoo Finance on API requests.
- Whether live streaming via WebSocket and AsyncWebSocket is stable and fully documented.
- Specific date range parameters and filtering options supported by the download function.
Package facts
| License | Apache-2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 12 packagesbeautifulsoup4curl_cffilxmlmultitaskingnumpypandaspeeweeplatformdirsprotobufpytzrequestswebsockets |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 29,190,204 / month, #823 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Office/Business :: FinancialTopic :: Office/Business :: Financial :: InvestmentTopic :: Scientific/Engineering :: Interface Engine/Protocol TranslatorTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: yfinance-1.6.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “yahoo finance data download”
- yfinanceFetches financial and market data from Yahoo Finance's public APIs,…
- openbb-yfinanceIntegrates Yahoo!Finance data into the OpenBB Platform, enabling…
- yahooqueryRetrieves financial data from Yahoo Finance through an unofficial…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also fear-and-greed · finvizfinance · yahooquery · openbb-yfinance · pykrx · sec-edgar-downloader · monarchmoneycommunity · tushare · pycoingecko · empyrical-reloaded