Skip to main content
Version: 0.1.5

WNBA — WNBA Stats API (stats.wnba.com) — Shot charts

wnba_stats_shotchartdetail​

GET /stats/shotchartdetail

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

Valid URL: https://stats.wnba.com/stats/shotchartdetail?ContextMeasure=FGA&DateFrom=&DateTo=&GameID=&GameSegment=&LastNGames=0&LeagueID=10&Location=&Month=0&OpponentTeamID=0&Outcome=&Period=0&PlayerID=1628932&PlayerPosition=&RookieYear=&Season=2024&SeasonSegment=&SeasonType=Regular+Season&TeamID=0&VsConference=&VsDivision=

API ParameterPythonPatternRequiredNullableDescription
AheadBehindahead_behind_nullableY
ClutchTimeclutch_time_nullableY
ContextFiltercontext_filter_nullableY
ContextMeasurecontext_measure_simpleY
DateFromdate_from_nullableY
DateTodate_to_nullableY
EndPeriodend_period_nullableY
EndRangeend_range_nullableY
GameIDgame_id_nullableY
GameSegmentgame_segment_nullableY
LastNGameslast_n_gamesY
LeagueIDleague_idY
Locationlocation_nullableY
MonthmonthY
OpponentTeamIDopponent_team_idY
Outcomeoutcome_nullableY
PeriodperiodY
PlayerIDplayer_idY
PlayerPositionplayer_position_nullableY
PointDiffpoint_diff_nullableY
Positionposition_nullableY
RangeTyperange_type_nullableY
RookieYearrookie_year_nullableY
Seasonseason_nullableYSeason year, e.g. 2024. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. A WNBA season tips off in mid-May and becomes the default in June (2025 through May 2026, 2026 from June 2026); a draft (drafthistory, mid-April) in May. With season type Playoffs (or commonplayoffseries) the WNBA rolls over in October, after its mid-September playoffs start; with All Star in August, after the July game. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.wnba.com answers an empty HTTP 500 or every season summed.
SeasonSegmentseason_segment_nullableY
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in October, All Star in August.
StartPeriodstart_period_nullableY
StartRangestart_range_nullableY
TeamIDteam_idY
VsConferencevs_conference_nullableY
VsDivisionvs_division_nullableY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (Shot_Chart_Detail, LeagueAverages) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

Shot_Chart_Detail

col_nametypedescription
grid_typecharacterShot chart grid type label returned by the stats API (e.g. "Shot Chart Detail").
game_idcharacterUnique game identifier.
game_event_idcharacterUnique identifier for game event.
player_idcharacterUnique player identifier.
player_namecharacterPlayer name.
team_idcharacterUnique team identifier.
team_namecharacterFull team display name (e.g. 'Las Vegas Aces').
periodcharacterPeriod of the game (1-4 quarters; 5+ for OT).
minutes_remainingcharacterMinutes remaining.
seconds_remainingcharacterSeconds remaining in the period.
event_typecharacterEvent / play type code (V2 PBP).
action_typecharacterAction type label (e.g. 'Made Shot', 'Substitution').
shot_typecharacterShot type label (e.g. 'Jump Shot', 'Layup').
shot_zone_basiccharacterShot zone (e.g. 'Restricted Area', 'Mid-Range', 'Above the Break 3').
shot_zone_areacharacterShot zone area ('Left Side', 'Right Side', 'Center').
shot_zone_rangecharacterShot zone range ('Less Than 8 ft.', '8-16 ft.', '16-24 ft.', etc.).
shot_distancecharacterShot distance from the basket, in feet.
loc_xcharacterX coordinate on the court (units of inches; 0 = basket center).
loc_ycharacterY coordinate on the court (units of inches; baseline at 0).
shot_attempted_flagcharacter1 if a shot was attempted on this event.
shot_made_flagcharacter1 if the shot was made; 0 if missed.
game_datecharacterGame date (YYYY-MM-DD).
htmcharacterHome team abbreviation for the game.
vtmcharacterVisiting team abbreviation for the game.

LeagueAverages

col_nametypedescription
grid_typecharacterShot chart grid type label returned by the stats API (e.g. "Shot Chart Detail").
shot_zone_basiccharacterShot zone (e.g. 'Restricted Area', 'Mid-Range', 'Above the Break 3').
shot_zone_areacharacterShot zone area ('Left Side', 'Right Side', 'Center').
shot_zone_rangecharacterShot zone range ('Less Than 8 ft.', '8-16 ft.', '16-24 ft.', etc.).
fgaintegerField goal attempts.
fgmintegerField goals made.
fg_pctnumericField goal percentage (0-1).

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

Example​

wnba_stats_shotchartdetail(league_id='10', season_nullable='2024')

Last validated n/a.

wnba_stats_shotchartleaguewide​

GET /stats/shotchartleaguewide

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

Valid URL: https://stats.wnba.com/stats/shotchartleaguewide?LeagueID=10&Season=2024

API ParameterPythonPatternRequiredNullableDescription
LeagueIDleague_idY
SeasonseasonYSeason year, e.g. 2024. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. A WNBA season tips off in mid-May and becomes the default in June (2025 through May 2026, 2026 from June 2026); a draft (drafthistory, mid-April) in May. With season type Playoffs (or commonplayoffseries) the WNBA rolls over in October, after its mid-September playoffs start; with All Star in August, after the July game. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.wnba.com answers an empty HTTP 500 or every season summed.

Returns​

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

