Skip to main content

NBA — NBA Stats API (stats.nba.com) — Scoreboard

nba_stats_scoreboardv2​

Scoreboard v2.

Endpoint URL: GET https://stats.nba.com/stats/scoreboardv2

Valid URL: https://stats.nba.com/stats/scoreboardv2?DayOffset=0&GameDate=2021-07-20&LeagueID=00

API ParameterPythonPatternRequiredNullableDescription
DayOffsetday_offsetY
GameDategame_dateY
LeagueIDleague_idY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (GameHeader, LineScore, SeriesStandings, LastMeeting, EastConfStandingsByDay, WestConfStandingsByDay, Available, TeamLeaders, TicketLinks) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

GameHeader

col_nametypedescription
game_date_estStringGame date est.
game_sequenceInt64Game sequence.
game_idStringUnique game identifier.
game_status_idInt64Numeric game status identifier.
game_status_textStringGame status display text (e.g. 'Final', '4:32 - 4th').
gamecodeStringGamecode.
home_team_idInt64Unique identifier for the home team.
visitor_team_idInt64Unique identifier for visitor team.
seasonStringSeason year.
live_periodInt64Live period.
live_pc_timeStringTime / clock value.
natl_tv_broadcaster_abbreviationStringNatl tv broadcaster abbreviation.
home_tv_broadcaster_abbreviationStringHome team's tv broadcaster abbreviation.
away_tv_broadcaster_abbreviationStringAway team's tv broadcaster abbreviation.
live_period_time_bcastStringLive period time bcast.
arena_nameStringArena name.
wh_statusInt64Wh status.
wnba_commissioner_flagInt64

LineScore

col_nametypedescription
game_date_estStringGame date est.
game_sequenceInt64Game sequence.
game_idStringUnique game identifier.
team_idInt64Unique team identifier.
team_abbreviationStringShort team abbreviation (e.g. 'LAS').
team_city_nameStringTeam city name.
team_nameStringFull team display name (e.g. 'Las Vegas Aces').
team_wins_lossesStringTeam wins losses.
pts_qtr1Int64Pts qtr1.
pts_qtr2Int64Pts qtr2.
pts_qtr3Int64Pts qtr3.
pts_qtr4Int64Pts qtr4.
pts_ot1Int64Pts ot1.
pts_ot2Int64Points scored by the team in overtime period 2.
pts_ot3Int64Points scored by the team in overtime period 3.
pts_ot4Int64Points scored by the team in overtime period 4.
pts_ot5Int64Points scored by the team in overtime period 5.
pts_ot6Int64Points scored by the team in overtime period 6.
pts_ot7Int64Points scored by the team in overtime period 7.
pts_ot8Int64Points scored by the team in overtime period 8.
pts_ot9Int64Points scored by the team in overtime period 9.
pts_ot10Int64Points scored by the team in overtime period 10.
ptsInt64Points scored.
fg_pctFloat64Field goal percentage (0-1).
ft_pctFloat64Free throw percentage (0-1).
fg3_pctFloat64Three-point field goal percentage (0-1).
astInt64Assists.
rebInt64Rebounds per game.
tovInt64Turnovers.

SeriesStandings

col_nametypedescription
game_idStringUnique game identifier.
home_team_idInt64Unique identifier for the home team.
visitor_team_idInt64Unique identifier for visitor team.
game_date_estStringGame date est.
home_team_winsInt64Home team's team wins.
home_team_lossesInt64Home team's team losses.
series_leaderString

LastMeeting

col_nametypedescription
game_idStringUnique game identifier.
last_game_idString
last_game_date_estString
last_game_home_team_idInt64
last_game_home_team_cityString
last_game_home_team_nameString
last_game_home_team_abbreviationString
last_game_home_team_pointsInt64
last_game_visitor_team_idInt64
last_game_visitor_team_cityString
last_game_visitor_team_nameString
last_game_visitor_team_city1String
last_game_visitor_team_pointsInt64

EastConfStandingsByDay

col_nametypedescription
team_idInt64Unique team identifier.
league_idStringLeague identifier ('10' = WNBA).
season_idStringUnique season identifier.
standingsdateString
conferenceStringConference name.
teamStringTeam-side label or team identifier.
gInt64Games played.
wInt64Wins.
lInt64Losses.
w_pctFloat64Wins percentage (0-1 decimal).
home_recordStringHome win-loss record.
road_recordStringWin-loss record for road.

