πβΎπ Newer ESPN leagues with sportsdataverse-py
This page is the executed notebook
15_other_espn_leagues_intro.ipynb: download it to run it yourself.
Spring pro football is back, college diamonds are packed, and NCAA rinks are full. π
In a few lines of Python you're about to pull live scoreboards, schedules,
standings, team rosters, and play-by-play for seven leagues
added to sportsdataverse-py in the 0.0.59 ESPN expansion:
| Sport | Leagues |
|---|---|
| Spring / pro football | United Football League (UFL), XFL, Canadian Football League (CFL) |
| College baseball / softball | NCAA Baseball (college_baseball), NCAA Softball (college_softball) |
| NCAA hockey | Men's College Hockey (mch), Women's College Hockey (wch) |
Every league rides the same cross-league ESPN wrapper surface introduced in
0.0.51 β one code generator that writes a concrete <prefix>_espn_ext.py module
per league from the same endpoint definitions. That means identical function naming across
all leagues: espn_{prefix}_scoreboard, espn_{prefix}_team_schedule,
espn_{prefix}_standings, espn_{prefix}_team_roster, espn_{prefix}_summary,
and 80+ more short names per league.
Namespace noteβ
The canonical import paths are nested under the sport group:
from sportsdataverse.football.ufl import espn_ufl_scoreboard
from sportsdataverse.baseball.college_baseball import espn_college_baseball_teams_site
from sportsdataverse.hockey.mch import espn_mch_scoreboard
Top-level shortcuts (e.g. sportsdataverse.ufl) exist for back-compat but emit a
DeprecationWarning β prefer the nested paths shown throughout this notebook.
π§° The toolboxβ
Every wrapper returns a raw dict by default (return_parsed=False). Pass
`` to get a tidy polars DataFrame where a parser is
registered, or return_as_pandas=True for a pandas DataFrame. The
function surface is identical across all seven leagues below.
| Function pattern | What it gives you |
|---|---|
espn_{prefix}_scoreboard(dates=YYYYMMDD) | Live / historical game slate |
espn_{prefix}_team_schedule(team_id=, season=) | Full team schedule for a season |
espn_{prefix}_teams_site() | All teams in the league (name, abbrev, logo, team_id) |
espn_{prefix}_standings() | Conference / division standings table |
espn_{prefix}_summary(event_id=) | Full game summary (~700 KB β box score, plays, leaders) |
espn_{prefix}_team_roster(team_id=, season=) | Roster for one team / season |
espn_{prefix}_game_plays(event_id=) | Play-by-play for one game |
espn_{prefix}_leaders() | League statistical leaders |
espn_{prefix}_rankings() | Polls / rankings (NCAA leagues) |
espn_{prefix}_news() | League news feed |
espn_{prefix}_injuries() | Injury report |
espn_{prefix}_player_info(athlete_id=) | Single-player bio / current info |
π Setupβ
pip install --pre sportsdataverse
No API key required β all seven leagues hit ESPN's public endpoints.
import polars as pl
from IPython.display import display
# Spring / pro football
import sportsdataverse.football.ufl as ufl
import sportsdataverse.football.xfl as xfl
import sportsdataverse.football.cfl as cfl
# College baseball + softball
import sportsdataverse.baseball.college_baseball as cbb
import sportsdataverse.baseball.college_softball as cbs
# NCAA hockey
import sportsdataverse.hockey.mch as mch
import sportsdataverse.hockey.wch as wch
pl.Config.set_tbl_rows(10)
print('sportsdataverse loaded β seven ESPN expansion leagues ready π')
sportsdataverse loaded β seven ESPN expansion leagues ready π
ESPN's live endpoints are seasonal and occasionally rate-limited, so a tiny
safe() helper runs each call defensively β you get the result when the feed
is up, and a friendly one-liner when it isn't (never a scary traceback). π
We also pin to a known completed slate for each league so code examples render consistently whether you run this in-season or in the off-season.
from sportsdataverse.errors import AssetFetchError, NoDataError
def safe(label, thunk):
try:
out = thunk()
print(f'β
{label}')
return out
except (NoDataError, AssetFetchError) as e:
print(f"\u23ed\ufe0f {label}: {type(e).__name__}: {e}")
return None
def _keys(d):
"""Print top-level keys of a raw dict for quick orientation."""
if isinstance(d, dict):
print('top-level keys:', list(d.keys())[:15])
elif d is None:
print('(no data)')
else:
print(type(d))
# Stable completed-season reference dates / ids for each league
UFL_DATE = 20250614 # UFL Championship Game, June 14 2025
XFL_DATE = 20230521 # XFL Championship Game, May 21 2023 (last full XFL season)
CFL_DATE = 20231119 # 111th Grey Cup, Nov 19 2023
CBB_DATE = 20240624 # NCAA Baseball CWS finals, June 24 2024
CBS_DATE = 20240606 # NCAA Softball WCWS finals, June 6 2024
MCH_DATE = 20240413 # Frozen Four semi, April 13 2024
WCH_DATE = 20240322 # NCAA Women's hockey Frozen Four, March 22 2024
SAMPLE_SEASON = 2024
print('reference constants set')
reference constants set
π Part 1 β Spring & Pro Football: UFL, XFL, CFLβ
The United Football League (UFL, formed from the merger of the XFL and USFL),
the XFL, and the Canadian Football League (CFL) are all first-class citizens of
the ESPN Site v2 API surface. Their modules expose the full _FOOTBALL_WRAPPERS
set β the same family as cfb and nfl β so you get deep scoring-play,
power-index, and drive-level detail out of the box.
π UFL: the scoreboardβ
espn_ufl_scoreboard(dates=YYYYMMDD)
returns the game slate for a specific date. The raw payload is a dict whose
events key holds one entry per game with nested team and status objects.
Pass `` to get a flat polars frame.
# Raw payload β orient yourself with the top-level keys
board_raw = safe('UFL scoreboard (raw)', lambda: ufl.espn_ufl_scoreboard(dates=UFL_DATE))
_keys(board_raw)
β
UFL scoreboard (raw)
<class 'polars.dataframe.frame.DataFrame'>
# Parsed frame β one row per game
board = safe(
'UFL scoreboard (parsed)',
lambda: ufl.espn_ufl_scoreboard(dates=UFL_DATE),
)
if board is not None and getattr(board, 'height', 0):
keep = [c for c in board.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board.select(keep).head() if keep else board.head())
else:
print('scoreboard unavailable for that date')
β
UFL scoreboard (parsed)
shape: (1, 5)
βββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ
β name β short_name β status_type_description β home_score β away_score β
β --- β --- β --- β --- β --- β
β str β str β str β str β str β
βββββββββββββββββββββββββββββββββββͺβββββββββββββͺββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββ‘
β D.C. Defenders at Michigan Panβ¦ β DC VS MIC β Final β 34 β 58 β
βββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ
π« UFL: teamsβ
espn_ufl_teams_site()
lists every team with its team_id β the key you feed into every
team-scoped call (espn_ufl_team_schedule, espn_ufl_team_roster, etc.).
There are no required arguments.
teams_ufl = safe('UFL teams', lambda: ufl.espn_ufl_teams_site())
if teams_ufl is not None and teams_ufl.height:
keep = [c for c in teams_ufl.columns
if c in ('id', 'abbreviation', 'display_name', 'location',
'color', 'alternate_color')]
display(teams_ufl.select(keep).head(10) if keep else teams_ufl.head(10))
else:
print('teams unavailable')
β
UFL teams
shape: (8, 14)
βββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬βββββββββββ
β team_abbr β team_alte β team_colo β team_disp β β¦ β team_nick β team_shor β team_slug β team_uid β
β eviation β rnate_col β r β lay_name β β name β t_display β --- β --- β
β --- β or β --- β --- β β --- β _name β str β str β
β str β --- β str β str β β str β --- β β β
β β str β β β β β str β β β
βββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺβββββββββββ‘
β BHAM β c6b784 β a32035 β Birmingha β β¦ β Stallions β Stallions β birmingha β s:20~l:3 β
β β β β m β β β β m-stallio β 7~t:1260 β
β β β β Stallions β β β β ns β 73 β
β CLB β 69b3e7 β 0c2340 β Columbus β β¦ β Aviators β Aviators β columbus- β s:20~l:3 β
β β β β Aviators β β β β aviators β 7~t:1322 β
β β β β β β β β β 61 β
β DC β ffffff β c8102e β DC β β¦ β Defenders β DEFENDERS β dc-defend β s:20~l:3 β
β β β β DEFENDERS β β β β ers β 7~t:1126 β
β β β β β β β β β 46 β
β DAL β 000000 β 69b3e7 β Dallas β β¦ β Renegades β Renegades β dallas-re β s:20~l:3 β
β β β β Renegades β β β β negades β 7~t:1126 β
β β β β β β β β β 47 β
β HOU β e4002b β 000000 β Houston β β¦ β Gamblers β Gamblers β houston-g β s:20~l:3 β
β β β β Gamblers β β β β amblers β 7~t:1260 β
β β β β β β β β β 75 β
β LOU β 97d700 β 06190a β Louisvill β β¦ β Kings β Kings β louisvill β s:20~l:3 β
β β β β e Kings β β β β e-kings β 7~t:1322 β
β β β β β β β β β 62 β
β ORL β 252a36 β fe5000 β Orlando β β¦ β Storm β Storm β orlando-s β s:20~l:3 β
β β β β Storm β β β β torm β 7~t:1322 β
β β β β β β β β β 63 β
β STL β a2aaad β 002677 β St. Louis β β¦ β Battlehaw β Battlehaw β st-louis- β s:20~l:3 β
β β β β Battlehaw β β ks β ks β battlehaw β 7~t:1126 β
β β β β ks β β β β ks β 51 β
βββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄βββββββββββ
π UFL: standingsβ
espn_ufl_standings()
returns the conference / division standings table. Pair with the
team id from the teams frame to build a standings dashboard.
standings_ufl = safe('UFL standings', lambda: ufl.espn_ufl_standings())
if standings_ufl is not None and standings_ufl.height:
keep = [c for c in standings_ufl.columns
if c in ('team_id', 'team_name', 'team_abbreviation',
'wins', 'losses', 'win_percent', 'points_for', 'points_against')]
display(standings_ufl.select(keep).head(8) if keep else standings_ufl.head(8))
else:
print('standings unavailable')
β
UFL standings
shape: (8, 8)
βββββββββββ¬ββββββββββββββ¬ββββββββββββββββ¬βββββββ¬βββββββββ¬ββββββββββββββ¬βββββββββββββ¬ββββββββββββββββ
β team_id β team_name β team_abbrevia β wins β losses β win_percent β points_for β points_agains β
β --- β --- β tion β --- β --- β --- β --- β t β
β i64 β str β --- β f64 β f64 β f64 β f64 β --- β
β β β str β β β β β f64 β
βββββββββββͺββββββββββββββͺββββββββββββββββͺβββββββͺβββββββββͺββββββββββββββͺβββββββββββββͺββββββββββββββββ‘
β 132263 β Storm β ORL β 8.0 β 2.0 β 0.8 β 232.0 β 186.0 β
β 112651 β Battlehawks β STL β 6.0 β 4.0 β 0.6 β 212.0 β 197.0 β
β 132262 β Kings β LOU β 6.0 β 4.0 β 0.6 β 265.0 β 219.0 β
β 112646 β Defenders β DC β 5.0 β 5.0 β 0.5 β 281.0 β 224.0 β
β 126075 β Gamblers β HOU β 4.0 β 6.0 β 0.4 β 189.0 β 236.0 β
β 126073 β Stallions β BHAM β 4.0 β 6.0 β 0.4 β 190.0 β 229.0 β
β 112647 β Renegades β DAL β 4.0 β 6.0 β 0.4 β 224.0 β 259.0 β
β 132261 β Aviators β CLB β 3.0 β 7.0 β 0.3 β 216.0 β 259.0 β
βββββββββββ΄ββββββββββββββ΄ββββββββββββββββ΄βββββββ΄βββββββββ΄ββββββββββββββ΄βββββββββββββ΄ββββββββββββββββ
π UFL: team scheduleβ
espn_ufl_team_schedule(team_id=, season=)
returns one row per game for a single team's season β useful for building
a results table or joining standings context onto a game-log.
# team_id=112646 is the DC Defenders (2024 UFL season onward)
schedule_ufl = safe(
'UFL team schedule',
lambda: ufl.espn_ufl_team_schedule(team_id=112646, season=SAMPLE_SEASON,
),
)
if schedule_ufl is not None and schedule_ufl.height:
keep = [c for c in schedule_ufl.columns
if c in ('id', 'week', 'name', 'short_name',
'home_team_abbreviation', 'away_team_abbreviation',
'home_score', 'away_score', 'status_type_description')]
display(schedule_ufl.select(keep).head() if keep else schedule_ufl.head())
else:
print('schedule unavailable')
β
UFL team schedule
shape: (5, 3)
βββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββ
β id β name β short_name β
β --- β --- β --- β
β i64 β str β str β
βββββββββββββͺββββββββββββββββββββββββββββββββββͺβββββββββββββ‘
β 401638301 β D.C. Defenders at San Antonio β¦ β DC @ SA β
β 401638306 β Houston Roughnecks at D.C. Defβ¦ β HOU @ DC β
β 401638307 β D.C. Defenders at Arlington Reβ¦ β DC @ ARL β
β 401638312 β D.C. Defenders at Birmingham Sβ¦ β DC @ BIR β
β 401638317 β St. Louis Battlehawks at D.C. β¦ β STL @ DC β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββ
ποΈ UFL: game summary & play-by-playβ
espn_ufl_summary(event_id=)
returns the full ~700 KB Site v2 summary payload β box score, plays, drives,
scoring plays, leaders, odds, and more. You can extract any sub-frame directly
from the raw dict, or use the parse_summary parser (see the architecture
note at the end of this notebook).
espn_ufl_game_plays(event_id=) returns a lightweight play list for the same
game without the full summary overhead. ESPN publishes no plays for UFL games, so for this
league both come back without play-by-play.
# The championship's event_id comes from the scoreboard above, so it cannot go stale
UFL_CHAMPIONSHIP_ID = int(board['game_id'][0]) if board is not None and board.height else None
summary_ufl = safe(
'UFL game summary (raw)',
lambda: ufl.espn_ufl_summary(event_id=UFL_CHAMPIONSHIP_ID),
)
_keys(summary_ufl)
β
UFL game summary (raw)
top-level keys: ['boxscore_player', 'boxscore_team', 'plays', 'winprobability', 'leaders', 'game_info', 'officials', 'header', 'season_series', 'against_the_spread', 'standings', 'broadcasts', 'format', 'pickcenter', 'odds']
# Quick play-by-play via the lightweight plays endpoint
plays_ufl = safe(
'UFL game plays',
lambda: ufl.espn_ufl_game_plays(event_id=UFL_CHAMPIONSHIP_ID),
) if UFL_CHAMPIONSHIP_ID else None
if plays_ufl is not None and plays_ufl.height:
display(plays_ufl.head())
else:
print('ESPN publishes no play-by-play for UFL games: the plays feed for this game is empty')
β
UFL game plays
ESPN publishes no play-by-play for UFL games: the plays feed for this game is empty
π XFL: scoreboard, teams & standingsβ
The XFL module (sportsdataverse.football.xfl) has the same shape.
The 2023 season is the most recent fully archived XFL slate before the
merger into the UFL.
# XFL teams β good cross-check since some franchises carried over to UFL
teams_xfl = safe('XFL teams', lambda: xfl.espn_xfl_teams_site())
if teams_xfl is not None and teams_xfl.height:
keep = [c for c in teams_xfl.columns
if c in ('id', 'abbreviation', 'display_name', 'location')]
display(teams_xfl.select(keep).head(10) if keep else teams_xfl.head(10))
else:
print('XFL teams unavailable')
β
XFL teams
shape: (4, 14)
βββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬βββββββββββ
β team_abbr β team_alte β team_colo β team_disp β β¦ β team_nick β team_shor β team_slug β team_uid β
β eviation β rnate_col β r β lay_name β β name β t_display β --- β --- β
β --- β or β --- β --- β β --- β _name β str β str β
β str β --- β str β str β β str β --- β β β
β β str β β β β β str β β β
βββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺβββββββββββ‘
β HOU β ba0c2f β 0c2340 β Houston β β¦ β Houston β Roughneck β houston-r β s:20~l:3 β
β β β β Roughneck β β β s β oughnecks β 6~t:1126 β
β β β β s β β β β β 48 β
β ORL β a3a6ad β 1a2b1e β Orlando β β¦ β Orlando β Guardians β orlando-g β s:20~l:3 β
β β β β Guardians β β β β uardians β 6~t:1267 β
β β β β β β β β β 48 β
β SEA β dc4405 β 00843d β Seattle β β¦ β Seattle β Sea β seattle-s β s:20~l:3 β
β β β β Sea β β β Dragons β ea-dragon β 6~t:1126 β
β β β β Dragons β β β β s β 52 β
β VGS β 373a36 β e10600 β Vegas β β¦ β Vegas β Vipers β vegas-vip β s:20~l:3 β
β β β β Vipers β β β β ers β 6~t:1267 β
β β β β β β β β β 47 β
βββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄βββββββββββ
# XFL championship scoreboard β May 2023
board_xfl = safe(
'XFL scoreboard (parsed)',
lambda: xfl.espn_xfl_scoreboard(dates=XFL_DATE),
)
if board_xfl is not None and getattr(board_xfl, 'height', 0):
keep = [c for c in board_xfl.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_xfl.select(keep).head() if keep else board_xfl.head())
else:
print('XFL scoreboard unavailable')
β
XFL scoreboard (parsed)
XFL scoreboard unavailable
# XFL standings (2023)
standings_xfl = safe('XFL standings', lambda: xfl.espn_xfl_standings())
if standings_xfl is not None and standings_xfl.height:
keep = [c for c in standings_xfl.columns
if c in ('team_id', 'team_name', 'team_abbreviation',
'wins', 'losses', 'win_percent', 'points_for', 'points_against')]
display(standings_xfl.select(keep).head(8) if keep else standings_xfl.head(8))
else:
print('XFL standings unavailable')
β
XFL standings
shape: (7, 8)
βββββββββββ¬ββββββββββββββ¬ββββββββββββββββ¬βββββββββ¬ββββββββββββββββ¬βββββββββββββ¬ββββββββββββββ¬βββββββ
β team_id β team_name β team_abbrevia β losses β points_agains β points_for β win_percent β wins β
β --- β --- β tion β --- β t β --- β --- β --- β
β i64 β str β --- β f64 β --- β f64 β f64 β f64 β
β β β str β β f64 β β β β
βββββββββββͺββββββββββββββͺββββββββββββββββͺβββββββββͺββββββββββββββββͺβββββββββββββͺββββββββββββββͺβββββββ‘
β 112652 β Sea Dragons β SEA β 3.0 β 177.0 β 243.0 β 0.7 β 7.0 β
β 112651 β Battlehawks β STL β 3.0 β 202.0 β 249.0 β 0.7 β 7.0 β
β 126747 β Vipers β VGS β 8.0 β 252.0 β 184.0 β 0.2 β 2.0 β
β 112646 β Defenders β DC β 1.0 β 240.0 β 298.0 β 0.9 β 9.0 β
β 126746 β Brahmas β SA β 7.0 β 183.0 β 169.0 β 0.3 β 3.0 β
β 126748 β Guardians β ORL β 9.0 β 310.0 β 204.0 β 0.1 β 1.0 β
β 112648 β Roughnecks β HOU β 3.0 β 182.0 β 247.0 β 0.7 β 7.0 β
βββββββββββ΄ββββββββββββββ΄ββββββββββββββββ΄βββββββββ΄ββββββββββββββββ΄βββββββββββββ΄ββββββββββββββ΄βββββββ
π CFL: scoreboard, teams, standings & scheduleβ
The Canadian Football League runs a 9-team league with a 18-game regular season
capped by the Grey Cup in November. The cfl module exposes the full
football wrapper set, including conference/division standings and the
power-index endpoints.
# CFL Grey Cup 2023 scoreboard
board_cfl = safe(
'CFL scoreboard (parsed)',
lambda: cfl.espn_cfl_scoreboard(dates=CFL_DATE),
)
if board_cfl is not None and getattr(board_cfl, 'height', 0):
keep = [c for c in board_cfl.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_cfl.select(keep).head() if keep else board_cfl.head())
else:
print('CFL scoreboard unavailable')
β
CFL scoreboard (parsed)
CFL scoreboard unavailable
# CFL teams
teams_cfl = safe('CFL teams', lambda: cfl.espn_cfl_teams_site())
if teams_cfl is not None and teams_cfl.height:
keep = [c for c in teams_cfl.columns
if c in ('id', 'abbreviation', 'display_name', 'location', 'color')]
display(teams_cfl.select(keep).head(10) if keep else teams_cfl.head(10))
else:
print('CFL teams unavailable')
β
CFL teams
shape: (9, 11)
ββββββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β team_abbre β team_disp β team_id β team_is_a β β¦ β team_nick β team_shor β team_slug β team_uid β
β viation β lay_name β --- β ctive β β name β t_display β --- β --- β
β --- β --- β i64 β --- β β --- β _name β str β str β
β str β str β β bool β β str β --- β β β
β β β β β β β str β β β
ββββββββββββββͺββββββββββββͺββββββββββͺββββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββ‘
β BCL β BC Lions β 79 β true β β¦ β BC β Lions β bc-lions β s:20~l:33 β
β β β β β β β β β ~t:79 β
β CSP β Calgary β 80 β true β β¦ β Calgary β Stampeder β calgary-s β s:20~l:33 β
β β Stampeder β β β β β s β tampeders β ~t:80 β
β β s β β β β β β β β
β EES β Edmonton β 81 β true β β¦ β Edmonton β Elks β edmonton- β s:20~l:33 β
β β Elks β β β β β β elks β ~t:81 β
β HTC β Hamilton β 82 β true β β¦ β Hamilton β Tiger-Cat β hamilton- β s:20~l:33 β
β β Tiger-Cat β β β β β s β tiger-cat β ~t:82 β
β β s β β β β β β s β β
β MTA β Montreal β 83 β true β β¦ β Montreal β Alouettes β montreal- β s:20~l:33 β
β β Alouettes β β β β β β alouettes β ~t:83 β
β ORB β Ottawa β 87 β true β β¦ β Ottawa β Red β ottawa-re β s:20~l:33 β
β β Red β β β β β Blacks β d-blacks β ~t:87 β
β β Blacks β β β β β β β β
β SRR β Saskatche β 84 β true β β¦ β Saskatche β Roughride β saskatche β s:20~l:33 β
β β wan Rough β β β β wan β rs β wan-rough β ~t:84 β
β β riders β β β β β β riders β β
β TAT β Toronto β 85 β true β β¦ β Toronto β Argonauts β toronto-a β s:20~l:33 β
β β Argonauts β β β β β β rgonauts β ~t:85 β
β WBB β Winnipeg β 86 β true β β¦ β Winnipeg β Blue β winnipeg- β s:20~l:33 β
β β Blue β β β β β Bombers β blue-bomb β ~t:86 β
β β Bombers β β β β β β ers β β
ββββββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
# CFL standings (2023)
standings_cfl = safe('CFL standings', lambda: cfl.espn_cfl_standings())
if standings_cfl is not None and standings_cfl.height:
keep = [c for c in standings_cfl.columns
if c in ('team_id', 'team_name', 'team_abbreviation',
'wins', 'losses', 'win_percent', 'points_for', 'points_against')]
display(standings_cfl.select(keep).head(9) if keep else standings_cfl.head(9))
else:
print('CFL standings unavailable')
β
CFL standings
CFL standings unavailable
# CFL team schedule β Winnipeg Blue Bombers (team_id=86) 2023 season
schedule_cfl = safe(
'CFL team schedule',
lambda: cfl.espn_cfl_team_schedule(team_id=86, season=2023),
)
if schedule_cfl is not None and schedule_cfl.height:
keep = [c for c in schedule_cfl.columns
if c in ('id', 'week', 'name', 'short_name',
'home_team_abbreviation', 'away_team_abbreviation',
'home_score', 'away_score', 'status_type_description')]
display(schedule_cfl.select(keep).head(8) if keep else schedule_cfl.head(8))
else:
print('CFL schedule unavailable')
β
CFL team schedule
CFL schedule unavailable
βΎ Part 2 β College Baseball & Softballβ
NCAA Baseball and NCAA Softball sit under sportsdataverse.baseball.
Both modules expose the full _NCAA_WRAPPERS set β which adds
espn_{prefix}_rankings and espn_{prefix}_season_recruits on top of
the universal surface β giving you AP-style polls and recruiting boards
alongside the standard scoreboard/schedule/teams/standings family.
βΎ College baseball: scoreboard & teamsβ
espn_college_baseball_scoreboard(dates=YYYYMMDD)
returns the game slate for a date. The College World Series in June is peak
traffic, so games should be available; the off-season window (November β January)
returns an empty slate.
# College World Series finals day, 2024
board_cbb = safe(
'college baseball scoreboard (parsed)',
lambda: cbb.espn_college_baseball_scoreboard(dates=CBB_DATE),
)
if board_cbb is not None and getattr(board_cbb, 'height', 0):
keep = [c for c in board_cbb.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_cbb.select(keep).head() if keep else board_cbb.head())
else:
print('college baseball scoreboard unavailable')
β
college baseball scoreboard (parsed)
shape: (1, 5)
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ
β name β short_name β status_type_description β home_score β away_score β
β --- β --- β --- β --- β --- β
β str β str β str β str β str β
ββββββββββββββββββββββββββββββββββͺββββββββββββββͺββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββ‘
β Texas A&M Aggies at Tennessee β TA&M @ TENN β Final β 6 β 5 β
β β¦ β β β β β
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ
# All NCAA baseball teams with their team_id
teams_cbb = safe(
'college baseball teams',
lambda: cbb.espn_college_baseball_teams_site(),
)
if teams_cbb is not None and teams_cbb.height:
keep = [c for c in teams_cbb.columns
if c in ('id', 'abbreviation', 'display_name', 'location', 'color')]
print('Total teams:', teams_cbb.height)
display(teams_cbb.select(keep).head(10) if keep else teams_cbb.head(10))
else:
print('teams unavailable')
β
college baseball teams
Total teams: 437
shape: (10, 13)
ββββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β team_abbre β team_colo β team_disp β team_id β β¦ β team_nick β team_shor β team_slug β team_uid β
β viation β r β lay_name β --- β β name β t_display β --- β --- β
β --- β --- β --- β i64 β β --- β _name β str β str β
β str β str β str β β β str β --- β β β
β β β β β β β str β β β
ββββββββββββββͺββββββββββββͺββββββββββββͺββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββ‘
β ACU β 000000 β Abilene β 315 β β¦ β Abilene β Abilene β abilene-c β s:1~l:14~ β
β β β Christian β β β Chrstn β Chrstn β hristian- β t:315 β
β β β Wildcats β β β β β wildcats β β
β AFA β 004A7B β Air Force β 155 β β¦ β Air Force β Air Force β air-force β s:1~l:14~ β
β β β Falcons β β β β β -falcons β t:155 β
β AKR β 0A1E5B β Akron β 316 β β¦ β Akron β Akron β akron-zip β s:1~l:14~ β
β β β Zips β β β β β s β t:316 β
β AAMU β 790000 β Alabama β 317 β β¦ β Alabama β Alabama β alabama-a β s:1~l:14~ β
β β β A&M β β β A&M β A&M β m-bulldog β t:317 β
β β β Bulldogs β β β β β s β β
β ALA β A42D47 β Alabama β 148 β β¦ β Alabama β Alabama β alabama-c β s:1~l:14~ β
β β β Crimson β β β β β rimson-ti β t:148 β
β β β Tide β β β β β de β β
β ALST β 603913 β Alabama β 318 β β¦ β Alabama β Alabama β alabama-s β s:1~l:14~ β
β β β State β β β St β St β tate-horn β t:318 β
β β β Hornets β β β β β ets β β
β ALCN β C1B881 β Alcorn β 260 β β¦ β Alcorn St β Alcorn St β alcorn-st β s:1~l:14~ β
β β β State β β β β β ate-brave β t:260 β
β β β Braves β β β β β s β β
β ALMA β null β Alma β 821 β β¦ β Alma β Alma β alma-scot β s:1~l:14~ β
β β β Scots β β β β β s β t:821 β
β AMER β c41130 β American β 319 β β¦ β American β American β american- β s:1~l:14~ β
β β β Universit β β β β β universit β t:319 β
β β β y Eagles β β β β β y-eagles β β
β ANDC β null β Anderson β 822 β β¦ β Anderson β Anderson β anderson- β s:1~l:14~ β
β β β (IN) β β β IND β IND β in-ravens β t:822 β
β β β Ravens β β β β β β β
ββββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
π College baseball: standings & rankingsβ
espn_college_baseball_standings()
returns conference standings. espn_college_baseball_rankings()
returns the current AP / USA Today poll β one of the NCAA extras added by the
_NCAA_WRAPPERS family.
# Conference standings
standings_cbb = safe(
'college baseball standings',
lambda: cbb.espn_college_baseball_standings(),
)
if standings_cbb is not None and standings_cbb.height:
keep = [c for c in standings_cbb.columns
if c in ('team_id', 'team_name', 'team_abbreviation',
'wins', 'losses', 'win_percent')]
display(standings_cbb.select(keep).head(10) if keep else standings_cbb.head(10))
else:
print('standings unavailable')
β
college baseball standings
shape: (10, 6)
βββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββ¬βββββββββ¬ββββββββββββββ¬βββββββ
β team_id β team_name β team_abbreviation β losses β win_percent β wins β
β --- β --- β --- β --- β --- β --- β
β i64 β str β str β f64 β f64 β f64 β
βββββββββββͺβββββββββββββββͺββββββββββββββββββββͺβββββββββͺββββββββββββββͺβββββββ‘
β 146 β Chanticleers β CCU β 0.0 β 1.0 β 3.0 β
β 58 β Razorbacks β ARK β 13.0 β 0.779661 β 46.0 β
β 96 β Tar Heels β UNC β 13.0 β 0.7758621 β 45.0 β
β 126 β Longhorns β TEX β 14.0 β 0.7586207 β 44.0 β
β 136 β Mountaineers β WVU β 14.0 β 0.7586207 β 44.0 β
β 85 β Tigers β LSU β 15.0 β 0.754098 β 46.0 β
β 72 β Seminoles β FSU β 14.0 β 0.745455 β 41.0 β
β 66 β Bruins β UCLA β 16.0 β 0.737705 β 45.0 β
β 199 β Volunteers β TENN β 17.0 β 0.730159 β 46.0 β
β 273 β Ducks β ORE β 16.0 β 0.7241379 β 42.0 β
βββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββ΄βββββββββ΄ββββββββββββββ΄βββββββ
# National polls β AP / USA Today baseball rankings
rankings_cbb = safe(
'college baseball rankings',
lambda: cbb.espn_college_baseball_rankings(),
)
if rankings_cbb is not None and rankings_cbb.height:
keep = [c for c in rankings_cbb.columns
if c in ('rank', 'team_id', 'team_name', 'points', 'first_place_votes',
'wins', 'losses')]
display(rankings_cbb.select(keep).head(10) if keep else rankings_cbb.head(10))
else:
print('rankings unavailable (only current during the season)')
βοΈ college baseball rankings: NoDataError: No data found for https://site.api.espn.com/apis/site/v2/sports/baseball/college-baseball/rankings
rankings unavailable (only current during the season)
π College baseball: team scheduleβ
Pick any team_id from the teams frame above and pull its full schedule.
Texas (team_id=251) is a perennial CWS contender β a good reference point.
# Texas Longhorns baseball schedule (team_id=126; 251 is Texas in football/basketball)
schedule_cbb = safe(
'college baseball team schedule',
lambda: cbb.espn_college_baseball_team_schedule(
team_id=126, season=SAMPLE_SEASON
),
)
if schedule_cbb is not None and schedule_cbb.height:
keep = [c for c in schedule_cbb.columns
if c in ('id', 'name', 'short_name',
'home_team_abbreviation', 'away_team_abbreviation',
'home_score', 'away_score', 'status_type_description')]
display(schedule_cbb.select(keep).head(8) if keep else schedule_cbb.head(8))
else:
print('schedule unavailable')
β
college baseball team schedule
shape: (8, 3)
βββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββ
β id β name β short_name β
β --- β --- β --- β
β i64 β str β str β
βββββββββββββͺββββββββββββββββββββββββββββββββββͺβββββββββββββ‘
β 401631945 β San Diego Toreros at Texas Lonβ¦ β USD @ TEX β
β 401631946 β San Diego Toreros at Texas Lonβ¦ β USD @ TEX β
β 401631947 β San Diego Toreros at Texas Lonβ¦ β USD @ TEX β
β 401633177 β Houston Christian Huskies at Tβ¦ β HCU @ TEX β
β 401633178 β Cal Poly Mustangs at Texas Lonβ¦ β CP @ TEX β
β 401633179 β Cal Poly Mustangs at Texas Lonβ¦ β CP @ TEX β
β 401633180 β Cal Poly Mustangs at Texas Lonβ¦ β CP @ TEX β
β 401633181 β St. John's Red Storm at Texas β¦ β SJU @ TEX β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββ
π₯ College softball: scoreboard & teamsβ
The college_softball module mirrors college_baseball exactly β same wrapper
family, just a different league slug. The Women's College World Series (WCWS)
wraps up in early June.
# WCWS finals day, June 2024
board_cbs = safe(
'college softball scoreboard (parsed)',
lambda: cbs.espn_college_softball_scoreboard(dates=CBS_DATE),
)
if board_cbs is not None and getattr(board_cbs, 'height', 0):
keep = [c for c in board_cbs.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_cbs.select(keep).head() if keep else board_cbs.head())
else:
print('college softball scoreboard unavailable')
β
college softball scoreboard (parsed)
shape: (1, 5)
βββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ
β name β short_name β status_type_description β home_score β away_score β
β --- β --- β --- β --- β --- β
β str β str β str β str β str β
βββββββββββββββββββββββββββββββββββͺβββββββββββββͺββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββ‘
β Texas Longhorns at Oklahoma Soβ¦ β TEX @ OU β Final β 8 β 4 β
βββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ
# College softball teams
teams_cbs = safe(
'college softball teams',
lambda: cbs.espn_college_softball_teams_site(),
)
if teams_cbs is not None and teams_cbs.height:
keep = [c for c in teams_cbs.columns
if c in ('id', 'abbreviation', 'display_name', 'location', 'color')]
print('Total teams:', teams_cbs.height)
display(teams_cbs.select(keep).head(10) if keep else teams_cbs.head(10))
else:
print('teams unavailable')
β
college softball teams
Total teams: 446
shape: (10, 13)
ββββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β team_abbre β team_colo β team_disp β team_id β β¦ β team_nick β team_shor β team_slug β team_uid β
β viation β r β lay_name β --- β β name β t_display β --- β --- β
β --- β --- β --- β i64 β β --- β _name β str β str β
β str β str β str β β β str β --- β β β
β β β β β β β str β β β
ββββββββββββββͺββββββββββββͺββββββββββββͺββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββ‘
β ACU β 000000 β Abilene β 669 β β¦ β Abilene β Abilene β abilene-c β s:1~l:102 β
β β β Christian β β β Chrstn β Chrstn β hristian- β ~t:669 β
β β β Wildcats β β β β β wildcats β β
β AF β 004A7B β Air Force β 567 β β¦ β Air Force β Air Force β air-force β s:1~l:102 β
β β β Falcons β β β β β -falcons β ~t:567 β
β AKR β 0A1E5B β Akron β 670 β β¦ β Akron β Akron β akron-zip β s:1~l:102 β
β β β Zips β β β β β s β ~t:670 β
β AAMU β 790000 β Alabama β 671 β β¦ β Alabama β Alabama β alabama-a β s:1~l:102 β
β β β A&M β β β A&M β A&M β m-bulldog β ~t:671 β
β β β Bulldogs β β β β β s β β
β ALA β A42D47 β Alabama β 560 β β¦ β Alabama β Alabama β alabama-c β s:1~l:102 β
β β β Crimson β β β β β rimson-ti β ~t:560 β
β β β Tide β β β β β de β β
β AH β null β Alabama β 860 β β¦ β UA-Huntsv β UA-Huntsv β alabama-h β s:1~l:102 β
β β β Huntsvill β β β ille β ille β untsville β ~t:860 β
β β β e β β β β β -chargers β β
β β β Chargers β β β β β β β
β ALST β 603913 β Alabama β 672 β β¦ β Alabama β Alabama β alabama-s β s:1~l:102 β
β β β State β β β St β St β tate-horn β ~t:672 β
β β β Hornets β β β β β ets β β
β ALBS β null β Albany β 861 β β¦ β Albany St β Albany St β albany-st β s:1~l:102 β
β β β State β β β β β ate-golde β ~t:861 β
β β β Golden β β β β β n-rams β β
β β β Rams β β β β β β β
β ALCN β C1B881 β Alcorn β 623 β β¦ β Alcorn St β Alcorn St β alcorn-st β s:1~l:102 β
β β β State β β β β β ate-brave β ~t:623 β
β β β Braves β β β β β s β β
β AMER β c41130 β American β 673 β β¦ β American β American β american- β s:1~l:102 β
β β β Universit β β β β β universit β ~t:673 β
β β β y Eagles β β β β β y-eagles β β
ββββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
# College softball rankings
rankings_cbs = safe(
'college softball rankings',
lambda: cbs.espn_college_softball_rankings(),
)
if rankings_cbs is not None and rankings_cbs.height:
keep = [c for c in rankings_cbs.columns
if c in ('rank', 'team_id', 'team_name', 'points',
'first_place_votes', 'wins', 'losses')]
display(rankings_cbs.select(keep).head(10) if keep else rankings_cbs.head(10))
else:
print('rankings unavailable (only current during the season)')
βοΈ college softball rankings: NoDataError: No data found for https://site.api.espn.com/apis/site/v2/sports/baseball/college-softball/rankings
rankings unavailable (only current during the season)
π₯ College softball: game summaryβ
The same espn_{prefix}_summary(event_id=) pattern works for softball.
The raw dict contains a boxscore key (team batting/pitching lines),
a scoringPlays array, and β for parsed callers β all 21 sub-frames
from the shared parse_summary dispatcher.
# 2024 WCWS Championship Game 2 β Oklahoma vs Texas, its event_id taken from the scoreboard above
CBS_CHAMPIONSHIP_ID = int(board_cbs['game_id'][0]) if board_cbs is not None and board_cbs.height else None
summary_cbs = safe(
'college softball game summary (raw)',
lambda: cbs.espn_college_softball_summary(event_id=CBS_CHAMPIONSHIP_ID),
)
_keys(summary_cbs)
β
college softball game summary (raw)
top-level keys: ['boxscore_player', 'boxscore_team', 'plays', 'winprobability', 'leaders', 'game_info', 'officials', 'header', 'season_series', 'against_the_spread', 'standings', 'broadcasts', 'format', 'pickcenter', 'odds']
π Part 3 β NCAA Men's & Women's College Hockeyβ
Men's College Hockey (mch) and Women's College Hockey (wch) round out the
seven-league expansion. Both expose the full _NCAA_WRAPPERS set. The
signature events are the Frozen Four in April (men's) and March (women's).
π Men's college hockey: scoreboard & teamsβ
espn_mch_scoreboard(dates=YYYYMMDD)
returns the game slate. espn_mch_teams_site()
lists all Division I programs β currently 60 teams.
# Frozen Four semi-final day, April 2024
board_mch = safe(
'men\'s college hockey scoreboard (parsed)',
lambda: mch.espn_mch_scoreboard(dates=MCH_DATE),
)
if board_mch is not None and getattr(board_mch, 'height', 0):
keep = [c for c in board_mch.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_mch.select(keep).head() if keep else board_mch.head())
else:
print('men\'s college hockey scoreboard unavailable')
β
men's college hockey scoreboard (parsed)
shape: (1, 5)
βββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ
β name β short_name β status_type_description β home_score β away_score β
β --- β --- β --- β --- β --- β
β str β str β str β str β str β
βββββββββββββββββββββββββββββββββββͺβββββββββββββͺββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββ‘
β Denver Pioneers at Boston Collβ¦ β DEN @ BC β Final β 0 β 2 β
βββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ
# Men's college hockey teams
teams_mch = safe(
'men\'s college hockey teams',
lambda: mch.espn_mch_teams_site(),
)
if teams_mch is not None and teams_mch.height:
keep = [c for c in teams_mch.columns
if c in ('id', 'abbreviation', 'display_name', 'location', 'color')]
print('Total D-I men\'s programs:', teams_mch.height)
display(teams_mch.select(keep).head(10) if keep else teams_mch.head(10))
else:
print('teams unavailable')
β
men's college hockey teams
Total D-I men's programs: 116
shape: (10, 14)
ββββββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β team_abbre β team_disp β team_id β team_is_a β β¦ β team_uid β team_logo β team_alte β team_colo β
β viation β lay_name β --- β ctive β β --- β s β rnate_col β r β
β --- β --- β i64 β --- β β str β --- β or β --- β
β str β str β β bool β β β str β --- β str β
β β β β β β β β str β β
ββββββββββββββͺββββββββββββͺββββββββββͺββββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββ‘
β ADR β Adrian β 110134 β true β β¦ β s:70~l:91 β null β null β null β
β β Bulldogs β β β β ~t:110134 β β β β
β AF β Air Force β 2005 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β Falcons β β β β ~t:2005 β '', β β β
β β β β β β β 'height': β β β
β β β β β β β 500, 'hβ¦ β β β
β AH β Alabama β 2008 β true β β¦ β s:70~l:91 β null β null β null β
β β Huntsvill β β β β ~t:2008 β β β β
β β e β β β β β β β β
β β Chargers β β β β β β β β
β UAA β Alaska β 1 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β Anchorage β β β β ~t:1 β '', β β β
β β Seawolves β β β β β 'height': β β β
β β β β β β β 500, 'hβ¦ β β β
β AKFB β Alaska β 298 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β Nanooks β β β β ~t:298 β '', β β β
β β β β β β β 'height': β β β
β β β β β β β 500, 'hβ¦ β β β
β ABCA β Alberta β 14196 β true β β¦ β s:70~l:91 β null β null β null β
β β Golden β β β β ~t:14196 β β β β
β β Bears & β β β β β β β β
β β Pandas β β β β β β β β
β AIC β American β 2022 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β Internati β β β β ~t:2022 β '', β β β
β β onal β β β β β 'height': β β β
β β Yellow β¦ β β β β β 500, 'hβ¦ β β β
β ANMR β Anna β 126807 β true β β¦ β s:70~l:91 β null β null β null β
β β Maria β β β β ~t:126807 β β β β
β β Amcats β β β β β β β β
β ASU β Arizona β 9 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β State Sun β β β β ~t:9 β '', β β β
β β Devils β β β β β 'height': β β β
β β β β β β β 500, 'hβ¦ β β β
β ARIZ β Arizona β 12 β true β β¦ β s:70~l:91 β [{'alt': β null β null β
β β Wildcats β β β β ~t:12 β '', β β β
β β β β β β β 'height': β β β
β β β β β β β 500, 'hβ¦ β β β
ββββββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
π Men's college hockey: standings & rankingsβ
Conference standings are the primary puck-nerd query β which NCHC / Hockey East / Big Ten team leads their division? The rankings endpoint returns the USCHO / USA Today poll.
# Conference standings
standings_mch = safe(
"men's college hockey standings",
lambda: mch.espn_mch_standings(),
)
if standings_mch is not None and standings_mch.height:
keep = [c for c in standings_mch.columns
if c in ('team_id', 'team_name', 'team_abbreviation',
'wins', 'losses', 'ties', 'win_percent')]
display(standings_mch.select(keep).head(10) if keep else standings_mch.head(10))
else:
print('standings unavailable')
β
men's college hockey standings
shape: (10, 6)
βββββββββββ¬ββββββββββββββββββ¬ββββββββββββββββββββ¬βββββββββ¬ββββββββββββββ¬βββββββ
β team_id β team_name β team_abbreviation β losses β win_percent β wins β
β --- β --- β --- β --- β --- β --- β
β i64 β str β str β f64 β f64 β f64 β
βββββββββββͺββββββββββββββββββͺββββββββββββββββββββͺβββββββββͺββββββββββββββͺβββββββ‘
β 349 β Black Knights β ARMY β 2.0 β 0.8 β 8.0 β
β 2099 β Golden Griffins β CAN β 6.0 β 0.4 β 4.0 β
β 2523 β Colonials β RMU β 7.0 β 0.363636 β 4.0 β
β 178 β Tigers β RIT β 8.0 β 0.272727 β 3.0 β
β 315 β Purple Eagles β NIA β 5.0 β 0.545455 β 6.0 β
β 2005 β Falcons β AFA β 7.0 β 0.416667 β 5.0 β
β 2060 β Falcons β BENT β 6.0 β 0.5 β 6.0 β
β 2529 β Pioneers β SHU β 6.0 β 0.5 β 6.0 β
β 107 β Crusaders β HC β 9.0 β 0.357143 β 5.0 β
β 127 β Spartans β MSU β 3.0 β 0.6666667 β 6.0 β
βββββββββββ΄ββββββββββββββββββ΄ββββββββββββββββββββ΄βββββββββ΄ββββββββββββββ΄βββββββ
# National rankings
rankings_mch = safe(
"men's college hockey rankings",
lambda: mch.espn_mch_rankings(),
)
if rankings_mch is not None and rankings_mch.height:
keep = [c for c in rankings_mch.columns
if c in ('rank', 'team_id', 'team_name', 'points',
'first_place_votes', 'wins', 'losses', 'ties')]
display(rankings_mch.select(keep).head(10) if keep else rankings_mch.head(10))
else:
print('rankings unavailable (only current during the season)')
β
men's college hockey rankings
shape: (10, 5)
βββββββββββ¬βββββββ¬βββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββ
β team_id β rank β points β first_place_votes β team_name β
β --- β --- β --- β --- β --- β
β i64 β i64 β f64 β i64 β str β
βββββββββββͺβββββββͺβββββββββͺββββββββββββββββββββͺβββββββββββββββββ‘
β 130 β 1 β 0.0 β null β Wolverines β
β 275 β 2 β 0.0 β null β Badgers β
β 2172 β 3 β 0.0 β null β Pioneers β
β 2711 β 4 β 0.0 β null β Broncos β
β 134 β 5 β 0.0 β null β Bulldogs β
β 159 β 6 β 0.0 β null β Big Green β
β 155 β 7 β 0.0 β null β Fighting Hawks β
β 2514 β 8 β 0.0 β null β Bobcats β
β 127 β 9 β 0.0 β null β Spartans β
β 2043 β 10 β 0.0 β null β Vikings β
βββββββββββ΄βββββββ΄βββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββ
π Men's college hockey: team schedule & rosterβ
Pull a program's full schedule with
espn_mch_team_schedule(team_id=, season=)
and their roster with
espn_mch_team_roster(team_id=, season=).
Boston University (team_id=103) won the 2024 national title β a good
reference point.
# BU Terriers schedule 2023-24
schedule_mch = safe(
"men's college hockey team schedule",
lambda: mch.espn_mch_team_schedule(team_id=104, season=SAMPLE_SEASON,
),
)
if schedule_mch is not None and schedule_mch.height:
keep = [c for c in schedule_mch.columns
if c in ('id', 'name', 'short_name',
'home_team_abbreviation', 'away_team_abbreviation',
'home_score', 'away_score', 'status_type_description')]
display(schedule_mch.select(keep).head(8) if keep else schedule_mch.head(8))
else:
print('schedule unavailable')
β
men's college hockey team schedule
shape: (8, 3)
βββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββ
β id β name β short_name β
β --- β --- β --- β
β i64 β str β str β
βββββββββββββͺββββββββββββββββββββββββββββββββββͺβββββββββββββ‘
β 401596244 β Boston University Terriers at β¦ β BU @ BENT β
β 401596384 β Boston University Terriers at β¦ β BU @ UNH β
β 401596385 β Boston University Terriers at β¦ β BU @ ND β
β 401596386 β Boston University Terriers at β¦ β BU @ ND β
β 401596387 β Massachusetts Minutemen at Bosβ¦ β MASS @ BU β
β 401596388 β Boston University Terriers at β¦ β BU @ MASS β
β 401596389 β North Dakota Fighting Hawks atβ¦ β UND @ BU β
β 401596390 β North Dakota Fighting Hawks atβ¦ β UND @ BU β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββ
# BU Terriers roster (current)
roster_mch = safe(
"men's college hockey roster",
lambda: mch.espn_mch_team_roster(team_id=104), # ESPN's roster is always the current one
)
if roster_mch is not None and roster_mch.height:
keep = [c for c in roster_mch.columns
if c in ('id', 'first_name', 'last_name', 'display_name',
'position_abbreviation', 'jersey', 'birth_country')]
display(roster_mch.select(keep).head(10) if keep else roster_mch.head(10))
else:
print('roster unavailable')
β
men's college hockey roster
shape: (10, 6)
βββββββββββ¬βββββββββββββ¬ββββββββββββ¬ββββββββββββββββββ¬βββββββββ¬ββββββββββββββββββββββββ
β id β first_name β last_name β display_name β jersey β position_abbreviation β
β --- β --- β --- β --- β --- β --- β
β i64 β str β str β str β str β str β
βββββββββββͺβββββββββββββͺββββββββββββͺββββββββββββββββββͺβββββββββͺββββββββββββββββββββββββ‘
β 5136656 β Tristan β Amonte β Tristan Amonte β 3 β F β
β 5216936 β Kamil β Bednarik β Kamil Bednarik β 11 β F β
β 5206627 β Mathieu β Caron β Mathieu Caron β 62 β G β
β 5188559 β Aiden β Celebrini β Aiden Celebrini β 22 β D β
β 4997117 β Brehdan β Engum β Brehdan Engum β 10 β D β
β 5206622 β Mick β Frechette β Mick Frechette β 14 β D β
β 5275393 β Billy β Girard IV β Billy Girard IV β 1 β G β
β 5206624 β Jack β Gorton β Jack Gorton β 26 β F β
β 5206623 β Doug β Grimes β Doug Grimes β 23 β F β
β 5188526 β Jack β Harvey β Jack Harvey β 12 β F β
βββββββββββ΄βββββββββββββ΄ββββββββββββ΄ββββββββββββββββββ΄βββββββββ΄ββββββββββββββββββββββββ
π© Women's college hockey: scoreboard, teams & scheduleβ
The wch module is the women's mirror. The NCAA Women's Frozen Four runs
in late March. Wisconsin is the perennial power β 12 national championships.
# NCAA Women's Frozen Four 2024
board_wch = safe(
"women's college hockey scoreboard (parsed)",
lambda: wch.espn_wch_scoreboard(dates=WCH_DATE),
)
if board_wch is not None and getattr(board_wch, 'height', 0):
keep = [c for c in board_wch.columns
if c in ('id', 'name', 'short_name', 'status_type_description',
'home_team_abbreviation', 'home_score',
'away_team_abbreviation', 'away_score')]
display(board_wch.select(keep).head() if keep else board_wch.head())
else:
print("women's college hockey scoreboard unavailable")
β
women's college hockey scoreboard (parsed)
shape: (2, 5)
βββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬ββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββ
β name β short_name β status_type_description β home_score β away_score β
β --- β --- β --- β --- β --- β
β str β str β str β str β str β
βββββββββββββββββββββββββββββββββββͺβββββββββββββͺββββββββββββββββββββββββββͺβββββββββββββͺβββββββββββββ‘
β Clarkson Golden Knights at Ohiβ¦ β CLAR @ OSU β Final β 4 β 1 β
β Colgate Raiders at Wisconsin Bβ¦ β COLG @ WIS β Final β 3 β 1 β
βββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄ββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββ
# Women's college hockey teams
teams_wch = safe(
"women's college hockey teams",
lambda: wch.espn_wch_teams_site(),
)
if teams_wch is not None and teams_wch.height:
keep = [c for c in teams_wch.columns
if c in ('id', 'abbreviation', 'display_name', 'location', 'color')]
print("Total women's D-I programs:", teams_wch.height)
display(teams_wch.select(keep).head(10) if keep else teams_wch.head(10))
else:
print('teams unavailable')
β
women's college hockey teams
Total women's D-I programs: 47
shape: (10, 12)
ββββββββββββββ¬ββββββββββββ¬ββββββββββ¬ββββββββββββ¬ββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ¬ββββββββββββ
β team_abbre β team_disp β team_id β team_is_a β β¦ β team_nick β team_shor β team_slug β team_uid β
β viation β lay_name β --- β ctive β β name β t_display β --- β --- β
β --- β --- β i64 β --- β β --- β _name β str β str β
β str β str β β bool β β str β --- β β β
β β β β β β β str β β β
ββββββββββββββͺββββββββββββͺββββββββββͺββββββββββββͺββββͺββββββββββββͺββββββββββββͺββββββββββββͺββββββββββββ‘
β ASP β Assumptio β 127962 β true β β¦ β Assumptio β Assumptio β assumptio β s:70~l:92 β
β β n Greyhou β β β β n β n β n-greyhou β ~t:127962 β
β β nds β β β β β β nds β β
β BST β Bemidji β 132 β true β β¦ β Bemidji β Bemidji β bemidji-s β s:70~l:92 β
β β State β β β β State β State β tate-beav β ~t:132 β
β β Beavers β β β β β β ers β β
β BC β Boston β 103 β true β β¦ β Boston β Boston β boston-co β s:70~l:92 β
β β College β β β β College β College β llege-eag β ~t:103 β
β β Eagles β β β β β β les β β
β BU β Boston β 104 β true β β¦ β Boston β Boston β boston-un β s:70~l:92 β
β β Universit β β β β Universit β Universit β iversity- β ~t:104 β
β β y β β β β y β y β terriers β β
β β Terriers β β β β β β β β
β BRWN β Brown β 225 β true β β¦ β Brown β Brown β brown-bea β s:70~l:92 β
β β Bears β β β β β β rs β ~t:225 β
β CLAR β Clarkson β 2137 β true β β¦ β Clarkson β Clarkson β clarkson- β s:70~l:92 β
β β Golden β β β β β β golden-kn β ~t:2137 β
β β Knights β β β β β β ights β β
β COLG β Colgate β 2142 β true β β¦ β Colgate β Colgate β colgate-r β s:70~l:92 β
β β Raiders β β β β β β aiders β ~t:2142 β
β COR β Cornell β 172 β true β β¦ β Cornell β Cornell β cornell-b β s:70~l:92 β
β β Big Red β β β β β β ig-red β ~t:172 β
β DART β Dartmouth β 159 β true β β¦ β Dartmouth β Dartmouth β dartmouth β s:70~l:92 β
β β Big Green β β β β β β -big-gree β ~t:159 β
β β β β β β β β n β β
β FP β Franklin β 121934 β true β β¦ β Franklin β Franklin β franklin- β s:70~l:92 β
β β Pierce β β β β Pierce β Pierce β pierce-ra β ~t:121934 β
β β Ravens β β β β β β vens β β
ββββββββββββββ΄ββββββββββββ΄ββββββββββ΄ββββββββββββ΄ββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ΄ββββββββββββ
# Wisconsin Badgers women's hockey schedule 2023-24 (team_id=275)
schedule_wch = safe(
"women's college hockey team schedule",
lambda: wch.espn_wch_team_schedule(team_id=275, season=SAMPLE_SEASON,
),
)
if schedule_wch is not None and schedule_wch.height:
keep = [c for c in schedule_wch.columns
if c in ('id', 'name', 'short_name',
'home_team_abbreviation', 'away_team_abbreviation',
'home_score', 'away_score', 'status_type_description')]
display(schedule_wch.select(keep).head(8) if keep else schedule_wch.head(8))
else:
print('schedule unavailable')
β
women's college hockey team schedule
shape: (3, 3)
βββββββββββββ¬ββββββββββββββββββββββββββββββββββ¬βββββββββββββ
β id β name β short_name β
β --- β --- β --- β
β i64 β str β str β
βββββββββββββͺββββββββββββββββββββββββββββββββββͺβββββββββββββ‘
β 401647743 β St. Lawrence Saints at Wisconsβ¦ β USL @ WIS β
β 401647740 β Colgate Raiders at Wisconsin Bβ¦ β COLG @ WIS β
β 401647741 β Wisconsin Badgers at Ohio Statβ¦ β WIS @ OSU β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββ΄βββββββββββββ
# Women's college hockey rankings
rankings_wch = safe(
"women's college hockey rankings",
lambda: wch.espn_wch_rankings(),
)
if rankings_wch is not None and rankings_wch.height:
keep = [c for c in rankings_wch.columns
if c in ('rank', 'team_id', 'team_name', 'points',
'first_place_votes', 'wins', 'losses', 'ties')]
display(rankings_wch.select(keep).head(10) if keep else rankings_wch.head(10))
else:
print("rankings unavailable (only current during the season)")
β
women's college hockey rankings
shape: (10, 5)
βββββββββββ¬βββββββ¬βββββββββ¬ββββββββββββββββββββ¬βββββββββββββββββ
β team_id β rank β points β first_place_votes β team_name β
β --- β --- β --- β --- β --- β
β i64 β i64 β f64 β i64 β str β
βββββββββββͺβββββββͺβββββββββͺββββββββββββββββββββͺβββββββββββββββββ‘
β 194 β 1 β 0.0 β null β Buckeyes β
β 135 β 2 β 0.0 β null β Golden Gophers β
β 275 β 3 β 0.0 β null β Badgers β
β 163 β 4 β 0.0 β null β Tigers β
β 111 β 5 β 0.0 β null β Huskies β
β 2514 β 6 β 0.0 β null β Bobcats β
β 213 β 7 β 0.0 β null β Nittany Lions β
β 2137 β 8 β 0.0 β null β Golden Knights β
β 41 β 9 β 0.0 β null β Huskies β
β 2142 β 10 β 0.0 β null β Raiders β
βββββββββββ΄βββββββ΄βββββββββ΄ββββββββββββββββββββ΄βββββββββββββββββ
π³ Cookbook: cross-league recipesβ
A handful of patterns you'll reach for constantly across all seven leagues.
Recipe 1 β Collect all teams from every league into one frame ποΈβ
All seven modules expose espn_{prefix}_teams_site(). Stack them with
pl.concat to build a cross-league lookup table.
import importlib
LEAGUE_MODULES = [
('ufl', ufl, 'espn_ufl_teams_site'),
('xfl', xfl, 'espn_xfl_teams_site'),
('cfl', cfl, 'espn_cfl_teams_site'),
('college_baseball', cbb, 'espn_college_baseball_teams_site'),
('college_softball', cbs, 'espn_college_softball_teams_site'),
('mch', mch, 'espn_mch_teams_site'),
('wch', wch, 'espn_wch_teams_site'),
]
frames = []
for league_name, mod, fn_name in LEAGUE_MODULES:
fn = getattr(mod, fn_name)
df = safe(f'{league_name} teams', lambda fn=fn: fn())
if df is not None and df.height:
# parsed teams frames use team_id / team_display_name column names
id_col = 'team_id' if 'team_id' in df.columns else 'id' if 'id' in df.columns else df.columns[0]
name_col = 'team_display_name' if 'team_display_name' in df.columns else 'display_name' if 'display_name' in df.columns else df.columns[1]
frames.append(
df.select([id_col, name_col])
.rename({id_col: 'id', name_col: 'display_name'})
.with_columns(pl.lit(league_name).alias('league'))
)
if frames:
all_teams = pl.concat(frames, how='diagonal_relaxed')
print('Total teams across all 7 leagues:', all_teams.height)
display(all_teams.group_by('league').len().sort('len', descending=True))
else:
print('no team data available right now')
β
ufl teams
β
xfl teams
β
cfl teams
β
college_baseball teams
β
college_softball teams
β
mch teams
β
wch teams
Total teams across all 7 leagues: 1067
shape: (7, 2)
ββββββββββββββββββββ¬ββββββ
β league β len β
β --- β --- β
β str β u32 β
ββββββββββββββββββββͺββββββ‘
β college_softball β 446 β
β college_baseball β 437 β
β mch β 116 β
β wch β 47 β
β cfl β 9 β
β ufl β 8 β
β xfl β 4 β
ββββββββββββββββββββ΄ββββββ
Recipe 2 β Today's slate for any league π β
Pass dates= as YYYYMMDD to any scoreboard wrapper. Omitting the argument
returns ESPN's current default date (today or the most recent active day),
which is handy during the season.
from datetime import date
today_str = int(date.today().strftime('%Y%m%d'))
# Swap in any module + scoreboard function to check a different league
todays_cfl = safe(
f"today's CFL slate ({today_str})",
lambda: cfl.espn_cfl_scoreboard(dates=today_str),
)
if todays_cfl is not None and getattr(todays_cfl, 'height', 0):
print(f"{todays_cfl.height} game(s) today")
display(todays_cfl.head())
else:
print('no CFL games today (or offseason)')
β
today's CFL slate (20261116)
no CFL games today (or offseason)
Recipe 3 β Player info for any athlete π§βπ»β
Every league exposes espn_{prefix}_player_info(athlete_id=). Find an
athlete_id via the roster endpoint, then pull richer bio / career-stats
detail with espn_{prefix}_player_career_stats(athlete_id=). When the site page is missing,
as it is for many college players, espn_{prefix}_player_core(athlete_id=) has the core record.
# ESPN's site v2 athlete page is missing for many college players, so try a few roster ids
roster_ids = (roster_mch['id'].head(5).to_list()
if roster_mch is not None and 'id' in roster_mch.columns else [])
player_info = None
for athlete_id in roster_ids:
try:
player_info = mch.espn_mch_player_info(athlete_id=athlete_id)
print(f'β
MCH player info (id={athlete_id})')
break
except NoDataError:
continue
if roster_ids and player_info is None:
print(f'No site v2 athlete page for the first {len(roster_ids)} roster players; showing the core v2 record')
player_info = safe(f'MCH player core (id={roster_ids[0]})',
lambda: mch.espn_mch_player_core(athlete_id=roster_ids[0]))
elif not roster_ids:
print('roster not loaded β skipping player info example')
player_info
No site v2 athlete page for the first 5 roster players; showing the core v2 record
β
MCH player core (id=5136656)
shape: (1, 39)
ββββββββββββββ¬ββββββββββ¬βββββββββββββ¬βββββββββ¬ββββ¬βββββββββββββ¬βββββββββββββ¬ββββββββββββ¬ββββββββββββ
β $ref β id β uid β type β β¦ β status_nam β status_typ β status_ab β statistic β
β --- β --- β --- β --- β β e β e β breviatio β slog_$ref β
β str β i64 β str β str β β --- β --- β n β --- β
β β β β β β str β str β --- β str β
β β β β β β β β str β β
ββββββββββββββͺββββββββββͺβββββββββββββͺβββββββββͺββββͺβββββββββββββͺβββββββββββββͺββββββββββββͺββββββββββββ‘
β http://spo β 5136656 β s:70~l:91~ β hockey β β¦ β Active β active β Active β http://sp β
β rts.core.a β β a:5136656 β β β β β β orts.core β
β pi.espn.co β β β β β β β β .api.espn β
β β¦ β β β β β β β β .coβ¦ β
ββββββββββββββ΄ββββββββββ΄βββββββββββββ΄βββββββββ΄ββββ΄βββββββββββββ΄βββββββββββββ΄ββββββββββββ΄ββββββββββββ
Recipe 4 β News & injuries for any league π°β
espn_{prefix}_news() and
espn_{prefix}_injuries()
need no arguments β just call them for the latest feed. Both return raw
dicts; parsed versions are available where a parser is registered.
# UFL news (current, no date needed)
news_ufl = safe('UFL news', lambda: ufl.espn_ufl_news())
_keys(news_ufl)
# CFL injuries
injuries_cfl = safe('CFL injuries', lambda: cfl.espn_cfl_injuries())
_keys(injuries_cfl)
β
UFL news
<class 'polars.dataframe.frame.DataFrame'>
β
CFL injuries
<class 'polars.dataframe.frame.DataFrame'>
ποΈ The shared cross-league architectureβ
All seven leagues come out of one code generator. The architecture is worth understanding because it makes every league behave identically:
tools/codegen/endpoints/espn_site_v2.yaml # + web_v3 / core_v2 / fitt_v3 / cdn: one entry per short name
tools/codegen/endpoints/leagues.yaml # one entry per league: sport, league, prefix, scopes
βββ tools/codegen/generate.py β espn_{prefix}_{short}
sportsdataverse/football/ufl/ufl_espn_ext.py # generated, never hand-edited
sportsdataverse/football/xfl/xfl_espn_ext.py
sportsdataverse/football/cfl/cfl_espn_ext.py
sportsdataverse/baseball/college_baseball/college_baseball_espn_ext.py
sportsdataverse/baseball/college_softball/college_softball_espn_ext.py
sportsdataverse/hockey/mch/mch_espn_ext.py
sportsdataverse/hockey/wch/wch_espn_ext.py
This means:
- Any fix to an endpoint definition or the template reaches all 7 leagues at once.
- Every league has an identical
dir()surface β the only difference is the prefix string (ufl,xfl,cfl,college_baseball, β¦). - The `` path routes through
ENDPOINT_PARSERSβ a registry mapping each short name to a dedicated parser function (or a generic fall-through likeparse_items,parse_single_entity, orparse_summary). You can always get the raw dict by omitting the kwarg.
Total wrappers across all eight SDV leagues (including the 0.0.51 originals plus the 0.0.59 expansion): 819 registered functions.
Listing all functions on any league moduleβ
# All espn_ufl_* functions β the same list shape exists for every league
ufl_fns = [f for f in dir(ufl) if f.startswith('espn_')]
print(f'{len(ufl_fns)} functions on sportsdataverse.football.ufl')
print('sample:', ufl_fns[:8], '...')
113 functions on sportsdataverse.football.ufl
sample: ['espn_ufl_award', 'espn_ufl_awards', 'espn_ufl_calendar', 'espn_ufl_cdn_schedule', 'espn_ufl_coach', 'espn_ufl_coach_record', 'espn_ufl_coach_season', 'espn_ufl_conferences'] ...
# Quick cross-league count
for name, mod in [('ufl', ufl), ('xfl', xfl), ('cfl', cfl),
('college_baseball', cbb), ('college_softball', cbs),
('mch', mch), ('wch', wch)]:
n = len([f for f in dir(mod) if f.startswith('espn_')])
print(f' {name:20s}: {n} wrappers')
ufl : 113 wrappers
xfl : 112 wrappers
cfl : 112 wrappers
college_baseball : 122 wrappers
college_softball : 121 wrappers
mch : 118 wrappers
wch : 118 wrappers
π See Alsoβ
- Spring / pro football reference docs: UFL Β· XFL Β· CFL
- College baseball / softball reference docs: College Baseball Β· College Softball
- NCAA hockey reference docs: Men's College Hockey Β· Women's College Hockey
- Cross-league architecture deep-dive:
docs/docs/architecture/espn-cross-league.md - Parser layer:
docs/docs/parsers/ - Companion notebooks:
02_cfb_intro.ipynb(CFB β the original football tutorial),07_nhl_intro.ipynb(NHL β native feed + ESPN fallback),09_mlb_intro.ipynb(MLB β Stats API + Statcast) - R package companions: cfbfastR Β· hoopR Β· wehoop Β· fastRhockey Β· baseballr