A research card that collects each analyst note by hand will lag the consensus target, range, and rating split for AAPL.
This guide calls GET /v2/markets/stock/price-targets with ticker=AAPL and walks the sample mean target 220.5, the range 165.0 to 275.0, buy 28, hold 12, sell 2, and the historical consensus label Buy. This is the v2 price-targets path. /v1/markets/stock/analyst-ratings is a different endpoint.
To access this endpoint, you must obtain an API key: Get your API key
The Endpoint
The consensus overview and a historical consensus series for one ticker live on this path. Pass the required ticker. The sample uses AAPL. body.symbol echoes that ticker.
Method: GET
Endpoint: https://api.mboum.com/v2/markets/stock/price-targets?ticker=AAPL
Documentation: Price targets
Parameters
- ticker: required. The sample uses AAPL. This path is /v2/markets/stock/price-targets.
Python Example
The function requests AAPL price targets and prints the mean target, the low and high, the buy hold and sell counts, then y, consensus, and date from the first historical item.
import requests
def fetch_price_targets():
url = "https://api.mboum.com/v2/markets/stock/price-targets"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
params = {"ticker": "AAPL"}
response = requests.get(url, headers=headers, params=params)
response.raise_for_status()
return response.json()
body = fetch_price_targets()["body"]
overview = body["consensusOverview"]
print(body["symbol"], overview["priceTarget"], overview["lowPriceTarget"], overview["highPriceTarget"])
print(overview["buy"], overview["hold"], overview["sell"])
hist = body.get("historicalConsensus") or []
if hist:
item = hist[0]
print(item["y"], item["z"]["consensus"], item["z"]["date"])
Understanding the Response
body.symbol is AAPL. consensusOverview sets lowPriceTarget to 165.0, highPriceTarget to 275.0, priceTarget to 220.5, buy to 28, sell to 2, and hold to 12. The sample historicalConsensus item has x 1727395200 and y 220.5. Its z object has buy 28, hold 12, sell 2, date 2024-09-27, consensus Buy, and latest true.
{
"body": {
"symbol": "AAPL",
"consensusOverview": {
"lowPriceTarget": 165.0,
"highPriceTarget": 275.0,
"priceTarget": 220.5,
"buy": 28,
"sell": 2,
"hold": 12
},
"historicalConsensus": [
{
"x": 1727395200,
"y": 220.5,
"z": {
"buy": 28,
"hold": 12,
"sell": 2,
"date": "2024-09-27",
"consensus": "Buy",
"latest": true
}
}
]
}
}
consensusOverview.priceTarget is the mean target, 220.5 in the sample. In historicalConsensus, y is the price point and z.consensus is the label. On the sample item y is also 220.5 and z.consensus is Buy. Keep those two fields separate when you chart or filter the series.
Key Fields
- Overview: body.symbol plus consensusOverview lowPriceTarget, highPriceTarget, priceTarget, buy, sell, and hold. The sample symbol is AAPL, the targets are 165.0, 275.0, and 220.5, and the counts are buy 28, sell 2, and hold 12.
- History point: each historicalConsensus item has x, y, and z. The sample x is 1727395200 and y is 220.5.
- History detail: z contains buy, hold, sell, date, consensus, and latest. The sample z is buy 28, hold 12, sell 2, date 2024-09-27, consensus Buy, and latest true.
Practical Use Cases
Consensus card for AAPL
Pass ticker AAPL and show priceTarget 220.5 between lowPriceTarget 165.0 and highPriceTarget 275.0, with buy 28, hold 12, and sell 2.
Historical consensus series
Walk historicalConsensus when you need the series. On the sample item, y is 220.5 and z.consensus is Buy on date 2024-09-27, with latest true.
Learn more or explore other endpoints: Price targets