WestConfStandingsByDay

col_nametypedescription
team_idInt64Unique team identifier.
league_idStringLeague identifier ('10' = WNBA).
season_idStringUnique season identifier.
standingsdateString
conferenceStringConference name.
teamStringTeam-side label or team identifier.
gInt64Games played.
wInt64Wins.
lInt64Losses.
w_pctFloat64Wins percentage (0-1 decimal).
home_recordStringHome win-loss record.
road_recordStringWin-loss record for road.

Available

col_nametypedescription
game_idStringUnique game identifier.
pt_availableInt64Pt available.

TeamLeaders

col_nametypedescription
game_idStringUnique game identifier.
team_idInt64Unique team identifier.
team_cityStringTeam city or region (e.g. 'Las Vegas').
team_nicknameStringTeam nickname.
team_abbreviationStringShort team abbreviation (e.g. 'LAS').
pts_player_idInt64
pts_player_nameString
ptsInt64Points scored.
reb_player_idInt64
reb_player_nameString
rebInt64Rebounds per game.
ast_player_idInt64
ast_player_nameString
astInt64Assists.

TicketLinks

col_nametypedescription
game_idStringUnique game identifier.
leag_tixString

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.
ImportErrorcurl_cffi is not installed -- stats.nba.com / stats.wnba.com block plain requests, so the transport needs it (pip install curl_cffi or sportsdataverse[all]).

Example​

nba_stats_scoreboardv2(league_id='00')

nba_stats_scoreboardv3​

Scoreboard v3.

Endpoint URL: GET https://stats.nba.com/stats/scoreboardv3

Valid URL: https://stats.nba.com/stats/scoreboardv3?GameDate=2023-03-26&LeagueID=00

API ParameterPythonPatternRequiredNullableDescription
GameDategame_dateY
LeagueIDleague_idY

Returns​

return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.

