Skip to main content

odds — native provider reference

  • namespace: sdv.odds (standalone — not an ESPN league)
  • families: The Odds API
  • wrappers: 10 native

odds is a cross-sport provider namespace (no ESPN {sport}/{league} nesting). Every method is exposed under BOTH its snake_case name (<family>_<endpoint>, py/R parity) and a camelCase canonical name (<family><Endpoint>) on sdv.odds. Pass { parsed: true } to any endpoint to get tidy rows instead of raw JSON.

import sdv from 'sportsdataverse';

// The Odds API uses a plain `apiKey` query param (you supply it):
await sdv.odds.oddsApiSports({ api_key: process.env.ODDS_API_KEY });

Native API — The Odds API

Flat (non-ESPN) wrappers for the-odds-api.com. Host: https://api.the-odds-api.com. Each method is exposed under BOTH odds_api_<endpoint> (snake_case, py/R parity) and oddsApi<Endpoint> (camelCase canonical) on sdv.odds. Pass { parsed: true } to run the payload through its tidy.js parser; omit it for the raw response.

MethodHTTPPath paramsQuery paramsParserAuth
odds_api_event_markets / oddsApiEventMarketshttps://api.the-odds-api.com/v4/sports/{sport_key}/events/{event_id}/marketssport_key*, event_id*api_keyapiKey, regions, bookmakers, date_formatdateFormatparse_odds_api_event_markets
odds_api_event_odds / oddsApiEventOddshttps://api.the-odds-api.com/v4/sports/{sport_key}/events/{event_id}/oddssport_key*, event_id*api_keyapiKey, regions, markets, odds_formatoddsFormat, date_formatdateFormat, bookmakersparse_odds_api_event_odds
odds_api_event_odds_history / oddsApiEventOddsHistoryhttps://api.the-odds-api.com/v4/historical/sports/{sport_key}/events/{event_id}/oddssport_key*, event_id*api_keyapiKey, date, regions, markets, odds_formatoddsFormat, date_formatdateFormat, bookmakersparse_odds_api_event_odds_history
odds_api_sports / oddsApiSportshttps://api.the-odds-api.com/v4/sportsapi_keyapiKey, allparse_odds_api_sports
odds_api_sports_events / oddsApiSportsEventshttps://api.the-odds-api.com/v4/sports/{sport_key}/eventssport_key*api_keyapiKey, date_formatdateFormat, event_idseventIds, commence_time_fromcommenceTimeFrom, commence_time_tocommenceTimeToparse_odds_api_sports_events
odds_api_sports_events_history / oddsApiSportsEventsHistoryhttps://api.the-odds-api.com/v4/historical/sports/{sport_key}/eventssport_key*api_keyapiKey, date, date_formatdateFormat, event_idseventIds, commence_time_fromcommenceTimeFrom, commence_time_tocommenceTimeToparse_odds_api_sports_events_history
odds_api_sports_odds / oddsApiSportsOddshttps://api.the-odds-api.com/v4/sports/{sport_key}/oddssport_key*api_keyapiKey, regions, markets, odds_formatoddsFormat, date_formatdateFormat, event_idseventIds, bookmakers, commence_time_fromcommenceTimeFrom, commence_time_tocommenceTimeToparse_odds_api_sports_odds
odds_api_sports_odds_history / oddsApiSportsOddsHistoryhttps://api.the-odds-api.com/v4/historical/sports/{sport_key}/oddssport_key*api_keyapiKey, date, regions, markets, odds_formatoddsFormat, date_formatdateFormat, event_idseventIds, bookmakersparse_odds_api_sports_odds_history
odds_api_sports_participants / oddsApiSportsParticipantshttps://api.the-odds-api.com/v4/sports/{sport_key}/participantssport_key*api_keyapiKeyparse_odds_api_sports_participants
odds_api_sports_scores / oddsApiSportsScoreshttps://api.the-odds-api.com/v4/sports/{sport_key}/scoressport_key*api_keyapiKey, days_fromdaysFrom, date_formatdateFormat, event_idseventIdsparse_odds_api_sports_scores

Returns — odds_api_event_markets / oddsApiEventMarkets

