Provider recipes
Beyond ESPN, sportsdataverse wraps five standalone provider families. Each is
its own top-level namespace (no {sport}/{league} nesting) and every method
honors { parsed: true }:
| Namespace | Provider | Notes |
|---|---|---|
sdv.odds | The Odds API | needs your API key (api_key) |
sdv.cbs | CBS Sports NAPI | public, anonymous; league/team ids are slugs |
sdv.fox | Fox Sports Bifrost | public apikey defaults out of the box |
sdv.yahoo | Yahoo shangrila / editorial | pass a league slug |
sdv.recruiting | 247Sports | recruiting rankings, transfers |
Odds โ The Odds APIโ
The Odds API requires a key (free tier at the-odds-api.com). Supply it via
api_key. The sports endpoint lists every league it covers:
import sdv from 'sportsdataverse';
const sports = await sdv.odds.oddsApiSports({
api_key: process.env.ODDS_API_KEY,
parsed: true,
});
console.table(sports);
Live and inline โ paste a real key into the api_key field first (calls without
one return 401):
In the playground and the cell above, replace the empty api_key field with a
real key โ calls without one return a 401.
CBS โ league metadataโ
CBS league ids are slugs like football-nfl, basketball-nba, baseball-mlb.
import sdv from 'sportsdataverse';
const league = await sdv.cbs.cbsLeague({ league_id: 'football-nfl', parsed: true });
console.table(league);
Live and inline โ the league_id is a CBS slug (football-nfl,
basketball-nba, baseball-mlb):
Fox โ Bifrost scoreboardโ
The public apikey + api-version pair default automatically โ just pass a
sport (cfb, nfl, mlb, nba, โฆ).
import sdv from 'sportsdataverse';
const board = await sdv.fox.foxScoreboard({ sport: 'cfb', parsed: true });
console.table(board);
Live and inline โ the public apikey defaults out of the box; just pick a
sport (cfb, nfl, mlb, nba, โฆ):
Yahoo โ league standingsโ
Yahoo's shangrila stats-graph. Pass a league slug (ncaaf, nfl, nba, โฆ).
Some Yahoo hosts want an Origin/Referer โ pass them via headers if a call
is rejected.
import sdv from 'sportsdataverse';
const standings = await sdv.yahoo.yahooLeagueStandings({
league: 'ncaaf',
parsed: true,
});
console.table(standings);
Live and inline โ lang/region/tz default automatically; pass a league
slug. If a Yahoo host rejects the call, add an Origin/Referer via headers:
247Sports โ recruiting rankingsโ
Scope with year + sport_key (football, basketball).
import sdv from 'sportsdataverse';
const rankings = await sdv.recruiting.recruitingRankings({
year: 2025,
sport_key: 'football',
parsed: true,
});
console.table(rankings);
Run it liveโ
This cell pulls the current CFB scoreboard from Fox's public Bifrost API:
const sdv = (await import('sportsdataverse')).default;
const board = await sdv.fox.foxScoreboard({ sport: 'cfb', parsed: true });
board.slice(0, 5);
RunKit cells run the published npm package (sportsdataverse@^3). The v3
provider namespaces (sdv.odds, sdv.fox, โฆ) activate once v3 is on npm; until
then the embed may load v2. Copy any snippet into Node to run it locally.
Per-provider method tables: odds, cbs, fox, yahoo, 247 / recruiting.