get_odds
Data refreshed · changelog
Every sportsbook's moneyline, spread and total for a game (5) or a day (10), with results against the line
Use it when you need each sportsbook's moneyline, spread and total for a game or a day, with results against the median close, to backtest.
Parameters
game_idstringoptional- One game.
datestringoptional- A day's games, YYYY-MM-DD (US Eastern).
leagueenum: nba | wnba | ncaam | ncaaw | nbloptional- League. Defaults to nba. One of: nba, wnba, ncaam, ncaaw, nbl.
Notes
- Over MCP, ask for it in plain English and the client calls
get_oddsitself. Point any MCP client athttps://mcp.dunkapi.com/mcp?key=YOUR_API_KEY. - Each call costs 5 credits, taken before it runs and refunded if the server errors.
- Not the call you need? Find the right call by what you are trying to answer.
Request
curl -X POST https://mcp.dunkapi.com/v1/get_odds \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"game_id": "401585601"
}'Response
{
"games": [
{
"game_id": "401585601",
"season": 2024,
"season_type": "regular",
"date": "2024-03-16",
"starts_at": "2024-03-17T00:30:00.000Z",
"status": "final",
"home": {
"team_id": "13",
"abbrev": "LAL",
"name": "Los Angeles Lakers",
"score": 121
},
"away": {
"team_id": "9",
"abbrev": "GS",
"name": "Golden State Warriors",
"score": 128
},
"periods": 4,
"overtime_periods": 0,
"neutral_site": false,
"conference_game": true,
"venue": "crypto.com Arena",
"city": "Los Angeles",
"attendance": 18997,
"books": [
{
"provider": "BetMGM",
"home_ml_open": -155,
"home_ml_close": -125,
"away_ml_open": 125,
"away_ml_close": 105,
"home_close_prob": 0.556,
"away_close_prob": 0.488,
"home_spread_open": null,
"home_spread_close": -1.5,
"spread_home_odds": -110,
"spread_away_odds": -110,
"total_open": 235.5,
"total_close": 233.5,
"over_odds": -110,
"under_odds": -110,
"captured_at": "2024-03-17T00:20:38.000Z"
},
{
"provider": "BetfairSportsbook",
"home_ml_open": -163,
"home_ml_close": -125,
"away_ml_open": 125,
"away_ml_close": 100,
"home_close_prob": 0.556,
"away_close_prob": 0.5,
"home_spread_open": -3,
"home_spread_close": -1.5,
"spread_home_odds": -111,
"spread_away_odds": -111,
"total_open": 240.5,
"total_close": 233.5,
"over_odds": -111,
"under_odds": -111,
"captured_at": "2026-10-06T18:38:25.772Z"
}
],
"result": {
"median_home_spread": -1.5,
"median_total": 233.5,
"home_covered": false,
"over": true
}
}
],
"count": 15
}Response fields
games[]array- List of objects
games[].game_idstringgames[].seasonnumbergames[].season_typestringgames[].datestringgames[].starts_atstringgames[].statusstringgames[].homeobjectgames[].home.team_idstringgames[].home.abbrevstringgames[].home.namestringgames[].home.scorenumbergames[].awayobjectgames[].away.team_idstringgames[].away.abbrevstringgames[].away.namestringgames[].away.scorenumbergames[].periodsnumbergames[].overtime_periodsnumbergames[].neutral_sitebooleangames[].conference_gamebooleangames[].venuestringgames[].citystringgames[].attendancenumbergames[].books[]array- List of objects
games[].books[].providerstringgames[].books[].home_ml_opennumbergames[].books[].home_ml_closenumbergames[].books[].away_ml_opennumbergames[].books[].away_ml_closenumbergames[].books[].home_close_probnumbergames[].books[].away_close_probnumbergames[].books[].home_spread_opennullgames[].books[].home_spread_closenumbergames[].books[].spread_home_oddsnumbergames[].books[].spread_away_oddsnumbergames[].books[].total_opennumbergames[].books[].total_closenumbergames[].books[].over_oddsnumbergames[].books[].under_oddsnumber
Used in
- NBA odds history: Each sportsbook's moneyline, spread and total for NBA games from 2013-14, with results against the line. Built for backtests. REST or MCP.
- NBA player props by sportsbook, from 2023: NBA player prop lines by sportsbook since May 2023: the closing line, and the opening line where held, with each player's history against his line. REST or MCP.
- Guide: How do I backtest NBA closing lines in Python?
Related endpoints
Takes the game_id this one returns.
One game: both box scores, every player's line, each book's line, win probability
Takes the game_id this one returns.
What the market thinks of a game: average implied and fair probability for the moneyline, spreads and totals
Takes the team this one returns.
Games with scores by season, date, range or team
Takes the team this one returns.
Upcoming games with the median line across sportsbooks
Try it
500 free credits every month: 100 calls to get_odds, and no card.