Yahoo Finance2
Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill
Install: npx skills add gadicc/yahoo-finance2
Install
npx skills add gadicc/yahoo-finance2Install command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →yahoo-finance2
Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill.
Copyright (c) 2021 by Gadi Cohen and Pilwon Huh. MIT licensed.
You are reading the docs for v4, the current major version published as
yahoo-finance2@latest. For the older v3 docs, click
here. Upgrading? See
UPGRADING.
Live Demo on CodeSandbox (Updated 2024-06-17; NextJS with both RSC and Hook-Relay examples)
NB: Recently the repo was renamed from node-yahoo-finance2 to
yahoo-finance2, and the following branches were named, master to main,
and devel to dev. See UPGRADING.md#dev for the
git commands to update your local installation.
Supported runtimes:
- Bun: v1+.
- Cloudflare: Modern releases, tested in CI via Workers Vitest under
nodejs_compat. - Deno: v2+.
- Node: v22+; v22 until 2027-04-30, v24 until 2028-04-30. Supported releases follow the Node.js release schedule.
Unofficial API
This project is neither created nor endorsed by Yahoo Inc. Yahoo does not provide any official API to developers, nor makes any guarantees regarding service availability or API consistency. In practice however, the open source community has kept this project (and it's predecessor) working well since 2013.
Nevertheless, we make no guarantees and you use this package at your own risk. The developers (and obviously Yahoo) cannot be held responsible for any losses you may incur as a result of using this service. Use of this package is considered acknowledgement and acceptance of these terms and of its license.
Quickstart
CLI (Command line interface)
$ npx yahoo-finance2 --help
$ npx yahoo-finance2 search AMZN
$ npx yahoo-finance2 quoteSummary GOOGL
$ npx yahoo-finance2 quoteSummary NVDA '{"modules":["assetProfile", "secFilings"]}'
# or install it
$ npm install -g yahoo-finance2
$ yahoo-finance search MSFT '{ "someOption": true }'
See the CLI docs for stdout/stderr behavior and exit codes.
See the MCP docs to expose yahoo-finance2 tools to MCP clients such as Codex, Claude, Cursor, and VS Code.
Importing
// or: const YahooFinance = require("yahoo-finance2").default;
import YahooFinance from "yahoo-finance2";
const yahooFinance = new YahooFinance();
const results = await yahooFinance.search("Apple");
const quote = await yahooFinance.quote('AAPL');
const { regularMarketPrice as price, currency } = quote;
Similar plugs
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
Turn any codebase, with its docs, SQL schemas, configs, and PDFs, into a queryable knowledge graph. A /graphify skill for Claude Code, Cursor, Codex, and Gemini CLI: local…
Why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Persistent Context Across Sessions for Every Agent, Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future…
Production-grade engineering skills for AI coding agents.