col_nametypedescription
idcharacterA unique 32 character identifier for the event (echoes event_id).
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
bookmaker_keycharacterA unique slug (key) of the bookmaker, e.g. draftkings.
bookmakercharacterA formatted title of the bookmaker, e.g. DraftKings.
market_keycharacterThe unique key for an available odds market offered by the bookmaker, e.g. player_points.
market_last_updatecharacterA timestamp of when the market's odds were last read. Will be an integer if dateFormat=unix, otherwise a string.

Returns — odds_api_event_odds / oddsApiEventOdds

col_nametypedescription
idcharacterA unique 32 character identifier for the event (echoes event_id).
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
bookmaker_keycharacterA unique slug (key) of the bookmaker, e.g. draftkings.
bookmakercharacterA formatted title of the bookmaker, e.g. DraftKings.
market_keycharacterThe unique key for the odds market, e.g. player_points.
market_last_updatecharacterA timestamp of when the market's odds were last read. Will be an integer if dateFormat=unix, otherwise a string.
outcomes_namecharacterThe outcome label. The value depends on the market -- for totals markets Over/Under, for team markets the team or participant name, or Draw.
outcomes_descriptioncharacterAdditional information about the outcome, only relevant for certain markets (for example, the player's name for player prop markets). Absent for featured markets.
outcomes_pricenumericThe odds of the outcome. The format is determined by the oddsFormat query param (decimal by default).
outcomes_pointnumericThe handicap or points of the outcome, only applicable to spreads/totals/prop markets (missing for h2h and outrights markets).

Returns — odds_api_event_odds_history / oddsApiEventOddsHistory

col_nametypedescription
timestampcharacterThe timestamp of the snapshot. This will be the closest available timestamp equal to or earlier than the provided date parameter.
previous_timestampcharacterThe preceding available timestamp. Use as the date parameter in a new request to move back in time.
next_timestampcharacterThe next available timestamp. Use as the date parameter in a new request to move forward in time.
idcharacterA unique 32 character identifier for the event (echoes event_id).
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
bookmaker_keycharacterA unique slug (key) of the bookmaker, e.g. draftkings.
bookmakercharacterA formatted title of the bookmaker, e.g. DraftKings.
bookmaker_last_updatecharacterA timestamp of when the bookmaker's odds were last read. Will be an integer if dateFormat=unix, otherwise a string.
market_keycharacterThe unique key for the odds market, e.g. player_points.
market_last_updatecharacterA timestamp of when the market's odds were last read. Will be an integer if dateFormat=unix, otherwise a string. Prefer this over bookmaker_last_update to check the recency of odds.
outcomes_namecharacterThe outcome label. The value depends on the market -- for totals markets Over/Under, for team markets the team or participant name, or Draw.
outcomes_descriptioncharacterAdditional information about the outcome, only relevant for certain markets (for example, the player's name for player prop markets). Absent for featured markets.
outcomes_pricenumericThe odds of the outcome. The format is determined by the oddsFormat query param (decimal by default).
outcomes_pointnumericThe handicap or points of the outcome, only applicable to spreads/totals/prop markets (missing for h2h and outrights markets).

Returns — odds_api_sports / oddsApiSports

col_nametypedescription
keycharacterA unique slug (key) of the sport, e.g. americanfootball_nfl. Use this as the sport_key param in odds/events requests.
groupcharacterA broader grouping for the sport, e.g. American Football.
titlecharacterA presentable title of the sport, e.g. NFL.
descriptioncharacterA brief description of the sport. Subject to change (for example, if sponsors change).
activelogicalIndicates if the sport is in season. TRUE when the sport is currently in season.
has_outrightslogicalIndicates if the sport has outrights (futures) markets. TRUE when outright markets are offered.

Returns — odds_api_sports_events / oddsApiSportsEvents

col_nametypedescription
idcharacterA unique 32 character identifier for the event. Use as event_id elsewhere.
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
home_rotationintegerThe rotation number of the home team. Only returned when include_rotation_numbers = TRUE; can be null. Available in historical data from November 2025.
away_rotationintegerThe rotation number of the away team. Only returned when include_rotation_numbers = TRUE; can be null. Available in historical data from November 2025.

Returns — odds_api_sports_events_history / oddsApiSportsEventsHistory

col_nametypedescription
timestampcharacterThe timestamp of the snapshot. This will be the closest available timestamp equal to or earlier than the provided date parameter.
previous_timestampcharacterThe preceding available timestamp. Use as the date parameter in a new request to move back in time.
next_timestampcharacterThe next available timestamp. Use as the date parameter in a new request to move forward in time.
idcharacterA unique 32 character identifier for the event. Use as event_id elsewhere.
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
home_rotationintegerThe rotation number of the home team. Only returned when include_rotation_numbers = TRUE; can be null. Available in historical data from November 2025.
away_rotationintegerThe rotation number of the away team. Only returned when include_rotation_numbers = TRUE; can be null. Available in historical data from November 2025.

Returns — odds_api_sports_odds / oddsApiSportsOdds

col_nametypedescription
idcharacterA unique 32 character identifier for the event.
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
bookmaker_keycharacterA unique slug (key) of the bookmaker, e.g. draftkings.
bookmakercharacterA formatted title of the bookmaker, e.g. DraftKings.
bookmaker_last_updatecharacterA timestamp of when the bookmaker's odds were last read. Will be an integer if dateFormat=unix, otherwise a string.
market_keycharacterThe unique key for the odds market, e.g. spreads.
market_last_updatecharacterA timestamp of when the market's odds were last read. Will be an integer if dateFormat=unix, otherwise a string. Prefer this over bookmaker_last_update to check the recency of odds.
outcomes_namecharacterThe outcome label. The value depends on the market -- for totals markets Over/Under, for team markets the team or participant name, or Draw.
outcomes_pricenumericThe odds of the outcome. The format is determined by the oddsFormat query param (decimal by default).
outcomes_pointnumericThe handicap or points of the outcome, only applicable to spreads and totals markets (missing for h2h and outrights markets).

Returns — odds_api_sports_odds_history / oddsApiSportsOddsHistory

col_nametypedescription
timestampcharacterThe timestamp of the snapshot. This will be the closest available timestamp equal to or earlier than the provided date parameter.
previous_timestampcharacterThe preceding available timestamp. Use as the date parameter in a new request to move back in time.
next_timestampcharacterThe next available timestamp. Use as the date parameter in a new request to move forward in time.
idcharacterA unique 32 character identifier for the event.
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
bookmaker_keycharacterA unique slug (key) of the bookmaker, e.g. draftkings.
bookmakercharacterA formatted title of the bookmaker, e.g. DraftKings.
bookmaker_last_updatecharacterA timestamp of when the bookmaker's odds were last read. Will be an integer if dateFormat=unix, otherwise a string.
market_keycharacterThe unique key for the odds market, e.g. spreads.
market_last_updatecharacterA timestamp of when the market's odds were last read. Will be an integer if dateFormat=unix, otherwise a string. Prefer this over bookmaker_last_update to check the recency of odds.
outcomes_namecharacterThe outcome label. The value depends on the market -- for totals markets Over/Under, for team markets the team or participant name, or Draw.
outcomes_pricenumericThe odds of the outcome. The format is determined by the oddsFormat query param (decimal by default).
outcomes_pointnumericThe handicap or points of the outcome, only applicable to spreads and totals markets (missing for h2h and outrights markets).

Returns — odds_api_sports_participants / oddsApiSportsParticipants

col_nametypedescription
idcharacterA unique id of the participant, e.g. par_01hqmkq6fdf1pvq7jgdd7hdmpf.
full_namecharacterThe participant name -- either a team name or player name depending on the sport. This endpoint does not return players on a team.

Returns — odds_api_sports_scores / oddsApiSportsScores

col_nametypedescription
idcharacterA unique 32 character identifier for the event.
sport_keycharacterA unique slug for the sport, e.g. basketball_nba. Use this as the sport param in /odds requests.
sport_titlecharacterA presentable title of the sport, e.g. NBA. Occasionally this value can change (for example, if a league undergoes a name change or change in sponsorship).
commence_timecharacterThe match start time (ISO 8601 formatted). Will be a unix timestamp integer if the dateFormat query param is set to unix.
completedlogicalTRUE if the event has finished, otherwise FALSE.
home_teamcharacterThe home team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
away_teamcharacterThe away team. If home/away is not applicable for the sport (such as MMA and Tennis), it will be one of the participants. Null for outrights (futures) events.
scoreslistA list of teams and their scores (per-team name/score pairs, stringified). Empty / NULL/NA if the event has not started.
last_updatecharacterISO 8601 datetime of when the scores were last updated. NA/null until the event has started.