The APIVex Yahoo Finance API gives developers HTTP endpoints for stock quotes, historical prices, company financials, options chains, market discovery, and earnings calendars. Use it to build a watchlist, add price charts to a dashboard, or collect market observations for a research application.
This guide uses APIVex's third-party service. Requests go to https://api.apivex.com/yahoo-finance and authenticate with your APIVex key in the x-apivex-key header. Start with the Yahoo Finance API product page for an overview or the endpoint reference for exact inputs.
What data can you request?
| Workflow | Endpoint | Main input |
|---|---|---|
| Find a ticker by company name | GET /api/search/tickers | query |
| Retrieve one quote | GET /api/stock/quote | symbol |
| Refresh a watchlist | GET /api/market/quotes | symbols |
| Get historical candles | GET /api/stock/history | symbol, with optional interval and range |
| Read an income statement | GET /api/financials/income-statement | symbol, with optional period |
| Explore options expirations | GET /api/options/expirations | symbol |
| Get an options chain | GET /api/options/chain | symbol, with optional expiration |
The API also documents balance sheets, cash flows, dividends, analyst recommendations, ownership data, SEC filings, news, screeners, calendars, and technical indicators. Choose the endpoint for the data you need instead of collecting every available field for each symbol.
1. Resolve the symbol
If your input is a company name, search for its ticker first. Set APIVEX_API_KEY in your shell environment, then run this Bash/cURL example:
curl --get 'https://api.apivex.com/yahoo-finance/api/search/tickers' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'query=apple' \
--data-urlencode 'count=5'Search results are documented to include the symbol, name, exchange, and instrument type. Check those details before choosing a listing. A company may have more than one listing, and a similar name may refer to a different instrument.
Quote and history routes also document cryptocurrency symbols such as BTC-USD and foreign-exchange symbols such as EURUSD=X. Keep punctuation intact and URL-encode query values. Do not assume that company financial statements are available for every instrument accepted by the quote route.
2. Request a quote or a watchlist
For a single symbol:
curl --get 'https://api.apivex.com/yahoo-finance/api/stock/quote' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'symbol=AAPL'The quote route documents price, change, day range, volume, market capitalization, and extended-hours information when available. Inspect the actual response before selecting the fields your interface will display.
For several symbols, use the batch route:
curl --get 'https://api.apivex.com/yahoo-finance/api/market/quotes' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'symbols=AAPL,MSFT,NVDA'The batch endpoint accepts up to 50 symbols per request. The documentation says additional symbols are ignored, so split a larger watchlist into bounded batches rather than silently dropping its tail. Unresolved symbols are reported in not_found instead of failing the whole batch. Check for missing results even when the HTTP request succeeds.
A small Node.js watchlist request
Save this as watchlist.mjs, set APIVEX_API_KEY, and run it with Node.js 18 or later:
const key = process.env.APIVEX_API_KEY;
if (!key) throw new Error('Set APIVEX_API_KEY');
const symbols = [...new Set(['AAPL', 'MSFT', 'NVDA'])];
if (symbols.length > 50) throw new Error('Split the watchlist into batches of 50');
const url = new URL('https://api.apivex.com/yahoo-finance/api/market/quotes');
url.searchParams.set('symbols', symbols.join(','));
const response = await fetch(url, {
headers: { 'x-apivex-key': key },
signal: AbortSignal.timeout(30000),
});
const payload = await response.json();
if (!response.ok || payload.status !== true) {
throw new Error(`HTTP ${response.status}: ${payload.message || 'Request failed'}`);
}
console.log(JSON.stringify(payload.data, null, 2));The documented response envelope contains status, message, timestamp, and data. This example prints the data without inventing a nested quote schema. After inspecting a response, add validation for required fields and handling for unresolved symbols. Keep the key in your backend environment, not in browser JavaScript.
3. Add historical prices
Request daily candles for a one-month look-back window:
curl --get 'https://api.apivex.com/yahoo-finance/api/stock/history' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'symbol=AAPL' \
--data-urlencode 'interval=1d' \
--data-urlencode 'range=1mo'The history route documents open, high, low, close, adjusted close, and volume. Keep candle timestamps and interval information with the values. When comparing raw and adjusted prices, check which series your chart or calculation uses and handle missing observations explicitly.
Shorter intervals have tighter look-back limits:
| Candle interval | Maximum documented look-back |
|---|---|
1m | 5d |
5m, 15m, 30m | 1mo |
1h | 2y |
An unsupported interval/range combination returns HTTP 400 according to the API documentation. For example, a year of one-minute candles is outside the documented range. Choose a coarser interval or a shorter window rather than repeatedly retrying the same query.
Extend the workflow with fundamentals or options
For company reporting data, the financial routes accept period=annual or period=quarterly:
curl --get 'https://api.apivex.com/yahoo-finance/api/financials/income-statement' \
--header "x-apivex-key: $APIVEX_API_KEY" \
--data-urlencode 'symbol=AAPL' \
--data-urlencode 'period=quarterly'The balance-sheet and cash-flow routes use the same symbol and period inputs. Preserve reporting periods, currencies, and units when combining statements. A fiscal quarter is different from the day on which you retrieved the record.
For options, call /api/options/expirations first and choose an available date for /api/options/chain. The chain accepts type=calls, puts, or both; omitting expiration requests the nearest expiration. The API documents implied volatility but does not provide per-contract Greeks. Avoid displaying a missing field as though its value were zero.
Discovery and calendar pagination
The screener and calendar routes serve different jobs from a fixed watchlist. Use /api/screener/list to discover symbols matching a screen, and /api/calendar/earnings to retrieve reporting events for a date or range.
These routes document offset and count pagination. Start with offset zero and increase it by the requested count. For the earnings calendar, pagination operates on source listing rows before deduplication, so the number of returned unique companies may be smaller than the requested count. Do not use that difference alone as an end-of-data signal.
Bound the job, inspect the response's count information, and deduplicate across pages in your application. For date-range requests, supply start_date and end_date rather than maintaining a hardcoded date that will become stale.
Data freshness and error handling
“Latest” does not mean every symbol is streaming in real time. Yahoo documents exchange-specific data providers and delays. Check the instrument, exchange, market session, and returned quote time before labeling a price as live. Your application's retrieval timestamp is not a substitute for the quote's source timestamp.
The APIVex documentation specifies HTTP 404 for unknown symbols and HTTP 400 for invalid parameter values. Check the explanatory message, correct the input, and keep empty or unavailable data distinct from zero values. Use limited retries for transient failures and check your plan and usage before increasing refresh frequency.
A market-data request retrieves observations; it does not place an order. Keep analytical outputs separate from trade execution and verify suitability for your application's freshness requirements.
Next step
Open the Yahoo Finance endpoint reference, try one quote, and then test a small batch. Once that response fits your application, add historical candles or financial statements as a separate step. If you are new to APIVex authentication, follow the first API request guide.



