NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

Analyst Ratings API

The Analyst Ratings API returns Wall Street analyst ratings and price targets for US-listed stocks as JSON: every upgrade, downgrade, initiation, reiteration and price target change, with the research firm, the rating and price target before and after, and the date. It covers over 3,500 stocks and over 130 research firms, and new analyst actions are added every 15 minutes.

/v1/pricetarget returns the current picture for a stock: the consensus price target (average, median, high and low), the number of buy, hold and sell ratings, a consensus rating, and each firm's latest rating and price target.

Available on paid plans, with analyst actions from the last 12 months. The full history is available on Business tier and above.

Use it to show analyst ratings and price targets in an investing app, screen for upgrades and downgrades, get alerted to price target changes, or test how stocks move after analyst actions.

Online
(4.5)

From 6,781 users

800+

Application used this API in the last 28 days.

API Status

Online - All Systems Operational

Didn't find what you were looking for? Suggest an improvement

2 endpoints

Premium only

https://api.api-ninjas.com/v1/analystratings

Returns analyst ratings and price target changes for a stock, newest first: every initiation, upgrade, downgrade, reiteration and price target change, with the research firm and the rating and price target before and after. Or pass a date to list every analyst action on that day. Each action is one of: initiated (the firm starts covering the stock), upgrade or downgrade (it raises or lowers its rating, e.g. from Hold to Buy), target_raised or target_lowered (it raises or lowers its price target and keeps its rating), target_set (it states a price target without saying whether it changed), reiterated (it repeats its rating, and its price target if it has one), assumed (a new analyst at the firm takes over coverage), resumed (coverage resumes after a pause), reinstated (the firm reinstates its rating after a pause, e.g. after advising on a deal) or rating_change (a new rating that is neither higher nor lower, e.g. on a new rating scale).

Parameters

Either ticker or date is required.

  • ticker  optional

    Stock ticker, e.g. AAPL.

    Write the symbol the way you normally would. Share classes work as BRK.B, BRK-B, BRK/B or BRKB, and preferred shares as BAC.PRL, BAC-PL or BAC^L.

    • Share classes: BRK.B, BRK/B, BRK B, BRKB → BRK-B
    • Preferred shares: BAC.PRL, BAC PR L, BAC^L, BACpL → BAC-PL
    • Warrants: BKKT.WS, BKKT+, BKKT/WS → BKKT-WT
    • Units: AAC.U, AAC=, AAC/U → AAC-UN
    • US exchange prefix: NYSE:BRK.B → BRK-B
    • Lower case or a $ prefix: brk.b, $BRK.B → BRK-B
  • date  optional

    A single date (YYYY-MM-DD). Returns every analyst action on that day, for every stock or, with ticker, for one stock.

  • start_date  optional

    Earliest date (YYYY-MM-DD), inclusive. Paid plans include the last 12 months; the full history is available on Business tier and above.

  • end_date  optional

    Latest date (YYYY-MM-DD), inclusive.

  • firm  optional

    Research firm name, e.g. Morgan Stanley or Goldman. Common spellings of a firm match, e.g. BofA and Bank of America.

  • action  optional

    One action, e.g. upgrade or target_raised. The actions are listed in the endpoint description above.

  • limit  optional

    Number of actions to return (1-100). Default 20.

  • offset  optional

    Number of actions to skip, for paging. Default 0.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/analystratings endpoint returns a JSON array of analyst actions with the following fields (an empty array when nothing matches), or an error if the request is unsuccessful (see errors).

  • ticker

    Stock ticker.

  • date

    Date of the action (YYYY-MM-DD).

  • firm

    The research firm, e.g. Morgan Stanley.

  • action

    What the firm did, e.g. upgrade or target_raised. The actions are listed in the endpoint description above.

  • rating

    The firm's rating after the action, in its own words, e.g. Buy, Overweight or Market Perform. null when the action did not state one.

  • rating_prior

    The firm's rating before the action.

  • price_target

    The firm's 12-month price target after the action. null when the action did not state one.

  • price_target_prior

    The firm's price target before the action.

  • currency

    Currency of the price targets, e.g. USD.

Live Demo

Live demo
Query parameters
ticker

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/analystratings?ticker=AAPL
Sample response
[
{
"ticker": "AAPL",
"date": "2026-11-12",
"firm": "KeyBanc Capital Markets",
"action": "reiterated",
"rating": "Underweight",
"rating_prior": "Underweight",
"price_target": null,
"price_target_prior": null,
"currency": null
},
{
"ticker": "AAPL",
"date": "2026-11-11",
"firm": "China Renaissance",
"action": "upgrade",
"rating": "Buy",
"rating_prior": "Hold",
"price_target": null,
"price_target_prior": null,
"currency": null
},
{
"ticker": "AAPL",
"date": "2026-11-04",
"firm": "Bernstein",
"action": "target_raised",
"rating": "Outperform",
"rating_prior": "Outperform",
"price_target": 380,
"price_target_prior": 370,
"currency": "USD"
},
"..."
]

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/analystratings?ticker=AAPL" \ -H "X-Api-Key: YOUR_API_KEY"

