
In simple English
This library lets your programs pull stock prices and financial reports from Yahoo Finance. You can search for companies, get historical prices, and load balance sheets without paying for a data feed. It works from the command line or inside JavaScript projects. Because Yahoo does not provide an official API, changes on their website can sometimes break your scripts.
What it is
An unofficial software library for Node.js, Bun, and Deno that wraps Yahoo Finance data into structured TypeScript objects. It includes a command-line interface and support for AI coding agents.
What it is good for
Solo builders who want to add stock quotes, company profiles, or historical financial charts to their personal projects without paying for expensive market data subscriptions.
- Fetches real-time quotes, charts, and historical prices for free.
- Includes a command-line tool so you can check stock data directly from your terminal.
- Written in TypeScript for easy auto-completion and type checking in your editor.
- Relies on an unofficial source, meaning Yahoo can change their site and break your queries at any time.
- Cannot run directly inside a web browser due to security restrictions, so you must run it on a server.
- Delisted stocks lose all historical data on Yahoo, causing queries for them to fail permanently.
manual web scraping of Yahoo Finance pages
Node.js
- ranaroussi/yfinance26k stars
A popular Python library that downloads historical market data from Yahoo Finance.
- jesse-ai/jesse8.7k stars
A Python framework for writing crypto trading strategies, testing them against past prices, and running them live.
- hummingbot/hummingbot20k stars
A free framework for writing and running automated trading programs on cryptocurrency exchanges.
- lballabio/QuantLib7.7k stars
The long-established free library for pricing and risk-managing financial instruments.
npm install yahoo-finance2