Skip to contents

Get the featured-market odds for a sport which The Odds API covers.

Returns a list of upcoming and live games with featured bookmaker odds for the specified markets and regions. For player props and other additional markets, use toa_event_odds() instead.

Usage quota cost: [number of markets] x [number of regions].

Usage

toa_sports_odds(
  sport_key,
  regions = "us",
  markets = "spreads",
  odds_format = "decimal",
  date_format = "iso"
)

Arguments

sport_key

(string, required): The sport_key to look up odds for. See toa_sports() for a full lookup of sport_key values.

regions

(string, required): The region(s) to pull bookmakers from. Multiple can be specified if comma delimited. Options include:

  • us

  • us2

  • uk

  • eu

  • au

markets

(string, optional): The featured markets to return. Multiple can be specified if comma delimited. Options include:

  • h2h (moneyline)

  • spreads (points handicaps)

  • totals (over/under)

  • outrights (futures, select sports only)

odds_format

(string, optional): Format in which to return odds. Options are decimal (default) or american.

date_format

(string, optional): Format of returned timestamps. Options are iso (default) or unix.

Value

A long-format tibble with one row per bookmaker market outcome:

col_nametypesdescription
idcharacterUnique event id.
sport_keycharacterSport key, e.g. basketball_nba.
sport_titlecharacterHuman-readable sport title, e.g. NBA.
commence_timecharacterGame start time (ISO 8601 string or unix seconds).
home_teamcharacterHome team name.
away_teamcharacterAway team name.
bookmaker_keycharacterBookmaker slug, e.g. draftkings.
bookmakercharacterBookmaker display title, e.g. DraftKings.
bookmaker_last_updatecharacterWhen this bookmaker's odds were last updated.
market_keycharacterMarket key, e.g. spreads.
market_last_updatecharacterWhen this market's odds were last updated.
outcomes_namecharacterOutcome label (team name, Over/Under, etc.).
outcomes_pricenumericThe price/odds for the outcome.
outcomes_pointnumericThe handicap/total line, when applicable.

See also

toa_event_odds() for a single event's odds (including player props and alternate lines), toa_event_markets() to list a game's available market keys, and toa_sports() to find sport_key values. Part of the SportsDataverse.

Other The Odds API: Odds & Markets: toa_event_markets(), toa_event_odds()

Examples

# \donttest{
   try(toa_sports_odds(sport_key = 'basketball_nba',
                       regions = 'us',
                       markets = 'spreads',
                       odds_format = 'decimal',
                       date_format = 'iso'))
#>  2026-06-24 03:15:41.64634: Invalid arguments or no odds data available for basketball_nba!
#>  Error:
#> Error in UseMethod("unnest"): no applicable method for 'unnest' applied to an object of class "list"
#> data frame with 0 columns and 0 rows
# }