College basketball recipes (MBB & WBB)
College basketball spans two namespaces that share an identical ESPN surface:
- Men's —
sdv.mbb, methods namedespnMbb* - Women's —
sdv.wbb, methods namedespnWbb*
Both carry the universal cross-league endpoints plus the NCAA extras
(rankings, recruiting), so every recipe below works on either side by swapping
the namespace. Pass { parsed: true } for tidy rows, or omit it for the raw
ESPN payload.
Scoreboard​
Raw first, then tidied to one row per game:
import sdv from 'sportsdataverse';
const raw = await sdv.mbb.espnMbbScoreboard({});
const games = await sdv.mbb.espnMbbScoreboard({ parsed: true });
console.table(games);
Live and inline (men's). Swap league="wbb" for the women's board:
Rankings (AP Top 25 & Coaches)​
rankings is an NCAA extra — available on both mbb and wbb.
import sdv from 'sportsdataverse';
const men = await sdv.mbb.espnMbbRankings({ parsed: true });
const women = await sdv.wbb.espnWbbRankings({ parsed: true });
console.table(men);
console.table(women);
The men's AP Top 25, live and inline (swap league="wbb" for the women's poll):
Open men's in playground ▶ · Open women's in playground ▶
Every team, then a roster​
espnMbbTeamsSite lists the teams (grab an id); espnMbbTeamRoster returns
one row per player. The women's side is identical under sdv.wbb.
import sdv from 'sportsdataverse';
const teams = await sdv.mbb.espnMbbTeamsSite({ parsed: true });
console.table(teams);
// team_id 150 is Duke
const roster = await sdv.mbb.espnMbbTeamRoster({ team_id: 150, parsed: true });
console.table(roster);
Women's scoreboard (same surface, different namespace)​
import sdv from 'sportsdataverse';
const games = await sdv.wbb.espnWbbScoreboard({ parsed: true });
console.table(games);
BartTorvik (T-Rank) — advanced analytics​
Beyond ESPN, BartTorvik (T-Rank) is a public men's
college-basketball analytics source on its own sdv.torvik namespace (it nests
under Basketball in the sidebar). It's keyless — a browser User-Agent is
set for you — and every endpoint takes a year, the 4-digit season ending
year (2024 = the 2023–24 season).
Team ratings (T-Rank)​
import sdv from 'sportsdataverse';
const ratings = await sdv.torvik.torvik_ratings({ year: 2024, parsed: true });
console.table(ratings);
Live and inline:
Four factors​
import sdv from 'sportsdataverse';
const factors = await sdv.torvik.torvik_team_factors({ year: 2024, parsed: true });
console.table(factors);
Game-by-game results​
torvik_game_stats returns one row per game; torvik_player_stats and
torvik_game_schedule round out the surface.
import sdv from 'sportsdataverse';
const games = await sdv.torvik.torvik_game_stats({ year: 2024, parsed: true });
console.table(games);
Full method + column tables: MBB reference, WBB reference, and BartTorvik reference.