Skip to main content

NBA G League — G League Stats API (stats.nba.com, LeagueID=20) — Other: playbyplayv3–scoreboardv3

nbagl_stats_playbyplayv3​

Play by play v3.

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

Valid URL: https://stats.nba.com/stats/playbyplayv3?EndPeriod=0&GameID=2022500137&StartPeriod=0

API ParameterPythonPatternRequiredNullableDescription
EndPeriodend_periodY
GameIDgame_idY
StartPeriodstart_periodY

Returns​

return_parsed=True (default) — the output of parse_nbagl_stats_result_sets; pass return_as_pandas=True for a pandas.DataFrame.

No returns table is published for this endpoint: the committed capture tests/fixtures/nbagl_stats/endpoints/playbyplayv3.json is not a resultSets envelope (top-level keys: game, meta), which parse_nba_stats_result_sets does not read, so the parsed output is empty; use return_parsed=False for the raw payload.

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​

nbagl_stats_playbyplayv3()

nbagl_stats_scoreboardv3​

Scoreboard v3.

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

Valid URL: https://stats.nba.com/stats/scoreboardv3?GameDate=2025-01-15&LeagueID=20

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.
gamecodeString
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.
periodInt64
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​

nbagl_stats_scoreboardv3(league_id='20')