Skip to main content
Version: 0.2.0

WNBA — WNBA Stats API (stats.wnba.com) — Other: playbyplayv3–videostatus

wnba_stats_playbyplayv3​

Play by play v3.

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

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

API ParameterPythonPatternRequiredNullableDescription
EndPeriodend_periodY
GameIDgame_idY
StartPeriodstart_periodY

Returns​

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

col_nametypedescription
game_idStringTen-character stats API game id (e.g. "0022500100"), shared by every action in the game.
video_availableInt641 when the stats site has video of the action, else 0.
action_numberInt64Stats API action number of the event within the game; gaps mark actions the feed removed.
clockStringGame clock remaining in the period as an ISO-8601 duration (e.g. PT11M42.00S).
periodInt64Period of the action (1-4 regulation, 5+ overtime).
team_idInt64Stats API team id of the action's team; 0 for neutral actions.
team_tricodeStringThree-letter code of the action's team (e.g. GSW); empty for neutral actions.
person_idInt64Stats API person id of the action's primary player; 0 for team and neutral actions.
player_nameStringLast name of the action's primary player; empty for team and neutral actions.
player_name_iStringInitial-and-last-name form of the primary player (e.g. "S. Curry").
x_legacyInt64Shot x coordinate on the legacy stats court grid (tenths of a foot from the basket); 0 off shots.
y_legacyInt64Shot y coordinate on the legacy stats court grid (tenths of a foot from the basket); 0 off shots.
shot_distanceInt64Shot distance in feet; 0 on non-shot actions.
shot_resultStringMade or Missed on a shot; empty otherwise.
is_field_goalInt641 when the action is a field-goal attempt, else 0.
score_homeStringHome score after the action, as text; empty on non-scoring actions.
score_awayStringVisitor score after the action, as text; empty on non-scoring actions.
points_totalInt64Combined home + visitor score after the action (running game total).
locationStringSide of the action, h (home) or v (visitor); empty for neutral actions.
descriptionStringText description of the action (e.g. "Curry 26' 3PT Jump Shot (3 PTS)").
action_typeStringAction family (e.g. Made Shot, Missed Shot, Free Throw, Rebound, Turnover, Foul, Substitution, period).
sub_typeStringAction subtype (e.g. Jump Shot, Driving Layup, Personal, Bad Pass, start, end).
shot_valueInt64Points a field-goal attempt was worth (2 or 3); 0 on free throws and non-shot actions.
action_idInt64Sequential id of the action in the feed's order (1-based); unlike action_number it has no gaps.

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​

wnba_stats_playbyplayv3()

wnba_stats_videostatus​

Video status.

Endpoint URL: GET https://stats.wnba.com/stats/videostatus

Valid URL: https://stats.wnba.com/stats/videostatus?GameDate=2022-06-10&LeagueID=10

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
game_idStringUnique game identifier.
game_dateStringGame date (YYYY-MM-DD).
visitor_team_idInt64Unique identifier for visitor team.
visitor_team_cityStringCity name of the visiting team.
visitor_team_nameStringNickname of the visiting team.
visitor_team_abbreviationStringAbbreviation of the visiting team.
home_team_idInt64Unique identifier for the home team.
home_team_cityStringHome team city / location.
home_team_nameStringHome team name.
home_team_abbreviationStringHome team's three-letter tricode (e.g. 'PHI').
game_statusInt64Game status label.
game_status_textStringGame status display text (e.g. 'Final', '4:32 - 4th').
is_availableInt64Flag indicating whether game video is available in the league's stats video system.
pt_xyz_availableInt64Pt xyz available.

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​

wnba_stats_videostatus(league_id='10')