# Analyst Price Targets, Stock Upgrades & GAAP vs. Non-GAAP EPS API

> Fetch forward Wall Street revenue and EPS consensus estimates, buy/hold/sell ratings, price targets, and earnings surprises without mixing GAAP and non-GAAP bases.

Canonical URL: https://quantset.dev/docs/guides/analyst-estimates-upgrades-api
Full LLM API Contract: https://api.quantset.dev/llms-full.txt

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

Valuation screens silently break when you divide today's stock price by GAAP SEC EPS while comparing it against Wall Street non-GAAP forward consensus. QuantSet separates SEC XBRL GAAP statements, Street consensus revenue/EPS estimates, analyst rating distributions, and historical earnings surprises behind clean, documented endpoints.
          

          

## GAAP EPS vs. Non-GAAP consensus EPS: don't mix the basis

          

One of the most common bugs in quantitative equity models and AI financial agents is subtracting GAAP diluted EPS (from Form 10-Q/10-K) from Street consensus EPS to compute an "earnings beat":
          
            
- **GAAP Diluted EPS (`/api/v1/financial-statements/income`):** Computed under strict U.S. GAAP rules—includes stock-based compensation (SBC), acquisition intangibles amortization, restructuring charges, and mark-to-market equity gains/losses.
            
- **Street Consensus & Adjusted Actuals (`/api/v1/estimates` & `/api/v1/earnings`):** Sell-side analysts typically forecast operating ("non-GAAP") EPS excluding SBC and one-time items. Always compare actuals and estimates on the *same* basis.
          

          

## 1. Forward analyst revenue & EPS consensus estimates

          

Use this request in your client to inspect annual or quarterly forward consensus EPS and revenue estimates (high, low, mean, and analyst count) for NVIDIA:
          
            
```
curl "https://api.quantset.dev/api/v1/estimates?ticker=NVDA&metric=eps&limit=4" -H "X-API-Key: mw_demo"
```

          

          

## 2. Analyst ratings, upgrades/downgrades & price targets

          

Retrieve buy/hold/sell consensus breakdowns and price-target distributions without scraping financial portals:
          
            
```
curl "https://api.quantset.dev/api/v1/analyst-ratings?ticker=NVDA&limit=4" -H "X-API-Key: mw_demo"
```

          

          

## 3. Historical earnings surprises & upcoming earnings calendar

          

Check historical quarterly EPS beats/misses per company with `/api/v1/earnings`, or query upcoming report dates across a single symbol (`/api/v1/calendar/earnings`) or the entire market (`/api/v1/calendar/earnings` on full keys):
          
            
```
curl "https://api.quantset.dev/api/v1/earnings?ticker=AAPL&limit=4" -H "X-API-Key: mw_demo"
```

          
          
            
```
curl "https://api.quantset.dev/api/v1/calendar/earnings?ticker=MSFT" -H "X-API-Key: mw_demo"
```

          
          

**FMP drop-in compatibility:** Existing code calling Financial Modeling Prep's `/stable/analyst-estimates` or `/v3/analyst-estimates/{symbol}` works unchanged via our [FMP compatibility routes](/docs/switch/fmp).

---

## QuantSet Ecosystem & Integrations (https://quantset.dev/integrations)

- **MCP Clients & 7 Skills:** `npx quantset init` & `npx skills add quantset/skills` (Claude, Claude Code, Cursor, ChatGPT, Codex, Hermes, OpenClaw, Block Goose, Cline, Docker MCP Toolkit — `https://api.quantset.dev/mcp`)
- **Python SDK & Agent Frameworks:** `pip install "quantset[pandas]"` · `from quantset.tools import build_agent_functions, langchain_tools, crewai_tools` (PydanticAI, LangGraph, LangChain, CrewAI, Agno, AutoGen, Google ADK, OpenAI Agents SDK)
- **TypeScript SDK & Vercel AI / Mastra:** `npm install quantset` · `import { createQuantsetTools } from "quantset/tools"` (Node 20+, Bun, Deno, Cloudflare Workers, Vercel Edge)
- **Spreadsheets & Workspaces:** Google Sheets (`=QUANTSET()` & `=IMPORTDATA()`), Microsoft Excel Power Query (`?format=csv`), Notion MCP & n8n/Make webhooks (`https://quantset.dev/docs/guides/google-sheets-excel-notion-stock-templates`)
- **Drop-In Migrations & Machine Payments:** FMP `/stable/*` & `/v3/*` adapter (`https://quantset.dev/docs/switch/fmp`), `yfinance` migration (`https://quantset.dev/docs/switch/yfinance`), autonomous signup (`https://api.quantset.dev/skill.md`), and `x402` Base USDC.