col_nametypedescription
awayteam_inbonusStringWhether the away team is currently in the bonus (penalty) foul situation.
awayteam_lossesInt64Away team's loss total entering the game.
awayteam_scoreInt64Current or final points scored by the away team.
awayteam_seedInt64Playoff seed of the away team, populated for postseason games.
awayteam_teamcityStringCity name of the away team.
awayteam_teamidInt64Team identifier of the away team from the league's stats API.
awayteam_teamnameStringNickname of the away team.
awayteam_teamslugStringURL-friendly slug for the away team's name.
awayteam_teamtricodeStringThree-letter abbreviation of the away team.
awayteam_timeoutsremainingInt64Timeouts the away team has remaining.
awayteam_winsInt64Away team's win total entering the game.
gameclockStringCurrent game clock display for a live game.
gamecodeStringGamecode.
gamedateStringGame date the scoreboard was requested for (YYYY-MM-DD).
gameetStringScheduled game start time in US Eastern time.
gameidStringUnique 10-character game identifier from the league's stats API.
gamelabelStringDisplay label for the game (e.g. a playoff series or event name).
gameleaders_awayleaders_assistsInt64Assist total of the away team's in-game statistical leader.
gameleaders_awayleaders_jerseynumStringJersey number of the away team's in-game statistical leader.
gameleaders_awayleaders_nameStringName of the away team's in-game statistical leader.
gameleaders_awayleaders_personidInt64Stats API player id of the away team's in-game statistical leader.
gameleaders_awayleaders_playerslugStringURL name slug of the away team's in-game statistical leader.
gameleaders_awayleaders_pointsInt64Point total of the away team's in-game statistical leader.
gameleaders_awayleaders_positionStringPosition of the away team's in-game statistical leader.
gameleaders_awayleaders_reboundsInt64Rebound total of the away team's in-game statistical leader.
gameleaders_awayleaders_teamtricodeStringTeam tricode of the away team's in-game statistical leader.
gameleaders_homeleaders_assistsInt64Assist total of the home team's in-game statistical leader.
gameleaders_homeleaders_jerseynumStringJersey number of the home team's in-game statistical leader.
gameleaders_homeleaders_nameStringName of the home team's in-game statistical leader.
gameleaders_homeleaders_personidInt64Stats API player id of the home team's in-game statistical leader.
gameleaders_homeleaders_playerslugStringURL name slug of the home team's in-game statistical leader.
gameleaders_homeleaders_pointsInt64Point total of the home team's in-game statistical leader.
gameleaders_homeleaders_positionStringPosition of the home team's in-game statistical leader.
gameleaders_homeleaders_reboundsInt64Rebound total of the home team's in-game statistical leader.
gameleaders_homeleaders_teamtricodeStringTeam tricode of the home team's in-game statistical leader.
gamestatusInt64Numeric game status code (1 = scheduled, 2 = in progress, 3 = final).
gamestatustextStringHuman-readable game status (e.g. "Final", "7:00 pm ET").
gamesublabelStringSecondary display label for the game (e.g. game number within a series).
gamesubtypeStringSubtype code for the game as reported by the stats API (e.g. in-season tournament flags).
gametimeutcStringScheduled game start time in UTC.
hometeam_inbonusStringWhether the home team is currently in the bonus (penalty) foul situation.
hometeam_lossesInt64Home team's loss total entering the game.
hometeam_scoreInt64Current or final points scored by the home team.
hometeam_seedInt64Playoff seed of the home team, populated for postseason games.
hometeam_teamcityStringCity name of the home team.
hometeam_teamidInt64Team identifier of the home team from the league's stats API.
hometeam_teamnameStringNickname of the home team.
hometeam_teamslugStringURL-friendly slug for the home team's name.
hometeam_teamtricodeStringThree-letter abbreviation of the home team.
hometeam_timeoutsremainingInt64Timeouts the home team has remaining.
hometeam_winsInt64Home team's win total entering the game.
ifnecessaryBooleanWhether the game is an if-necessary playoff series game.
isneutralBooleanWhether the game is played at a neutral site.
leagueidStringLeague identifier from the stats API ("00" = NBA, "10" = WNBA).
leaguenameStringDisplay name of the league.
periodInt64Period of the game (1-4 quarters; 5+ for OT).
porounddescStringPlayoff round description (e.g. Conference Finals).
regulationperiodsInt64Number of regulation periods for the game (4).
seriesconferenceStringConference of the playoff series the game belongs to.
seriesgamenumberStringGame number within the playoff series.
seriestextStringDisplay text summarizing the series state (e.g. "BOS leads 2-1").
teamleaders_awayleaders_assistsFloat64Assist total of the away team's season statistical leader.
teamleaders_awayleaders_jerseynumStringJersey number of the away team's season statistical leader.
teamleaders_awayleaders_nameStringName of the away team's season statistical leader.
teamleaders_awayleaders_personidInt64Stats API player id of the away team's season statistical leader.
teamleaders_awayleaders_playerslugStringURL name slug of the away team's season statistical leader.
teamleaders_awayleaders_pointsFloat64Point total of the away team's season statistical leader.
teamleaders_awayleaders_positionStringPosition of the away team's season statistical leader.
teamleaders_awayleaders_reboundsFloat64Rebound total of the away team's season statistical leader.
teamleaders_awayleaders_teamtricodeStringTeam tricode of the away team's season statistical leader.
teamleaders_homeleaders_assistsFloat64Assist total of the home team's season statistical leader.
teamleaders_homeleaders_jerseynumStringJersey number of the home team's season statistical leader.
teamleaders_homeleaders_nameStringName of the home team's season statistical leader.
teamleaders_homeleaders_personidInt64Stats API player id of the home team's season statistical leader.
teamleaders_homeleaders_playerslugStringURL name slug of the home team's season statistical leader.
teamleaders_homeleaders_pointsFloat64Point total of the home team's season statistical leader.
teamleaders_homeleaders_positionStringPosition of the home team's season statistical leader.
teamleaders_homeleaders_reboundsFloat64Rebound total of the home team's season statistical leader.
teamleaders_homeleaders_teamtricodeStringTeam tricode of the home team's season statistical leader.
teamleaders_seasonleadersflagInt64Flag indicating the team-leaders block carries season-long leaders rather than in-game leaders.

return_parsed=False — the raw JSON Dict payload, unparsed.

Raises​

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty.
ImportErrorcurl_cffi is not installed -- stats.nba.com / stats.wnba.com block plain requests, so the transport needs it (pip install curl_cffi or sportsdataverse[all]).

Example​

nba_stats_scoreboardv3(league_id='00')