Yahoo API: Get price history
Returns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.
Unofficial. Not affiliated with or endorsed by Yahoo.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Asset, required
asset Company, fund, index, or cryptocurrency name or ticker, for example Apple, AAPL, S&P 500, or Bitcoin.
Apple
- End Date optional
end_date Last date to include (YYYY-MM-DD), for example 2026-09-18. Defaults to today.
2026-09-18
- Frequency optional
frequency Price grouping, for example weekly. Defaults to daily.
daily (default)
One of
daily,weekly,monthly.- Start Date optional
start_date First date to include (YYYY-MM-DD), for example 2026-01-01. Defaults to one year ago.
2026-09-01
Input as JSON
{ "asset": "Apple", "end_date": "2026-09-18", "start_date": "2026-09-01"}Output
{ "name": "Apple Inc.", "prices": [ { "low": 314.7300109863281, "date": "2026-09-01", "high": 327.29998779296875, "open": 316.9800109863281, "close": 325.1300048828125, "volume": 53167400, "adjusted_close": 325.1300048828125 }, { "low": 323.5299987792969, "date": "2026-09-02", "high": 328.3999938964844, "open": 326.8699951171875, "close": 324.9599914550781, "volume": 33776400, "adjusted_close": 324.9599914550781 }, { "low": 324.1099853515625, "date": "2026-09-03", "high": 330.80999755859375, "open": 324.8699951171875, "close": 328.2099914550781, "volume": 37225800, "adjusted_close": 328.2099914550781 } ], "ticker": "AAPL", "currency": "USD", "yahoo_finance_link": "https://finance.yahoo.com/quote/AAPL/history/" , "total_return_percent": 3.383262028973544}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"finance.yahoo.com/get_price_history","input":{"asset":"Apple","end_date":"2026-09-18","start_date":"2026-09-01"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "finance.yahoo.com/get_price_history" , "input": { "asset": "Apple", "end_date": "2026-09-18", "start_date": "2026-09-01" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "finance.yahoo.com/get_price_history" , "input": { "asset": "Apple", "end_date": "2026-09-18", "start_date": "2026-09-01" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run finance.yahoo.com/get_price_history# with {"asset":"Apple","end_date":"2026-09-18","start_date":"2026-09-01"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "asset" ], "properties": { "asset": { "type": "string", "minLength": 1, "description": "Company, fund, index, or cryptocurrency name or ticker, for example Apple, AAPL, S&P 500, or Bitcoin." }, "end_date": { "type": "string", "description": "Last date to include (YYYY-MM-DD), for example 2026-09-18. Defaults to today." }, "frequency": { "enum": [ "daily", "weekly", "monthly" ], "type": "string", "default": "daily", "description": "Price grouping, for example weekly. Defaults to daily." }, "start_date": { "type": "string", "description": "First date to include (YYYY-MM-DD), for example 2026-01-01. Defaults to one year ago." } }}Output schema
{ "type": "object", "required": [ "name", "ticker", "currency", "total_return_percent", "yahoo_finance_link", "prices" ], "properties": { "name": { "type": "string" }, "prices": { "type": "array", "items": { "type": "object", "required": [ "date", "open", "high", "low", "close", "adjusted_close", "volume" ], "properties": { "low": { "type": [ "number", "null" ] }, "date": { "type": "string", "format": "date" }, "high": { "type": [ "number", "null" ] }, "open": { "type": [ "number", "null" ] }, "close": { "type": [ "number", "null" ] }, "volume": { "type": [ "integer", "null" ] }, "adjusted_close": { "type": [ "number", "null" ] } }, "additionalProperties": false }, "maxItems": 5000 }, "ticker": { "type": "string" }, "currency": { "type": [ "string", "null" ] }, "yahoo_finance_link": { "type": "string", "format": "uri" }, "total_return_percent": { "type": [ "number", "null" ], "description": "Percentage change from first to last adjusted close; null when unavailable." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
finance.yahoo.com/get_price_history- Returns
- name, ticker, currency, total return percent, price rows (date, open, high, low, close, adjusted close, volume)
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method finance.yahoo.com/get_price_history with the inputs above.
Ask your agent
- Show me the weekly closing prices for Tesla from January 2025 through June 2025, with the total return percentage.
- I need the monthly adjusted close history for the Vanguard S&P 500 ETF over the last three years.
- Pull daily open, high, low and volume data for Microsoft between 2026-03-01 and 2026-03-31 on Yahoo Finance.
- What has Bitcoin's total return been over the past five years, grouped monthly?
- Get the historical daily price rows for the NASDAQ Composite index for the period ending 2026-09-18, starting 2026-01-01.
See more
All Yahoo methodsLooks up a stock, fund, index, or cryptocurrency by name or ticker and returns its latest displayed price and key statistics. Unavailable figures are null; quotes may be delayed.
finance.yahoo.com/get_quoteLooks up a company by name or ticker on Yahoo Finance and returns its latest news headlines, with article summaries when the article page provides one.
finance.yahoo.com/get_company_newsGets earnings reports for a date range, or the upcoming reports and up to four previous reports for one company.
finance.yahoo.com/get_earnings_calendarLooks up a Yahoo Sports player by name and returns the player's regular-season statistics for a season, alongside career totals. Each stat includes season and career values.
sports.yahoo.com/get_player_statsLists Yahoo Finance's top gainers, top losers, most active stocks, or regional trending tickers in Yahoo's order, with price, change, volume and market cap.
finance.yahoo.com/list_market_moversShows analyst recommendations, price targets, earnings estimates and recent rating changes for a public company on Yahoo Finance.
finance.yahoo.com/get_analyst_ratingsSearches Yahoo News articles by keyword, newest first or by relevance, with optional publication dates and pages; returns only articles hosted on Yahoo News, with authors, original publisher and section.
yahoo.com/search_newsGets scores and schedules for a league on a date, or for the football week that contains the date. Results can be limited to one team. Venue names come from each game page, for up to 22 games.
sports.yahoo.com/get_scores