Yahoo APIfinance.yahoo.com ↗
Search stock tickers and retrieve key financial statistics — PE ratio, EPS, market cap, beta, 52-week range — from Yahoo Finance via 2 structured endpoints.
What is the Yahoo API?
The Yahoo Finance API provides 2 endpoints for accessing equity data from finance.yahoo.com. Use search_ticker to find stock symbols by company name or keyword, returning exchange, sector, and industry metadata. Use get_stock_stats to pull 10+ financial fields per symbol — including PE ratio, EPS, beta, market cap, and 52-week high/low — for any valid ticker like AAPL, MSFT, or GOOGL.
curl -X GET 'https://api.parse.bot/scraper/7cd4ecc8-2548-4653-a6b1-48d9356cd29d/search_ticker?query=Apple' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace finance-yahoo-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: Yahoo Finance SDK — bounded, re-runnable; every call capped."""
from parse_apis.finance_yahoo_com_api import YahooFinance, TickerNotFound
client = YahooFinance()
# Search for tickers by company name
for ticker in client.tickers.search(query="Microsoft", limit=3):
print(ticker.symbol, ticker.name, ticker.exchange)
# Get the first match and drill into its stats via sub-resource
match = client.tickers.search(query="Tesla", limit=1).first()
if match:
stats = client.ticker(match.symbol).stats.get()
print(stats.ticker, stats.pe_ratio, stats.market_cap)
print(stats.week_high_52, stats.week_low_52, stats.dividend_yield)
# Direct stats lookup by known symbol with typed error handling
try:
aapl = client.stocks.get(ticker="AAPL")
print(aapl.current_price, aapl.eps, aapl.beta)
except TickerNotFound as e:
print("not found:", e.ticker)
print("exercised: tickers.search, ticker.stats.get, stocks.get")
Full-text search for stock tickers by company name, symbol, or keyword. Returns matching symbols with company name, exchange, type, sector, and industry. Results are auto-iterated.
| Param | Type | Description |
|---|---|---|
| queryrequired | string | Search query — company name, ticker symbol, or keyword. |
{
"type": "object",
"fields": {
"total": "integer total number of matches",
"results": "array of ticker matches with symbol, name, exchange, quote_type, sector, industry"
},
"sample": {
"data": {
"total": 6,
"results": [
{
"name": "Apple Inc.",
"sector": "Technology",
"symbol": "AAPL",
"exchange": "NASDAQ",
"industry": "Consumer Electronics",
"quote_type": "Equity"
}
]
},
"status": "success"
}
}About the Yahoo API
Ticker Search
The search_ticker endpoint accepts a free-text query parameter — a company name, ticker symbol, or keyword — and returns a ranked list of matches. Each result includes the symbol, company name, exchange, quote_type, sector, and industry. The response also surfaces a total count of matches, and results are auto-iterated so you receive the full set without manual pagination.
Stock Financial Statistics
The get_stock_stats endpoint takes a single ticker input (e.g. AAPL) and returns a flat set of key financial metrics sourced from Yahoo Finance's statistics view. Valuation fields include pe_ratio, forward_pe, and peg_ratio. Growth and earnings fields cover eps (trailing) and forward_eps. Market data includes market_cap, volume, beta, and 52_week_low. This makes it straightforward to compare valuation multiples or screen for dividend and risk characteristics across a watchlist.
Data Scope and Freshness
Coverage spans equities listed on major exchanges accessible through Yahoo Finance, including US-listed stocks. The exchange field returned by search_ticker indicates where a symbol trades. Financial statistics reflect the values Yahoo Finance displays for each ticker — these are point-in-time snapshots rather than streaming quotes, so they are best suited for screening, research workflows, and periodic data pulls rather than real-time trading applications.
The Yahoo API is a managed, monitored endpoint for finance.yahoo.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when finance.yahoo.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official finance.yahoo.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Screen stocks by PE ratio, PEG ratio, and forward EPS to build a value or growth watchlist
- Resolve a company name to its canonical ticker symbol and exchange before querying further data
- Compare market cap and beta across a portfolio to assess size and volatility distribution
- Track 52-week low values to identify equities trading near their annual floor
- Enrich an internal company database with sector and industry classifications via search_ticker
- Build a financial dashboard that displays EPS, forward PE, and volume for a configurable ticker list
- Filter search results by quote_type to separate ETFs, mutual funds, and equities in a research tool
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Yahoo Finance offer an official developer API?+
What does get_stock_stats return beyond price and volume?+
volume, the endpoint returns valuation ratios (pe_ratio, forward_pe, peg_ratio), earnings figures (eps, forward_eps), risk data (beta), and scale data (market_cap). It also includes the 52_week_low price. The response is a flat object keyed by these field names, so no nested unpacking is needed.Does search_ticker return results from all global exchanges?+
exchange field on each result identifies where the symbol is listed. Coverage of smaller or emerging-market exchanges may be incomplete depending on what Yahoo Finance itself indexes.