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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
EndPeriod | end_period | Y | |||
GameID | game_id | Y | |||
StartPeriod | start_period | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
game_id | String | Ten-character stats API game id (e.g. "0022500100"), shared by every action in the game. |
video_available | Int64 | 1 when the stats site has video of the action, else 0. |
action_number | Int64 | Stats API action number of the event within the game; gaps mark actions the feed removed. |
clock | String | Game clock remaining in the period as an ISO-8601 duration (e.g. PT11M42.00S). |
period | Int64 | Period of the action (1-4 regulation, 5+ overtime). |
team_id | Int64 | Stats API team id of the action's team; 0 for neutral actions. |
team_tricode | String | Three-letter code of the action's team (e.g. GSW); empty for neutral actions. |
person_id | Int64 | Stats API person id of the action's primary player; 0 for team and neutral actions. |
player_name | String | Last name of the action's primary player; empty for team and neutral actions. |
player_name_i | String | Initial-and-last-name form of the primary player (e.g. "S. Curry"). |
x_legacy | Int64 | Shot x coordinate on the legacy stats court grid (tenths of a foot from the basket); 0 off shots. |
y_legacy | Int64 | Shot y coordinate on the legacy stats court grid (tenths of a foot from the basket); 0 off shots. |
shot_distance | Int64 | Shot distance in feet; 0 on non-shot actions. |
shot_result | String | Made or Missed on a shot; empty otherwise. |
is_field_goal | Int64 | 1 when the action is a field-goal attempt, else 0. |
score_home | String | Home score after the action, as text; empty on non-scoring actions. |
score_away | String | Visitor score after the action, as text; empty on non-scoring actions. |
points_total | Int64 | Combined home + visitor score after the action (running game total). |
location | String | Side of the action, h (home) or v (visitor); empty for neutral actions. |
description | String | Text description of the action (e.g. "Curry 26' 3PT Jump Shot (3 PTS)"). |
action_type | String | Action family (e.g. Made Shot, Missed Shot, Free Throw, Rebound, Turnover, Foul, Substitution, period). |
sub_type | String | Action subtype (e.g. Jump Shot, Driving Layup, Personal, Bad Pass, start, end). |
shot_value | Int64 | Points a field-goal attempt was worth (2 or 3); 0 on free throws and non-shot actions. |
action_id | Int64 | Sequential 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
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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 Parameter | Python | Pattern | Required | Nullable | Description |
|---|---|---|---|---|---|
GameDate | game_date | Y | |||
LeagueID | league_id | Y |
Returns
return_parsed=True (default) — a tidy polars.DataFrame with the columns below; pass return_as_pandas=True for a pandas.DataFrame.
| col_name | type | description |
|---|---|---|
game_id | String | Unique game identifier. |
game_date | String | Game date (YYYY-MM-DD). |
visitor_team_id | Int64 | Unique identifier for visitor team. |
visitor_team_city | String | City name of the visiting team. |
visitor_team_name | String | Nickname of the visiting team. |
visitor_team_abbreviation | String | Abbreviation of the visiting team. |
home_team_id | Int64 | Unique identifier for the home team. |
home_team_city | String | Home team city / location. |
home_team_name | String | Home team name. |
home_team_abbreviation | String | Home team's three-letter tricode (e.g. 'PHI'). |
game_status | Int64 | Game status label. |
game_status_text | String | Game status display text (e.g. 'Final', '4:32 - 4th'). |
is_available | Int64 | Flag indicating whether game video is available in the league's stats video system. |
pt_xyz_available | Int64 | Pt xyz available. |
return_parsed=False — the raw JSON Dict payload, unparsed.
Raises
| Exception | Description |
|---|---|
NoDataError | The host answered 404 -- the requested resource does not exist. |
ValueError | The host answered 400 / 422 -- the request is wrong; retrying cannot help. |
AssetFetchError | The 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. |
ImportError | curl_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')