Skip to main content

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 }:

NamespaceProviderNotes
sdv.oddsThe Odds APIneeds your API key (api_key)
sdv.cbsCBS Sports NAPIpublic, anonymous; league/team ids are slugs
sdv.foxFox Sports Bifrostpublic apikey defaults out of the box
sdv.yahooYahoo shangrila / editorialpass a league slug
sdv.recruiting247Sportsrecruiting 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);

Open in playground โ–ถ

Live and inline โ€” paste a real key into the api_key field first (calls without one return 401):

Loading live cellโ€ฆ
note

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):

Loading live cellโ€ฆ

Open in playground โ–ถ

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, โ€ฆ):

Loading live cellโ€ฆ

Open in playground โ–ถ

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:

Loading live cellโ€ฆ

Open in playground โ–ถ

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);
Loading live cellโ€ฆ

Open in playground โ–ถ

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);
note

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.

tip

Per-provider method tables: odds, cbs, fox, yahoo, 247 / recruiting.