col_nametypedescription
grid_typecharacterNBA or WNBA Stats value for grid type in the shotchartleaguewide result set.
shot_zone_basiccharacterShot zone (e.g. 'Restricted Area', 'Mid-Range', 'Above the Break 3').
shot_zone_areacharacterShot zone area ('Left Side', 'Right Side', 'Center').
shot_zone_rangecharacterShot zone range ('Less Than 8 ft.', '8-16 ft.', '16-24 ft.', etc.).
fgaintegerField goal attempts.
fgmintegerField goals made.
fg_pctnumericField goal percentage (0-1).

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

Example​

wnba_stats_shotchartleaguewide(league_id='10', season='2024')

Last validated n/a.

wnba_stats_shotchartlineupdetail​

GET /stats/shotchartlineupdetail

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

Valid URL: https://stats.wnba.com/stats/shotchartlineupdetail?ContextFilter=&ContextMeasure=FGA&DateFrom=&DateTo=&GROUP_ID=-1628899-1629481-1630096-1631019-1642784-&GameID=&GameSegment=&LastNGames=0&LeagueID=10&Location=&Month=0&OpponentTeamID=0&Outcome=&Period=0&Season=2024&SeasonSegment=&SeasonType=Regular+Season&TeamID=0&VsConference=&VsDivision=

API ParameterPythonPatternRequiredNullableDescription
ContextFiltercontext_filter_nullableY
ContextMeasurecontext_measure_detailedY
DateFromdate_from_nullableY
DateTodate_to_nullableY
GROUP_IDgroup_idY
GameIDgame_id_nullableY
GameSegmentgame_segment_nullableY
LastNGameslast_n_games_nullableY
LeagueIDleague_idY
Locationlocation_nullableY
Monthmonth_nullableY
OpponentTeamIDopponent_team_id_nullableY
Outcomeoutcome_nullableY
PeriodperiodY
SeasonseasonYSeason year, e.g. 2024. Defaults at call time by a calendar cutoff, the month after a season's first games, so it can lag the newest rows by a few weeks. A WNBA season tips off in mid-May and becomes the default in June (2025 through May 2026, 2026 from June 2026); a draft (drafthistory, mid-April) in May. With season type Playoffs (or commonplayoffseries) the WNBA rolls over in October, after its mid-September playoffs start; with All Star in August, after the July game. A month table cannot follow a lockout or pandemic calendar: pass a season then. Without one stats.wnba.com answers an empty HTTP 500 or every season summed.
SeasonSegmentseason_segment_nullableY
SeasonTypeseason_type_all_starYSeason type, a label: Regular Season, Pre Season, Playoffs or All Star (each endpoint takes a subset). Not ESPN's numeric code: 3 is HTTP 400. A default season follows it: Playoffs rolls over in October, All Star in August.
TeamIDteam_id_nullableY
VsConferencevs_conference_nullableY
VsDivisionvs_division_nullableY

Returns​

return_parsed=True (default) — A dict of DataFrames keyed by result-set name (ShotChartLineupDetail, ShotChartLineupLeagueAverage) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

ShotChartLineupDetail

col_nametypedescription
grid_typecharacterShot chart grid type label returned by the stats API (e.g. "Shot Chart Detail").
game_idcharacterUnique game identifier.
game_event_idcharacterUnique identifier for game event.
group_idcharacterESPN group id.
group_namecharacterThe lineup's five players as a ' - ' separated string of abbreviated names.
player_idcharacterUnique player identifier.
player_namecharacterPlayer name.
team_idcharacterUnique team identifier.
team_namecharacterFull team display name (e.g. 'Las Vegas Aces').
periodcharacterPeriod of the game (1-4 quarters; 5+ for OT).
minutes_remainingcharacterMinutes remaining.
seconds_remainingcharacterSeconds remaining in the period.
event_typecharacterEvent / play type code (V2 PBP).
action_typecharacterAction type label (e.g. 'Made Shot', 'Substitution').
shot_typecharacterShot type label (e.g. 'Jump Shot', 'Layup').
shot_zone_basiccharacterShot zone (e.g. 'Restricted Area', 'Mid-Range', 'Above the Break 3').
shot_zone_areacharacterShot zone area ('Left Side', 'Right Side', 'Center').
shot_zone_rangecharacterShot zone range ('Less Than 8 ft.', '8-16 ft.', '16-24 ft.', etc.).
shot_distancecharacterShot distance from the basket, in feet.
loc_xcharacterX coordinate on the court (units of inches; 0 = basket center).
loc_ycharacterY coordinate on the court (units of inches; baseline at 0).
shot_attempted_flagcharacter1 if a shot was attempted on this event.
shot_made_flagcharacter1 if the shot was made; 0 if missed.
game_datecharacterGame date (YYYY-MM-DD).
htmcharacterHome team abbreviation for the game.
vtmcharacterVisiting team abbreviation for the game.

ShotChartLineupLeagueAverage

col_nametypedescription
grid_typecharacterShot chart grid type label returned by the stats API (e.g. "Shot Chart Detail").
shot_zone_basiccharacterShot zone (e.g. 'Restricted Area', 'Mid-Range', 'Above the Break 3').
shot_zone_areacharacterShot zone area ('Left Side', 'Right Side', 'Center').
shot_zone_rangecharacterShot zone range ('Less Than 8 ft.', '8-16 ft.', '16-24 ft.', etc.).
fgaintegerField goal attempts.
fgmintegerField goals made.
fg_pctnumericField goal percentage (0-1).

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

Example​

wnba_stats_shotchartlineupdetail(league_id='10', season='2024')

Last validated n/a.