claudeers.
// Claude Skills

yahoo-finance2

Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill

// Claude Skills[ cli ][ api ][ web ][ claude ]#claude#agent-skill#finance#mcp-server#yahoo#yahoo-finance#skills◷ MIT$open-sourceupdated 29 days ago
Slowing down
94/100
last commit about 2 months ago
last release about 2 months ago
releases 150
open issues 81
// star history

Install with your AI

Paste into Claude Code, Cursor, or any agent — it reads the repo and wires the tool into your project.

Install and set up yahoo-finance2 (release-binary project) into my current project.
Found on https://claudeers.com/yahoo-finance2
Repo: https://github.com/gadicc/yahoo-finance2
Homepage/docs: https://www.npmjs.com/package/yahoo-finance2
Detected install method: release-binary → inspect the README
Category: skills. Platforms: cli, api, web.
Read the repo's README for exact setup and env vars, then install it and wire it into my project.

Claudeers Health Verdict:
slowing; community-verified: false. Confirm the source before running anything.
// or install directly (release-binary)

Grab the latest release asset from GitHub.

# download a build from https://github.com/gadicc/yahoo-finance2/releases
// or clone
git clone https://github.com/gadicc/yahoo-finance2

// compatibility

Platformscli, api, web
Operating systems—
AI compatibilityclaude
LicenseMIT
Pricingopen-source
LanguageHTML

Get your FREE $2.50 API credits to access TickAtlas financial data ↗

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;

Available modules: chart, fundamentalsTimeSeries, historical, insights, options, quote, quoteSummary (submodules: assetProfile, balanceSheetHistory, balanceSheetHistoryQuarterly, calendarEvents, cashflowStatementHistory, cashflowStatementHistoryQuarterly, defaultKeyStatistics, earnings, earningsHistory, earningsTrend, financialData, fundOwnership, fundPerformance, fundProfile, incomeStatementHistory, incomeStatementHistoryQuarterly, indexTrend, industryTrend, insiderHolders, insiderTransactions, institutionOwnership, majorDirectHolders, majorHoldersBreakdown, netSharePurchaseActivity, price, quoteType, recommendationTrend, secFilings, sectorTrend, summaryDetail, summaryProfile, symbol, topHoldings, upgradeDowngradeHistory), recommendationsBySymbol, screener, search, trendingSymbols.

Extras: quoteCombine.

See the Explanatatory Documentation and Full API Documentation.

Particularly, make sure to read the notes there on ERROR HANDLING. Be aware that if a stock gets delisted, Yahoo removes all related data, including historical (and chart) data from periods before the delisting occurred (i.e. queries that worked before will start failing, and there is no way to retrieve this data again).

Agent Skill

This repo ships an Agent Skills-compatible skill at skills/yahoo-finance2. Install it for compatible agents with:

npx skills add gadicc/yahoo-finance2

The npm package also includes the skill under skills/yahoo-finance2 for tools that sync skills from installed packages.

(Optional) TypeScript Love

Working with yahoo-finance2 is a joy if you're using TypeScript (but you don't have to), with type checking and auto completion:

Types Animation

Try it yourself on our Live CodeSandbox.

Using in the Browser

It's not possible to run this in the browser, due to CORS and cookie issues. You should execute calls on a server or in a serverless or edge function, and pass this data to the browser as required. See the CodeSandbox above for examples. Use React Server Components, trpc, or other strategies to maintain types.

  • 📈 Ghostfolio - mature, open-source Wealth Management & longtime supporter.

  • 🛠️ StockQuotes.MCP - AI MCP Server to fetch real time financial data.

  • ⚡ live-quotes - Demo to showcase running yahoo-finance2 in cloudflare workers with live quotes.

  • 🦊 Foliofox - Open-source portfolio tracker with an AI financial advisor.

Want your project listed? Open a PR to add it here.

Contributing

Pull Requests welcome! Read CONTRIBUTING.md and join our list of heroes:

contributors badge

Credits

  • Massive thanks to @pilwon for the original node-yahoo-finance and for all our prior collaborations on this and other projects 🙏

  • Special mention goes out to pudgereyem and PythonCreator27 who made significant contributions in the very early days of this project.

// faq

What is yahoo-finance2?

Unofficial API for Yahoo Finance with CLI, MCP and Agent Skill. It is open-source on GitHub.

Is yahoo-finance2 free to use?

yahoo-finance2 is open-source under the MIT license, so it is free to use.

What category does yahoo-finance2 belong to?

yahoo-finance2 is listed under skills in the Claudeers registry of Claude-compatible tools.

6 views
★ 801 stars
unclaimed
updated 29 days ago

// embed badge

yahoo-finance2 on Claudeers
[![Claudeers](https://claudeers.com/api/badge/yahoo-finance2.svg)](https://claudeers.com/yahoo-finance2)

// retro hit counter

yahoo-finance2 hit counter
[![Hits](https://claudeers.com/api/counter/yahoo-finance2.svg)](https://claudeers.com/yahoo-finance2)

// reviews

// guestbook

0/500

// related in Claude Skills

🔓

An agentic skills framework & software development methodology that works.

// skillsobra/⟨Shell⟩★ 292,190◷ MIT[ claude ]
🔓

Public repository for Agent Skills

// skillsanthropics/⟨Python⟩★ 178,324[ claude ]
🔓

💫 Toolkit to help you get started with Spec-Driven Development

// skillsgithub/⟨Python⟩★ 138,919◷ MIT[ claude ]
🔓

AI coding assistant skill (Claude Code, Codex, OpenCode, Cursor, Gemini CLI, and more). Turn any folder of code, SQL schemas, R scripts, shell scripts, docs,…

// skillsGraphify-Labs/⟨Python⟩★ 123,800◷ MIT[ claude ]

// built by

→ see how yahoo-finance2 connects across the ecosystem