Tools · SPBoucher
Menu

yfinance

by Ran Aroussi and contributors · Library · also known as yahoo-finance (Python)

Open-source Python library that downloads price history, fundamentals, options chains and fund data from Yahoo Finance's unofficial endpoints for research and education

Apache-2.0 licenseFreeOpen sourceLocalSelf-hostable
Visit official site Compare

Link verified Nov 2, 2026

Overview

yfinance is an Apache-2.0 Python library by Ran Aroussi that retrieves data from Yahoo Finance's public but undocumented web endpoints. Through Ticker, Tickers and download() it returns price history at daily and intraday intervals, dividends and splits, company information and calendars, analyst targets, financial statements, options chains, holders and fund holdings as pandas objects, with caching and session handling to reduce rate-limit problems. Version 1.7.0 is current on PyPI at the time of writing.

The project states that it is intended for research and educational purposes, is not affiliated with or endorsed by Yahoo, and that users' rights to the data are governed by Yahoo's terms, which describe the API as intended for personal use. Because it scrapes an unofficial interface, breakage after Yahoo changes, throttling, gaps and silent data revisions are recurring issues, and the data should not be redistributed or used as the sole source for publishable results without verification against a licensed vendor.

Capabilities

  • Price history at daily and intraday intervals
  • Dividends, splits and corporate actions
  • Financial statements and company info
  • Options chains
  • Holders, analyst targets and fund holdings
  • Batch download for many tickers
  • pandas DataFrame output

Typical workflows

  1. Quick exploratory charts in a notebook
  2. Teaching data retrieval in an introductory finance course

Strengths

  • Free and open source
  • Simple pandas-based API
  • Broad global ticker coverage

Limitations

  • Unofficial endpoints; breaks when Yahoo changes
  • Yahoo terms describe personal use only
  • Rate limiting and data gaps
  • Unsuitable as sole source for publishable research

Prerequisites

  • Python with pandas

Who it is for

  • Students and hobbyists
  • Researchers prototyping before buying licensed data

Alternatives & comparison

Alpha Vantage offers a licensed free tier with documented limits; Massive, FirstRate Data and Databento are paid vendors with defined licences and support. yfinance trades those guarantees for zero cost and convenience.

  • Alpha Vantage

    REST API for stock, ETF, options, forex, crypto, commodity and economic data plus fundamentals, news sentiment and technical indicators, with a free key tier and premium plans

    ProprietaryFreemium
  • Databento

    Usage-priced market data platform with normalized order-book (MBO/MBP), trades, OHLCV and reference schemas for futures, options and equities, delivered via historical, live and batch APIs in the DBN format

    MixedUsage-based
  • FirstRate Data

    Vendor of historical intraday market data (1-minute to daily bars, tick and options) for US stocks, ETFs, futures, indices, crypto and FX, delivered as zipped CSV bundles under a perpetual licence

    ProprietaryPaid
  • Massive (formerly Polygon.io)

    Market data platform (renamed from Polygon.io in October 2025) with REST and WebSocket APIs, flat files and SQL access for US stocks, options, indices, forex, crypto and futures

    ProprietaryPaid
Compare yfinance with its alternatives →

Sources & verification

Primary sources consulted for this record. Claims are tied to the fields each source supports; the automated link checker re-verifies every URL on a schedule.

  • License
    yfinance LICENSE.txt

    https://github.com/ranaroussi/yfinance/blob/main/LICENSE.txt

    Supports: license_spdx, source_model

    checked Nov 1, 2026
  • Official documentation
    yfinance documentation

    https://ranaroussi.github.io/yfinance

    Supports: name, summary, capabilities, limitations

    States not affiliated with Yahoo; Yahoo API intended for personal use

    checked Nov 1, 2026
  • Official site
    yfinance

    https://ranaroussi.github.io/yfinance/index.html

    Supports: homepage_url

    checked Nov 1, 2026
  • Repository
    ranaroussi/yfinance

    https://github.com/ranaroussi/yfinance

    Supports: repo_url, vendor

    checked Nov 1, 2026
Confidence
High
Reviewed
Nov 1, 2026
Links
Verified · Nov 2, 2026

Spotted an error?

Broken link, outdated license, wrong category, or a tool that no longer exists? Tell us; reports are reviewed by the editor.

FRED (Federal Reserve Economic Data)

Federal Reserve Bank of St. Louis · Market & fundamentals data

In-depth entry

Free economic database from the St. Louis Fed aggregating hundreds of thousands of US and international time series, with graphs, vintages (ALFRED), an Excel add-in and a keyed JSON/XML API

ProprietaryFreeNov 2, 2026

Interactive Brokers API

Interactive Brokers LLC · Financial analysis & investing

In-depth entry

Programmatic trading and market-data access to Interactive Brokers accounts through the TWS API, the REST-based Web API and FIX

ProprietaryUsage-basedPaidLocalRedirected

QuantConnect

QuantConnect Corporation · Financial analysis & investing

In-depth entry

Algorithmic trading platform built on the open-source LEAN engine, with cloud backtesting, research notebooks and brokerage-connected live trading

Apache-2.0FreemiumPaidLocalNov 2, 2026

Statistics Canada

Statistics Canada (Government of Canada) · Open & public data

In-depth entry

Canada's national statistical agency publishing census, economic and social data tables with open licensing and programmatic access via Web Data Service

ProprietaryFreeNov 2, 2026

OpenFIGI

Bloomberg L.P. (FIGI Registration Authority) · Market & fundamentals data

Free API and web tool from Bloomberg for mapping tickers, ISINs, CUSIPs and other identifiers to public-domain FIGI instrument identifiers, with search and filter endpoints

ProprietaryFreeNov 2, 2026

Wharton Research Data Services (WRDS)

The Wharton School, University of Pennsylvania · Market & fundamentals data

In-depth entry

Institution-subscribed research data platform from Wharton hosting CRSP, Compustat, TAQ, OptionMetrics and dozens of other vendors' databases with web queries, SQL, SAS, Python and R access

ProprietaryEnterpriseAcademicNov 2, 2026