NBA odds API · sport 4 · REST + WebSocket
NBA odds API.
Every book. One request.
Game lines, alternates, halves, quarters, team totals, player props, and futures from 25 books, on stable event IDs. Pull a REST snapshot or stream every change.
Free key · 20,000 data points a day · No credit card
RequestPython 3 · requests
import os
from datetime import datetime, timezone
import requests
key = os.environ["THERUNDOWN_API_KEY"]
api = "https://therundown.io/api/v2"
headers = {"X-TheRundown-Key": key}
# Next NBA game date: regular season (4), preseason (23), or playoffs (24)
dates = requests.get(
f"{api}/sports/dates",
params={"sport_ids": "4,23,24", "format": "epoch"},
headers=headers,
timeout=30,
).json()
now = datetime.now(timezone.utc).timestamp()
upcoming = [
(sport_id, stamp)
for sport_id, body in dates.items()
for stamp in body.get("dates") or []
if stamp > now
]
sport_id, stamp = min(upcoming, key=lambda row: row[1], default=("4", now))
date = datetime.fromtimestamp(stamp, timezone.utc).date().isoformat()
# Moneyline, spread, and total from DraftKings, FanDuel, and BetMGM
odds = requests.get(
f"{api}/sports/{sport_id}/events/{date}",
params={"market_ids": "1,2,3", "affiliate_ids": "19,22,23", "main_line": "true"},
headers=headers,
timeout=30,
)
print(odds.text)Response200 · trimmed
{
"events": [{
"event_id": "79a4cf7dae22812ab3bcdfb70166d672",
"sport_id": 4,
"event_date": "2026-10-21T01:30:00Z",
"markets": [{
"market_id": 1,
"name": "moneyline",
"participants": [{
"id": 18,
"type": "TYPE_TEAM",
"name": "Oklahoma City Thunder",
"lines": [{
"prices": {
"19": { "price": 105, "updated_at": "2026-09-29T23:44:04Z" },
"22": { "price": 105, "updated_at": "2026-08-12T16:11:28Z" },
"23": { "price": 102, "updated_at": "2026-09-09T16:30:06Z" }
}
}]
}]
}]
}]
}Thunder at Spurs, opening week of the 2026-27 season, trimmed to one side of one market. The full response held 6 games for 84 data points.
Markets
Every NBA market, not just the main line.
From the opening spread to a first-quarter rebounds line, every market comes back in the same events, markets, participants, lines, and prices shape, keyed to one event ID.
- Game linesMoneyline, spread, and total
1 · 2 · 3Free - Alternate linesAlternate spreads and totals
omit main_lineStarter - Halves1st and 2nd half moneyline, spread, and total
4 · 5 · 6 · 1008–1010Starter - QuartersMoneyline, spread, and total for each quarter
981 · 957 · 958 · 1011–1019Starter - Team totalsGame, 1st half, and every quarter
94 · 95 · 991 · 1020–1022Starter - Player propsPoints, rebounds, assists, threes, steals, blocks, turnovers, and four combos
29 · 35 · 39 · 38 · 34 · 98 · 33 · 93 · 99 · 297 · 298Starter - Quarter props and milestones1st-quarter points, rebounds, and assists; double-double; triple-double
1115–1117 · 87 · 88Starter - Game propsWinning margin, race to points, first team to score, halftime/fulltime
9 · 27 · 383 · 831Starter - In-gameLive game, half, and quarter lines, team totals, and player props
41 · 42 · 43 · 1024 · 1032 · 96 · 90 · 982Starter - FuturesNBA Champion, NBA Cup, conference and division winners; MVP and other awards; win totals; playoffs
/sports/4/futuresUltra
Market IDs served on NBA slates from March 2026 to the 2026-27 opening slate (GET /api/v2/sports/4/markets/{date}). GET /api/v2/markets lists every definition.
Books
All 25 books. One schema.
20 sportsbooks, 3 prediction markets, and 2 exchanges in one response shape. Pick yours with affiliate_ids.
Sportsbooks · 20
- DraftKingsFree19
- FanDuelFree23
- BetMGMFree22
- Pinnacle3
- Circa Sports32
- BookMaker7
- BetCRIS9
- Bovada2
- theScore Bet24
- Unibet21
- HardRock28
- Bet10533
- Heritage Sports34
- BetOnline6
- SportsBetting4
- LowVig11
- Bodog12
- Intertops14
- Matchbook16
- YouWager18
Prediction markets · 3
- Kalshi25
- Polymarket26
- Polymarket US31
Exchanges · 2
- ProphetX29
- Novig30
Live from GET /api/v2/affiliates. Coverage varies by league, game, and market.
Free vs paid
Start free. Pay when you go live.
Pre-match moneyline, spread, and total from DraftKings, FanDuel, and BetMGM, five minutes delayed.
Every book, alternates, periods, props, live in-game odds, and history from $49 a month. Futures and WebSocket on Ultra.
Questions
Before you build.
Plans, markets, books, and IDs for the NBA odds API.
- Is there a free NBA odds API?
- Yes. A free TheRundown key returns pre-match NBA moneylines, spreads, and totals from DraftKings, FanDuel, and BetMGM, five minutes delayed, up to 20,000 data points a day and 200,000 a month. No credit card.
- Which NBA markets does the API cover?
- Moneylines, spreads, and totals; alternate lines; halves and quarters; team totals for the game, the 1st half, and every quarter; 16 player markets, from points and rebounds to double-doubles; game props like winning margin and race to points; 44 in-game markets; and futures for the NBA Champion, NBA Cup, conferences, divisions, MVP and other awards, win totals, and playoffs. Free covers pre-match game lines. The rest starts on Starter ($49 a month), and futures on Ultra.
- Which sportsbooks does the NBA odds API cover?
- All 25 books in the API, including DraftKings, FanDuel, BetMGM, Pinnacle, and Bovada, plus Kalshi, Polymarket, Polymarket US, and Novig. Paid plans include all of them. Free includes three. Coverage varies by game.
- What is the NBA sport ID?
- 4. The catalog also lists 23 for the NBA preseason, 24 for the NBA playoffs, and 32 for the Summer League. GET /api/v2/sports returns every sport ID.
- Can I show NBA odds in my app?
- Starter covers internal and personal use. Showing odds to users of a commercial product starts on Pro ($149 a month).