Skip to main content
Version: 0.2.0

Men's college basketball — KenPom (kenpom.com, subscription) — Team

kenpom_team_stats​

GET /teamstats.php - team shooting and style splits; side='o' for offense, 'd' for defense. Port of hoopR kp_teamstats().

Endpoint URL: GET https://kenpom.com/teamstats.php

Valid URL: https://kenpom.com/teamstats.php?y=2025&od=o

API ParameterPythonPatternRequiredNullableDescription
yyearYSeason as a 4-digit ENDING year.
odsideYSide of the ball: 'o' (offense, hoopR's default) or 'd' (defense).

Returns​

return_parsed=True (default) — A dict of polars DataFrames, one per HTML table on the page, keyed by the table's HTML id (a KenPom page often carries several -- team.php alone holds the schedule, roster, depth chart and lineup tables) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

ratings_table

col_nametypedescription
teamStringTeam-side label or team identifier.
confStringcharacter.
3_p_pctString
3_p_pct_rkString
2_p_pctString
2_p_pct_rkString
ft_pctStringFree throw percentage (0-1).
ft_pct_rkStringFt pct rk.
blk_pctStringBlocks percentage (0-1 decimal).
blk_pct_rkStringBlk pct rk.
stl_pctStringSteals percentage (0-1 decimal).
stl_pct_rkStringStl pct rk.
nst_pctString
nst_pct_rkString
2_p_distString
2_p_dist_rkString
a_pctStringA percentage (0-1 decimal).
a_pct_rkStringA pct rk.
3_pa_pctString
3_pa_pct_rkString
adj_oeStringAdjusted offensive efficiency.
adj_oe_rkStringAdj oe rk.
ncaa_seedInt64Ncaa seed.

return_parsed=False — the raw page HTML (str).

Raises​

ExceptionDescription
RuntimeErrorNo KenPom credentials could be resolved (pass email=/password=, or set KENPOM_EMAIL/KENPOM_PW), or kenpom.com rejected them.
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.

Example​

kenpom_team_stats(year=2025, side='o')

kenpom_team​

GET /team.php - a team's full season page. Returns EVERY table on it, so one call covers hoopR's kp_team_schedule(), kp_team_players() and kp_team_lineups(), which each fetch this same page separately -- plus kp_team_depth_chart(), recovered under a "depth_chart" key from an embedded script tag rather than a table (KenPom dropped the static depth-chart table; see kp_team_depth_chart()'s R source).

Endpoint URL: GET https://kenpom.com/team.php

Valid URL: https://kenpom.com/team.php?team=Duke&y=2025

API ParameterPythonPatternRequiredNullableDescription
teamteamYKenPom team name, spelled as the site does (e.g. 'Duke', 'Michigan St.').
yyearYSeason as a 4-digit ENDING year. Lineup tables begin at 2011.

Returns​

return_parsed=True (default) — A dict of polars DataFrames, one per HTML table on the page, keyed by the table's HTML id (a KenPom page often carries several -- team.php alone holds the schedule, roster, depth chart and lineup tables) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

report_table

col_nametypedescription
categoryStringCategory label.
offenseString
defenseString
d_i_avgFloat64

schedule_table

col_nametypedescription
0String
1Int64
2Int64
3String
4String
5Int64
6String
7String
8String
9String
10String

player_table

col_nametypedescription
jerseyStringJersey number worn by the player.
column_0_rkString
htStringListed height.
wtFloat64Listed weight (lbs).
yrStringYr.
gFloat64Games played.
sFloat64S.
pct_minFloat64
o_rtgFloat64O rtg.
pct_possFloat64
pct_shotsFloat64
e_fg_pctFloat64E field goals percentage (0-1 decimal).
ts_pctFloat64True shooting percentage (0-1).
or_pctFloat64Or percentage (0-1 decimal).
dr_pctFloat64Dr percentage (0-1 decimal).
a_rateFloat64A rate.
to_rateFloat64To rate.
blk_pctFloat64Blocks percentage (0-1 decimal).
stl_pctFloat64Steals percentage (0-1 decimal).
fc_40Float64
fd_40Float64
ft_rateFloat64Ft rate.
ftm_aString
pctFloat64Win percentage.
2_pm_aString
pct_1Float64
3_pm_aString
pct_2Float64

depth_chart

col_nametypedescription
player_idInt64Unique player identifier.
pct_pgFloat64
pct_sgFloat64
pct_sfFloat64
pct_pfFloat64
pct_cFloat64
nameStringDisplay name.
pct_possFloat64
ftaInt64Free throw attempts.
fg2_aInt64
fg3_aInt64Three-point field goal attempts.
heightStringPlayer height (string e.g. '6-2' or inches).
weightInt64Player weight in pounds.
yearString4-digit year.

return_parsed=False — the raw page HTML (str).

Raises​

ExceptionDescription
RuntimeErrorNo KenPom credentials could be resolved (pass email=/password=, or set KENPOM_EMAIL/KENPOM_PW), or kenpom.com rejected them.
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.

Example​

kenpom_team(team='Duke', year=2025)

kenpom_team_players_expanded​

GET /player-expanded.php - a team's expanded per-player table plus the minutes matrix. Covers hoopR's kp_team_player_stats() and kp_minutes_matrix() in one fetch.

Endpoint URL: GET https://kenpom.com/player-expanded.php

Valid URL: https://kenpom.com/player-expanded.php?team=Duke&y=2025

API ParameterPythonPatternRequiredNullableDescription
teamteamYKenPom team name, spelled as the site does.
yyearYSeason as a 4-digit ENDING year. Starts ('S') are available from 2014.

Returns​

return_parsed=True (default) — A dict of polars DataFrames, one per HTML table on the page, keyed by the table's HTML id (a KenPom page often carries several -- team.php alone holds the schedule, roster, depth chart and lineup tables) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

player_table

col_nametypedescription
jerseyStringJersey number worn by the player.
column_0_rkString
htStringListed height.
wtFloat64Listed weight (lbs).
yrStringYr.
gFloat64Games played.
pct_minFloat64
o_rtgStringO rtg.
pct_possString
pct_shotsString
e_fg_pctStringE field goals percentage (0-1 decimal).
ts_pctStringTrue shooting percentage (0-1).
or_pctFloat64Or percentage (0-1 decimal).
dr_pctStringDr percentage (0-1 decimal).
a_rateStringA rate.
to_rateFloat64To rate.
blk_pctStringBlocks percentage (0-1 decimal).
stl_pctStringSteals percentage (0-1 decimal).
fc_40Float64
fd_40String
ft_rateStringFt rate.
ftm_aString
pctStringWin percentage.
2_pm_aString
pct_1Float64
3_pm_aString
pct_2String

player_table_2

col_nametypedescription
jerseyStringJersey number worn by the player.
column_0_rkString
htStringListed height.
wtFloat64Listed weight (lbs).
yrStringYr.
gFloat64Games played.
pct_minString
o_rtgStringO rtg.
pct_possString
pct_shotsString
e_fg_pctStringE field goals percentage (0-1 decimal).
ts_pctStringTrue shooting percentage (0-1).
or_pctFloat64Or percentage (0-1 decimal).
dr_pctStringDr percentage (0-1 decimal).
a_rateStringA rate.
to_rateFloat64To rate.
blk_pctStringBlocks percentage (0-1 decimal).
stl_pctStringSteals percentage (0-1 decimal).
fc_40Float64
fd_40String
ft_rateStringFt rate.
ftm_aString
pctStringWin percentage.
2_pm_aString
pct_1String
3_pm_aString
pct_2String

minutes_table

col_nametypedescription
column_0String
column_0_rkInt64
column_0_rk_rkString
column_0_rk_rk_rkString
caleb_fosterInt64
darren_harrisFloat64
isaiah_evansFloat64
mason_gillisInt64
sion_jamesInt64
tyrese_proctorInt64
kon_knueppelInt64
cooper_flaggInt64
maliq_brownInt64
patrick_ngongbaFloat64
khaman_maluachInt64
starting_lineup_numberInt64

return_parsed=False — the raw page HTML (str).

Raises​

ExceptionDescription
RuntimeErrorNo KenPom credentials could be resolved (pass email=/password=, or set KENPOM_EMAIL/KENPOM_PW), or kenpom.com rejected them.
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.

Example​

kenpom_team_players_expanded(team='Duke', year=2025)

kenpom_team_history​

GET /history.php?t= - a program's season-by-season history. Port of hoopR kp_team_history().

Endpoint URL: GET https://kenpom.com/history.php

Valid URL: https://kenpom.com/history.php?t=Duke

API ParameterPythonPatternRequiredNullableDescription
tteamYKenPom team name, spelled as the site does.

Returns​

return_parsed=True (default) — A dict of polars DataFrames, one per HTML table on the page, keyed by the table's HTML id (a KenPom page often carries several -- team.php alone holds the schedule, roster, depth chart and lineup tables) (one table per documented key below); pass return_as_pandas=True for a dict of pandas.DataFrames (same keys).

player_table

col_nametypedescription
column_0Int64
pre_rkString
coachStringCoach.
confStringcharacter.
w_lStringW l.
adj_tFloat64Adj t.
adj_oFloat64Adj o.
adj_dFloat64Adj d.
offense_e_fg_pctFloat64
offense_to_pctFloat64
offense_or_pctFloat64
offense_ftrFloat64
offense_2_p_pctFloat64
offense_3_p_pctFloat64
offense_ft_pctFloat64
offense_3_pa_pctFloat64
offense_a_pctFloat64
offense_aplFloat64
defense_e_fg_pctFloat64
defense_to_pctFloat64
defense_or_pctFloat64
defense_ftrFloat64
defense_2_p_pctFloat64
defense_3_p_pctFloat64
defense_blk_pctFloat64
defense_3_pa_pctFloat64
defense_a_pctFloat64
defense_aplFloat64
2_fp_pctFloat64

return_parsed=False — the raw page HTML (str).

Raises​

ExceptionDescription
RuntimeErrorNo KenPom credentials could be resolved (pass email=/password=, or set KENPOM_EMAIL/KENPOM_PW), or kenpom.com rejected them.
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.

Example​

kenpom_team_history(team='Duke')