# NBA Odds API
The Odds API covers NBA odds for live and upcoming games in a simple JSON API.
Not a developer? Current NBA odds can also be accessed in Excel or Google Sheets. For website owners, the odds widget brings bookmaker odds into websites with a simple HTML tag.
# Features
NBA odds are covered for live and upcoming games.
Featured markets, including moneyline, spreads, totals are covered for several bookmakers. See the full list of bookmakers.
Additional markets including player props, quarter and half time markets, and more are covered for most US bookmakers. See the full list of betting markets.
Odds are refreshed at regular intervals. More information on update intervals can be found here.
NBA scores are covered, with final scores available for games completed up to 3 days ago.
Current odds data and scores are available on all usage plans, including the free usage plan.
Historical NBA odds data is available on paid usage plans. Historical odds for featured markets (moneyline, spreads, totals) are available from mid-2020. Historical odds for other markets are available from May 2023. More information on historical odds data can be found here.
The API response includes deep links to bookmaker websites.
# Querying NBA Odds
# Query Featured NBA Markets
Featured markets (moneyline, spreads and totals) can be queried using the odds endpoint. For additional markets including player props, use the event-odds endpoint.
Parameters
To query current NBA odds for featured markets, the following parameters need to be provided:
- sport In this case
basketball_nba
- regions Regions of bookmakers to return, for example
us
- markets For example,
h2h
for moneyline,spreads
andtotals
- apiKey Get a free API key
See the documentation for more options
Example API Request
https://api.the-odds-api.com/v4/sports/basketball_nba/odds?regions=us&markets=h2h,spreads,totals&oddsFormat=american&apiKey=YOUR_API_KEY
Example API Response
The API will return live and upcoming NBA games, including start times, home and away teams, and odds from bookmakers for the specified regions and markets.
[{
"id": "2147587132aa05de18df6c158da786ec",
"sport_key": "basketball_nba",
"sport_title": "NBA",
"commence_time": "2025-02-12T03:00:00Z",
"home_team": "Phoenix Suns",
"away_team": "Memphis Grizzlies",
"bookmakers": [
{
"key": "draftkings",
"title": "DraftKings",
"last_update": "2025-02-12T00:59:48Z",
"markets": [
{
"key": "h2h",
"last_update": "2025-02-12T00:59:48Z",
"outcomes": [
{"name": "Memphis Grizzlies", "price": -192},
{"name": "Phoenix Suns", "price": 160}
]
}, {
"key": "spreads",
"last_update": "2025-02-12T00:59:48Z",
"outcomes": [
{"name": "Memphis Grizzlies", "price": -110, "point": -4.5},
{"name": "Phoenix Suns", "price": -110, "point": 4.5}
]
}, {
"key": "totals",
"last_update": "2025-02-12T00:59:48Z",
"outcomes": [
{"name": "Over", "price": -108, "point": 246.0},
{"name": "Under", "price": -112,"point": 246.0}
]
}]
},
...
The usage cost of the API call in this example is
usage cost = [number of markets] x [number of regions] = 3 x 1 = 3 credits
See the API documentation for details.
# Query Any NBA Markets
Any supported NBA markets can be queried one game at a time using the event-odds endpoint.
Parameters
To query current NBA odds for any market, including player props, half and quarter time markets and more, the following parameters need to be provided:
- sport In this case
basketball_nba
- eventId This example uses the id of Grizzlies @ Suns (id 21475...). A list of current event ids can be queried using the events endpoint.
- regions Regions of bookmakers to return, for example
us
- markets For example
h2h_h1
(1st half moneyline),player_points
,player_rebounds
- apiKey Get a free API key
See the documentation for more options.
Example API Request
https://api.the-odds-api.com/v4/sports/basketball_nba/events/2147587132aa05de18df6c158da786ec/odds?regions=us&markets=h2h_h1,player_points,player_rebounds&oddsFormat=american&apiKey=YOUR_API_KEY
Example API Response
The response will contain the specified NBA game including odds from the specified bookmakers and markets.
{
"id": "2147587132aa05de18df6c158da786ec",
"sport_key": "basketball_nba",
"sport_title": "NBA",
"commence_time": "2025-02-12T03:00:00Z",
"home_team": "Phoenix Suns",
"away_team": "Memphis Grizzlies",
"bookmakers": [
{
"key": "draftkings",
"title": "DraftKings",
"markets": [
{
"key": "h2h_h1",
"last_update": "2025-02-12T01:06:51Z",
"outcomes": [
{"name": "Memphis Grizzlies", "price": -170},
{"name": "Phoenix Suns", "price": 142}
]
}, {
"key": "player_points",
"last_update": "2025-02-12T01:06:51Z",
"outcomes": [
{"name": "Over", "description": "Devin Booker", "price": -110, "point": 28.5},
{"name": "Under", "description": "Devin Booker", "price": -120, "point": 28.5},
{"name": "Over", "description": "Kevin Durant", "price": -105, "point": 27.5},
{"name": "Under", "description": "Kevin Durant", "price": -125, "point": 27.5},
...
},
{
"key": "player_rebounds",
"last_update": "2025-02-12T01:06:51Z",
"outcomes": [
{"name": "Over", "description": "Nick Richards", "price": 100, "point": 8.5},
{"name": "Under", "description": "Nick Richards", "price": -130, "point": 8.5},
{"name": "Over", "description": "Zach Edey", "price": -105, "point": 7.5},
{"name": "Under", "description": "Zach Edey", "price": -125, "point": 7.5},
...
]
}
]
},
...
The usage cost of the API call in this example is
usage cost = [number of markets] x [number of regions] = 3 x 1 = 3 credits
If you only need featured markets (moneyline, spreads, totals), it will be more cost-efficient to query the odds endpoint since it will return multiple games.
See the API documentation for details.
# Other Sports
See the full list of sports covered by The Odds API.
# Stay Updated
Follow us on X.com or Bluesky to stay updated on new sports, bookmakers, markets and features.