Skip to main content

Men's college basketball — additional Python functions — Fox Sports API

fox_mbb_boxscore​

fox_mbb_boxscore(game_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB boxscore (long: one row per player-stat).

Parameters

ParameterTypeDefaultDescription
game_idUnion[int, str]Fox Bifrost event id.
return_parsedboolTrueIf True (default) flatten the per-team stat tables to long form; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
game_idStringUnique game identifier.
teamStringTeam-side label or team identifier.
stat_groupString
playerStringPlayer name.
athlete_idStringUnique athlete identifier (ESPN).
statStringStat.
valueStringNumeric or string value field.

Example

from sportsdataverse.mbb import fox_mbb_boxscore
df = fox_mbb_boxscore("...")

fox_mbb_event_matchup​

fox_mbb_event_matchup(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk pregame team-stat comparison (one row per stat).

Wraps cbk/event/{game_id}/matchup.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_event_matchup
df = fox_mbb_event_matchup("...")

fox_mbb_event_recap​

fox_mbb_event_recap(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk postgame top performers (one row per player).

Wraps cbk/event/{game_id}/recap.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_event_recap
df = fox_mbb_event_recap("...")

fox_mbb_event_standings​

fox_mbb_event_standings(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk the two teams' standings context.

Wraps cbk/event/{game_id}/standings.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_event_standings
df = fox_mbb_event_standings("...")

fox_mbb_league_conferences​

fox_mbb_league_conferences(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk conference / group directory.

Wraps cbk/league/conferences.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
groupStringGroup identifier (e.g. conference 'group_id').
fox_idStringFox Sports conference id as a string, the trailing number of content_uri; ids are assigned per feed and usually differ between the men's and women's feeds (ACC 11 vs 12), though some coincide (America East is 9 in both), so never join the two feeds on it.
abbreviationStringShort abbreviation.
nameStringDisplay name.
content_uriStringFox Bifrost content URI identifying the conference (e.g. 'basketball/cbk/groups/11'); fox_id is its trailing number.
content_typeStringFox entity type from the conference's entity link; always 'league' in sampled data, even though each row is a conference.
web_urlStringSite-relative foxsports.com path of the conference page (e.g. '/college-basketball/acc').
colorStringPrimary color (hex without leading '#').
logo_urlStringNBA CDN primary logo URL.

Example

from sportsdataverse.mbb import fox_mbb_league_conferences
df = fox_mbb_league_conferences()

fox_mbb_league_header​

fox_mbb_league_header(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league header (one row).

Wraps cbk/league/header.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
templateStringFox layout template name for the header block; always 'entity-header' in sampled data.
titleStringTitle or label for the record.
entity_idStringFox id of the league entity as a string: the trailing number of the league's Fox contentUri.
content_uriStringFox Bifrost content URI of the league entity ('basketball/cbk/league/1' in sampled data).
content_typeStringFox entity type of the header's entity; 'league' in sampled data.
colorStringPrimary color (hex without leading '#').
logo_urlStringNBA CDN primary logo URL.
image_alt_textStringAlt text Fox attaches to the header image, which reads as the league's display name ('College Basketball' in sampled data).
rankStringRank.
detailsStringDetails.

Example

from sportsdataverse.mbb import fox_mbb_league_header
df = fox_mbb_league_header()

fox_mbb_league_leaders​

fox_mbb_league_leaders(category: 'str' = 'scoring', who: 'str' = 'player', page: 'int' = 0, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB statistical leaders (stats-con); who=player|team.

Parameters

ParameterTypeDefaultDescription
categorystr'scoring'Stat category. Defaults to "scoring".
whostr'player'"player" or "team". Defaults to "player".
pageint00-based result page. Defaults to 0.
return_parsedboolTrueIf True (default) flatten the leader tables to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
playersStringNested list of per-player box scores.
v1StringLeader's name as Fox abbreviates it, first initial plus surname (e.g. 'T. Moore'); the column is named v1 because its table header cell is blank.
gpStringGames played.
entity_idStringFox id of the row's linked player or team as a string: the trailing number of the row's entityLink contentUri.
gsStringGames started.
mpgStringMinutes per game.
ppgStringPoints per game.
ptsStringPoints scored.

Example

from sportsdataverse.mbb import fox_mbb_league_leaders
df = fox_mbb_league_leaders("scoring")

fox_mbb_league_odds​

fox_mbb_league_odds(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league odds board (one row per team per game).

Wraps cbk/league/odds.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_league_odds
df = fox_mbb_league_odds()

fox_mbb_league_player_news​

fox_mbb_league_player_news(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league-wide player news feed.

Wraps cbk/league/playernews.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_league_player_news
df = fox_mbb_league_player_news()

fox_mbb_league_polls​

fox_mbb_league_polls(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk rankings / polls rendered as standings tables.

Wraps cbk/league/polls.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
sectionStringRanking the row belongs to: 'ASSOCIATED PRESS', 'USA TODAY COACHES POLL' or 'RPI RANKINGS' (25 rows each in sampled data).
rankingStringTeam recruiting ranking.
v1StringUnlabeled second table column whose meaning depends on section: in the two polls it is Fox's rank-change cell, an unsigned number string (e.g. '5') that is null when no change is shown; on 'RPI RANKINGS' rows it holds the team name.
v2StringTeam name on poll rows, with first-place votes in parentheses when the team received any (e.g. 'Michigan (57)'); null on 'RPI RANKINGS' rows, where the name is in v1.
ptsStringPoints scored.
entity_idStringFox id of the row's linked team as a string: the trailing number of the row's entityLink contentUri.
rpiStringRPI value as a decimal string with a leading dot (e.g. '.6808'); populated only on 'RPI RANKINGS' rows and null on both poll sections.
sosStringStrength of schedule.
homeStringHome.
awayStringAway record.
neutralStringNeutral.
teamStringTeam-side label or team identifier.
rank_changeInt64

Example

from sportsdataverse.mbb import fox_mbb_league_polls
df = fox_mbb_league_polls()

fox_mbb_league_schedule​

fox_mbb_league_schedule(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league schedule nav selections.

Wraps cbk/league/schedule.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
selection_listStringWhich Fox navigation list the row came from: 'groupList' (group filters such as FEATURED, TOP 25 and each conference; uri is null) or 'dailyList' (one row per game date).
idStringId.
titleStringTitle or label for the record.
dateStringDate in YYYY-MM-DD format.
uriStringAbsolute api.foxsports.com Bifrost URL of that date's segment payload (.../league/schedule-segment/-YYYYMMDD?groupId=...); null on groupList rows.
web_urlStringSite-relative foxsports.com path of the page the selection opens (e.g. '/college-basketball/schedule?groupId=top25').
selectedBooleanFox's default-selection flag: True on the one group filter (a groupList row) Fox pre-selects, and null (never False) on every other row.
group_idStringESPN group id.

Example

from sportsdataverse.mbb import fox_mbb_league_schedule
df = fox_mbb_league_schedule()

fox_mbb_league_scores​

fox_mbb_league_scores(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league scores nav selections.

Wraps cbk/league/scores.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
selection_listStringWhich Fox navigation list the row came from: 'groupList' (group filters such as FEATURED, TOP 25 and each conference; uri is null) or 'dailyList' (one row per game date).
idStringId.
titleStringTitle or label for the record.
dateStringDate in YYYY-MM-DD format.
uriStringAbsolute api.foxsports.com Bifrost URL of that date's segment payload (.../league/scores-segment/YYYYMMDD?groupId=...); null on groupList rows.
web_urlStringSite-relative foxsports.com path of the page the selection opens (e.g. '/college-basketball/scores?groupId=top25').
selectedBooleanFox's default-selection flag: True on the one group filter (a groupList row) Fox pre-selects, and null (never False) on every other row.
group_idStringESPN group id.

Example

from sportsdataverse.mbb import fox_mbb_league_scores
df = fox_mbb_league_scores()

fox_mbb_league_standings​

fox_mbb_league_standings(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league-wide standings tables.

Wraps cbk/league/standings.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_league_standings
df = fox_mbb_league_standings()

fox_mbb_league_stat_leaders​

fox_mbb_league_stat_leaders(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk league stats landing leaders.

Wraps cbk/league/stats.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
categoryStringCategory label.
statStringStat.
stat_abbreviationStringFox's short code for the leader stat, such as 'PPG', 'RPG', '3FGM/G', 'TS%' or 'HIGH'; the spelled-out name is in stat.
playerStringPlayer name.
valueStringNumeric or string value field.

Example

from sportsdataverse.mbb import fox_mbb_league_stat_leaders
df = fox_mbb_league_stat_leaders()

fox_mbb_odds​

fox_mbb_odds(game_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB game odds six-pack (spread / to-win / total per team).

Parameters

ParameterTypeDefaultDescription
game_idUnion[int, str]Fox Bifrost event id.
return_parsedboolTrueIf True (default) flatten the six-pack market to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

No returns table is published for this function: no capture: for this sport Fox sends the odds under sectionList modules rather than the top-level sixPack key the shared parser reads (football and MLB still use sixPack), so it returns an empty frame for every game.

Example

from sportsdataverse.mbb import fox_mbb_odds
df = fox_mbb_odds("...")

fox_mbb_pbp​

fox_mbb_pbp(game_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB play-by-play (one row per play; period-based).

Parameters

ParameterTypeDefaultDescription
game_idUnion[int, str]Fox Bifrost event id.
return_parsedboolTrueIf True (default) flatten the pbp layout to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
game_idStringUnique game identifier.
periodStringPeriod of the game (1-4 quarters; 5+ for OT).
left_teamString
right_teamString
play_idStringUnique play identifier within a game.
clockStringGame clock value.
teamStringTeam-side label or team identifier.
left_score_changeBoolean
right_score_changeBoolean
play_textStringPlay description text.

Example

from sportsdataverse.mbb import fox_mbb_pbp
df = fox_mbb_pbp("...")

fox_mbb_scoreboard​

fox_mbb_scoreboard(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk scoreboard nav selections (weeks / dates / groups).

Wraps cbk/scoreboard/main.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
selection_listStringWhich Fox navigation list the row came from: 'groupList' (group filters such as FEATURED, TOP 25 and each conference; uri is null) or 'dailyList' (one row per game date).
idStringId.
titleStringTitle or label for the record.
dateStringDate in YYYY-MM-DD format.
uriStringAbsolute api.foxsports.com Bifrost URL of that date's segment payload (.../scoreboard/segment/YYYYMMDD?groupId=...); null on groupList rows.
web_urlStringSite-relative foxsports.com path of the page the selection opens (e.g. '/scores/college-basketball?groupId=top25').
selectedBooleanFox's default-selection flag: True on the one group filter (a groupList row) Fox pre-selects, and null (never False) on every other row.
group_idStringESPN group id.

Example

from sportsdataverse.mbb import fox_mbb_scoreboard
df = fox_mbb_scoreboard()

fox_mbb_scorechip​

fox_mbb_scorechip(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk compact live score chip (raw dict -- live-only, uncaptured shape).

Wraps cbk/scorechip/{chip_id}.

Returns

The raw JSON dict.

Example

from sportsdataverse.mbb import fox_mbb_scorechip
df = fox_mbb_scorechip("nfl12345")

fox_mbb_scores_segment​

fox_mbb_scores_segment(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk one row per game in a scoreboard segment.

Wraps cbk/league/scores-segment/{segment_id}.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_scores_segment
df = fox_mbb_scores_segment("...")

fox_mbb_standings​

fox_mbb_standings(team_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB standings for a team's conference/division.

Parameters

ParameterTypeDefaultDescription
team_idUnion[int, str]Fox Bifrost team id.
return_parsedboolTrueIf True (default) flatten the standings tables to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
team_idStringUnique team identifier.
sectionString
accString
v1String
confStringcharacter.
w_lStringW l.
top_25String
homeStringHome.
awayStringAway record.
pfStringPersonal fouls.
paString
strkStringCurrent streak.
entity_idStringComposite Yahoo id this editorial row was keyed under, surfaced from the collection map key (e.g., "ncaaf.g.202509200023" for a game, "ncaaf.t.29" for a team); always carried as Utf8.

Example

from sportsdataverse.mbb import fox_mbb_standings
df = fox_mbb_standings("...")

fox_mbb_team_gamelog​

fox_mbb_team_gamelog(team_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB team game log (long: one row per game-stat).

Parameters

ParameterTypeDefaultDescription
team_idUnion[int, str]Fox Bifrost team id.
return_parsedboolTrueIf True (default) flatten to long form; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
team_idStringUnique team identifier.
season_typeStringSeason type (1=pre-season, 2=regular season, 3=postseason, 4=off-season for ESPN; or string label for WNBA Stats).
categoryStringCategory label.
game_idStringUnique game identifier.
game_dateStringGame date (YYYY-MM-DD).
opponentStringOpponent.
statStringStat.
valueStringNumeric or string value field.

Example

from sportsdataverse.mbb import fox_mbb_team_gamelog
df = fox_mbb_team_gamelog("...")

fox_mbb_team_header​

fox_mbb_team_header(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk team header (one row).

Wraps cbk/team/{team_id}/header.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

Example

from sportsdataverse.mbb import fox_mbb_team_header
df = fox_mbb_team_header("...")

fox_mbb_team_roster​

fox_mbb_team_roster(team_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB team roster (one row per player).

Parameters

ParameterTypeDefaultDescription
team_idUnion[int, str]Fox Bifrost team id.
return_parsedboolTrueIf True (default) flatten the position-group tables to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
team_idStringUnique team identifier.
position_groupString
playerStringPlayer name.
posStringPosition.
clsString
htStringListed height.
wtStringListed weight (lbs).
athlete_idStringUnique athlete identifier (ESPN).

Example

from sportsdataverse.mbb import fox_mbb_team_roster
df = fox_mbb_team_roster("...")

fox_mbb_team_stats​

fox_mbb_team_stats(team_id: 'Union[int, str]', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB team stat leaders by category.

Parameters

ParameterTypeDefaultDescription
team_idUnion[int, str]Fox Bifrost team id.
return_parsedboolTrueIf True (default) flatten the leader sections to a DataFrame; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
team_idStringUnique team identifier.
categoryStringCategory label.
statStringStat.
stat_abbreviationString
playerStringPlayer name.
valueStringNumeric or string value field.

Example

from sportsdataverse.mbb import fox_mbb_team_stats
df = fox_mbb_team_stats("...")

fox_mbb_teamnav​

fox_mbb_teamnav(*args: 'Any', **kwargs: 'Any') -> 'Any'

Fox Sports cbk team directory (one row per team).

Wraps cbk/league/teamnav.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
groupStringGroup identifier (e.g. conference 'group_id').
fox_idStringFox Sports team id as a string, the trailing number of content_uri; ids are league-specific, so a school can have different ids in the men's and women's feeds.
abbreviationStringShort abbreviation.
nameStringDisplay name.
content_uriStringFox Bifrost content URI identifying the team, shaped 'basketball/cbk/teams/<fox_id>'.
content_typeStringFox entity type from the team's entity link; always 'team' in sampled data.
web_urlStringSite-relative foxsports.com path of the team page (e.g. '/college-basketball/michigan-wolverines-team').
colorStringPrimary color (hex without leading '#').
logo_urlStringNBA CDN primary logo URL.

Example

from sportsdataverse.mbb import fox_mbb_teamnav
df = fox_mbb_teamnav()

fox_mbb_teams​

fox_mbb_teams(team_id: 'Union[int, str]' = '150', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame', Dict[str, Any]]"

MBB team directory for one seed team's conference.

College basketball standings are per-conference, so one call returns only the seed team's league. Use fox_mbb_teams_all for the full directory the hoopR MBB team crosswalk consumes.

Parameters

ParameterTypeDefaultDescription
team_idUnion[int, str]'150'Seed Fox Bifrost team id whose standings page is read. Defaults to "150".
return_parsedboolTrueIf True (default) flatten the standings to the team directory; if False return the raw JSON dict.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars. Ignored when return_parsed=False.

Returns

A polars DataFrame (default), a pandas DataFrame when return_as_pandas=True, or the raw JSON dict when return_parsed=False.

col_nametypedescription
fox_team_idStringFox Bifrost team id (NA if unmatched).
fox_team_nameStringFox team name (NA if unmatched).
fox_sectionStringFox conference/section label (NA if unmatched).

Raises

ExceptionDescription
sportsdataverse.errors.NoDataErrorFox returned 404 for the requested id.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body).

Example

from sportsdataverse.mbb import fox_mbb_teams
df = fox_mbb_teams("150")

fox_mbb_teams_all​

fox_mbb_teams_all(max_id: 'int' = 500, max_calls: 'int' = 60, *, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> "Union[pl.DataFrame, 'pd.DataFrame']"

Full MBB team directory by walking seed ids across conferences.

A single fox_mbb_teams call only returns the seed team's conference, so this walks candidate team ids (skipping ids already seen in an earlier conference) and unions the results, spending at most max_calls standings fetches. Mirrors fox_wbb_teams_all.

Parameters

ParameterTypeDefaultDescription
max_idint500Highest candidate team id to try. Defaults to 500.
max_callsint60Budget of standings fetches. Defaults to 60. Warns when the budget runs out while the last fetch that answered (not a 404) was still finding new teams.
return_as_pandasboolFalseIf True return a pandas DataFrame; otherwise polars.

Returns

A polars DataFrame (default) or pandas DataFrame, one row per team: fox_team_id / fox_team_name / fox_section.

col_nametypedescription
fox_team_idStringFox Bifrost team id (NA if unmatched).
fox_team_nameStringFox team name (NA if unmatched).
fox_sectionStringFox conference/section label (NA if unmatched).

Raises

ExceptionDescription
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, or an empty or unreadable 200 body). A 404 on an individual candidate id (NoDataError) is expected during the scan and is skipped; every other failure propagates rather than silently truncating the directory.

Example

from sportsdataverse.mbb import fox_mbb_teams_all
df = fox_mbb_teams_all()

# Pipeline next step (one line)

df.group_by("fox_section").len().sort("len", descending=True).head()