Premium only

https://api.api-ninjas.com/v1/pricetarget

Returns the consensus price target and analyst rating for a stock: the average, median, high and low of the analysts' price targets, the number of buy, hold and sell ratings, and each research firm's latest rating and price target.

Parameters

  • ticker  required

    Stock ticker, e.g. AAPL.

    Write the symbol the way you normally would. Share classes work as BRK.B, BRK-B, BRK/B or BRKB, and preferred shares as BAC.PRL, BAC-PL or BAC^L.

    • Share classes: BRK.B, BRK/B, BRK B, BRKB → BRK-B
    • Preferred shares: BAC.PRL, BAC PR L, BAC^L, BACpL → BAC-PL
    • Warrants: BKKT.WS, BKKT+, BKKT/WS → BKKT-WT
    • Units: AAC.U, AAC=, AAC/U → AAC-UN
    • US exchange prefix: NYSE:BRK.B → BRK-B
    • Lower case or a $ prefix: brk.b, $BRK.B → BRK-B

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v1/pricetarget endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful (see errors).

  • ticker

    Stock ticker.

  • price_target_average

    Average of each firm's latest price target from the last 6 months.

  • price_target_median

    Median of those price targets.

  • price_target_high, price_target_low

    Highest and lowest of those price targets.

  • number_of_price_targets

    Number of firms behind the price target figures.

  • currency

    Currency of the price targets, USD.

  • consensus_rating

    Buy, Hold or Sell, from the buy, hold and sell ratings below.

  • buy_ratings, hold_ratings, sell_ratings

    Number of firms whose latest rating from the last 12 months is a buy (e.g. Buy, Outperform, Overweight), a hold (e.g. Hold, Neutral, Market Perform) or a sell (e.g. Sell, Underperform, Underweight).

  • last_updated

    Date of the latest analyst action on the stock (YYYY-MM-DD).

  • firms

    Each firm with an action in the last 12 months, latest first, with the fields below.

  • firms[].firm, firms[].date, firms[].action

    The research firm, and the date and type of its latest action.

  • firms[].rating, firms[].price_target, firms[].currency

    The firm's current rating and price target.

Live Demo

Live demo
Query parameters
ticker

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/pricetarget?ticker=AAPL
Sample response
{
"ticker": "AAPL",
"price_target_average": 342.86,
"price_target_median": 352.5,
"price_target_high": 400,
"price_target_low": 250,
"number_of_price_targets": 24,
"currency": "USD",
"consensus_rating": "Buy",
"buy_ratings": 27,
"hold_ratings": 13,
"sell_ratings": 3,
"last_updated": "2026-11-12",
"firms": [
{
"firm": "KeyBanc Capital Markets",
"date": "2026-11-12",
"action": "reiterated",
"rating": "Underweight",
"price_target": 250,
"currency": "USD"
},
{
"firm": "China Renaissance",
"date": "2026-11-11",
"action": "upgrade",
"rating": "Buy",
"price_target": null,
"currency": null
},
{
"firm": "Evercore ISI",
"date": "2026-11-04",
"action": "reiterated",
"rating": "Outperform",
"price_target": 380,
"currency": "USD"
},
"..."
]
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v1/pricetarget?ticker=AAPL" \ -H "X-Api-Key: YOUR_API_KEY"

Errors

An invalid request returns HTTP 400 with a JSON body holding a readable error message, e.g. {"error": "ticker is required."}. Authentication and quota errors use the standard format described in error codes.

CauseExample error
Neither ticker nor dateProvide a ticker, or a date to list every action on that day.
An unknown parameterUnknown parameter: foo.
A date that is not valid, e.g. start_date=2026-13-01start_date must be a valid date in YYYY-MM-DD format.
An action that is not listedaction must be one of: initiated, upgrade, downgrade, ...
A start_date more than 12 months back on a Developer planPaid plans include analyst actions from the last 12 months (since 2025-12-03). The full history is available on Business, Professional and Enterprise plans: https://api-ninjas.com/pricing
Any request on the free planThe Analyst Ratings API is available on paid plans only: https://api-ninjas.com/pricing

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Analyst Ratings API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • Analysts at banks and research firms rate the stocks they cover, e.g. Buy, Hold or Sell (or Outperform, Overweight and similar), and most set a 12-month price target: the price they expect the stock to reach. When they change either, it is an upgrade, a downgrade or a price target change. The Analyst Ratings API returns these actions for US-listed stocks as JSON, with the research firm, the rating and price target before and after, and the date.
  • /v1/pricetarget takes each research firm's latest price target from the last 6 months and returns their average, median, high and low, with the number of firms. The buy, hold and sell counts use each firm's latest rating from the last 12 months, and consensus_rating is Buy, Hold or Sell from those counts.
  • New analyst actions are added every 15 minutes.
  • Every paid plan, with analyst actions from the last 12 months. Business, Professional and Enterprise plans include the full history.