Yahoo API: Get analyst ratings
Shows analyst recommendations, price targets, earnings estimates and recent rating changes for a public company on Yahoo Finance.
Unofficial. Not affiliated with or endorsed by Yahoo.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Company, required
company Company name or stock ticker, for example Nvidia or NVDA.
Nvidia
Input as JSON
{ "company": "Nvidia"}Output
{ "ticker": "NVDA", "currency": "USD", "buy_count": 49, "page_link": "https://finance.yahoo.com/quote/NVDA/analysis/" , "hold_count": 2, "sell_count": 1, "company_name": "NVIDIA Corporation", "current_price": 212.21, "consensus_rating": "Strong Buy", "low_price_target": 180, "strong_buy_count": 10, "high_price_target": 515, "strong_sell_count": 0, "next_earnings_date": "2026-11-17", "number_of_analysts": 58, "median_price_target": 315, "average_price_target": 328.95346, "recent_rating_changes": [ { "date": "2026-10-22", "firm": "Needham", "action": "Reiterates", "to_rating": "Buy", "from_rating": "Buy", "price_target": 300 }, { "date": "2026-10-01", "firm": "Cantor Fitzgerald", "action": "Reiterates", "to_rating": "Overweight", "from_rating": "Overweight", "price_target": 350 }, { "date": "2026-09-29", "firm": "Rosenblatt", "action": "Maintains", "to_rating": "Buy", "from_rating": "Buy", "price_target": 390 } ], "current_year_eps_estimate": 9.31242, "mean_recommendation_score": 1.29032, "current_quarter_eps_estimate": 2.47325, "current_year_revenue_estimate": 411653417250, "current_quarter_revenue_estimate": 108976833310}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_analyst_ratings","input":{"company":"Nvidia"}}' # 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_analyst_ratings" , "input": { "company": "Nvidia" }})# 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_analyst_ratings" , "input": { "company": "Nvidia" } }), 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_analyst_ratings# with {"company":"Nvidia"}"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": [ "company" ], "properties": { "company": { "type": "string", "minLength": 1, "description": "Company name or stock ticker, for example Nvidia or NVDA." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "company_name", "ticker", "currency", "current_price", "consensus_rating", "number_of_analysts", "strong_buy_count", "buy_count", "hold_count", "sell_count", "strong_sell_count", "average_price_target", "median_price_target", "low_price_target", "high_price_target", "next_earnings_date", "current_quarter_eps_estimate", "current_year_eps_estimate", "current_quarter_revenue_estimate", "current_year_revenue_estimate", "recent_rating_changes", "mean_recommendation_score", "page_link" ], "properties": { "ticker": { "type": "string", "description": "Stock ticker." }, "currency": { "type": [ "string", "null" ], "description": "ISO currency code for prices and targets." }, "buy_count": { "type": [ "integer", "null" ], "description": "Analysts with a buy rating this month." }, "page_link": { "type": "string", "description": "Yahoo Finance analysis page for this company." }, "hold_count": { "type": [ "integer", "null" ], "description": "Analysts with a hold rating this month." }, "sell_count": { "type": [ "integer", "null" ], "description": "Analysts with a sell rating this month." }, "company_name": { "type": [ "string", "null" ], "description": "Company name on Yahoo Finance." }, "current_price": { "type": [ "number", "null" ], "description": "Latest regular-market share price in the stated currency." }, "consensus_rating": { "type": [ "string", "null" ], "description": "Overall recommendation: Strong Buy, Buy, Hold, Underperform, or Sell." }, "low_price_target": { "type": [ "number", "null" ], "description": "Lowest analyst price target per share in the stated currency." }, "strong_buy_count": { "type": [ "integer", "null" ], "description": "Analysts with a strong buy rating this month." }, "high_price_target": { "type": [ "number", "null" ], "description": "Highest analyst price target per share in the stated currency." }, "strong_sell_count": { "type": [ "integer", "null" ], "description": "Analysts with a strong sell rating this month." }, "next_earnings_date": { "type": [ "string", "null" ], "format": "date", "description": "Next scheduled earnings report date, if Yahoo shows one." }, "number_of_analysts": { "type": [ "integer", "null" ], "description": "Number of analyst opinions for the consensus." }, "median_price_target": { "type": [ "number", "null" ], "description": "Median analyst price target per share in the stated currency." }, "average_price_target": { "type": [ "number", "null" ], "description": "Average analyst price target per share in the stated currency." }, "recent_rating_changes": { "type": "array", "items": { "type": "object", "required": [ "date", "firm", "action", "from_rating", "to_rating", "price_target" ], "properties": { "date": { "type": [ "string", "null" ], "format": "date" }, "firm": { "type": [ "string", "null" ] }, "action": { "type": [ "string", "null" ] }, "to_rating": { "type": [ "string", "null" ] }, "from_rating": { "type": [ "string", "null" ] }, "price_target": { "type": [ "number", "null" ], "description": "New price target per share in the stated currency, if shown." } }, "additionalProperties": false }, "description": "Up to 10 most recent analyst rating actions, newest first." }, "current_year_eps_estimate": { "type": [ "number", "null" ], "description": "Average earnings per share estimate for the current fiscal year." }, "mean_recommendation_score": { "type": [ "number", "null" ], "description": "Mean analyst recommendation score; 1 is strongest buy and 5 is sell.", "x-fous-developer": true }, "current_quarter_eps_estimate": { "type": [ "number", "null" ], "description": "Average earnings per share estimate for the current quarter." }, "current_year_revenue_estimate": { "type": [ "number", "null" ], "description": "Average revenue estimate for the current fiscal year in the stated currency." }, "current_quarter_revenue_estimate": { "type": [ "number", "null" ], "description": "Average revenue estimate for the current quarter in the stated currency." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
finance.yahoo.com/get_analyst_ratings- Returns
- consensus rating, analyst counts, price targets, earnings and revenue estimates, recent rating changes
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_analyst_ratings with the inputs above.
Ask your agent
- What is the consensus analyst rating for NVDA and how many analysts cover it?
- Show me the latest price targets analysts have set for Tesla
- Can you pull up the earnings and revenue estimates for Apple for the next quarter?
- Which analysts recently upgraded or downgraded Microsoft stock?
- On Yahoo Finance, what are the analyst recommendations and high versus low price targets for Amazon?
See more
All Yahoo methodsLooks 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 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_quoteLists 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_moversReturns Yahoo Finance daily, weekly or monthly price history and total adjusted-close return for a stock, fund, index or cryptocurrency.
finance.yahoo.com/get_price_historyLooks 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_statsSearches 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_newsLists the latest Yahoo News headlines for a section in page order, with summary, byline, original publisher, image and publication time when the article provides them.
yahoo.com/list_headlines