Yahoo Finance data for production apps
yfin
An extremely fast Yahoo Finance API for builders and their agents: 45+ endpoints, OpenAPI, Python, TypeScript, REST, and yfinance-compatible calls.
Use yfin from the runtime you already have.
Start with the yfinance-shaped Python SDK, use the TypeScript SDK in apps and agents, or call the hosted REST API from any language.
Download the Python SDK
Drop into yfinance-style code or use the low-level hosted API client.
pip install yfin
TypeScript
Download the TypeScript SDK
Use yfin from Node, browsers, Workers, Bun, Deno, and agent runtimes.
npm install @yfin/sdk
REST
Call the hosted API
Fetch quotes, history, options, fundamentals, screeners, and market summaries.
https://api.yfin.dev
Docs
Read the docs
Guides, concepts, rate limits, error shapes, OpenAPI, and migration notes.
docs.yfin.dev
yfinance-compatible where it matters. A real API where it counts.
yfinance is great for local notebooks. yfin keeps the familiar Python shape and adds the hosted API surface teams and agents need.
| Area | yfin | yfinance |
|---|---|---|
| Best fit | Apps, services, agents, jobs, dashboards | Local notebooks and scripts |
| Public REST API | Hosted API with stable URLs | No hosted REST API |
| Free public limits | 40 req/s anonymous, 200 req/s with contact | No managed API tier |
| SDKs | Python + TypeScript/JavaScript | Python |
| AI and tool use | OpenAPI, docs, stable HTTP routes | Requires Python execution or a custom wrapper |
| Migration | Use import yfin as yf |
Already yfinance |
One market-data surface, three entry points.
Use the SDK when it fits. Use REST when you want the same data from another language, service, or agent.
import yfin as yf
ticker = yf.Ticker("AAPL", contact="you@example.com")
print(ticker.history(period="5d", interval="1d"))
print(ticker.fast_info)
import { Client } from "@yfin/sdk";
const yfin = new Client({ contact: "you@example.com" });
const quote = await yfin.quote(["AAPL", "MSFT"]);
console.log(quote.data);
No signup. Install yfin and go.
Start free, add a contact identity when your app needs more room, and move to an API key when your workload grows.