
Find odds for a single event, including player props and other markets
Source:R/toa_event_odds.R
toa_event_odds.RdGet bookmaker odds for a single event from The Odds API.
Unlike toa_sports_odds() (featured markets only), this endpoint accepts any
available market key, including player props and alternate lines. Look up an
event_id with toa_sports_events().
Usage quota cost: [number of unique markets returned] x [number of regions].
Usage
toa_event_odds(
sport_key,
event_id,
regions = "us",
markets = "spreads",
odds_format = "decimal",
date_format = "iso",
bookmakers = NULL
)Arguments
- sport_key
(string, required): The
sport_keyto look up odds for. Seetoa_sports()for a full lookup ofsport_keyvalues.- event_id
(string, required): The
event_idto look up odds for. Seetoa_sports_events()for a full lookup ofevent_idvalues.- regions
(string, required): The region(s) to pull bookmakers from. Multiple can be specified if comma delimited. Options include:
usus2ukeuau
- markets
(string, optional): The markets to return. Multiple can be specified if comma delimited. In addition to
h2h,spreads,totalsandoutrights, this endpoint accepts additional markets such as alternate lines and player props (e.g.player_points,player_pass_tds,player_shots_on_goal). See the betting markets documentation for the full list.- odds_format
(string, optional): Format in which to return odds. Options are
decimal(default) oramerican.- date_format
(string, optional): Format of returned timestamps. Options are
iso(default) orunix.- bookmakers
(string, optional): Comma-separated list of bookmakers to be returned. If both
bookmakersandregionsare specified,bookmakerstakes precedence. Bookmakers can be from any region. Every group of 10 bookmakers counts as 1 region against the usage quota.
Value
A long-format tibble with one row per bookmaker market outcome:
| col_name | types | description |
| id | character | Unique event id (echoes event_id). |
| sport_key | character | Sport key, e.g. basketball_nba. |
| sport_title | character | Human-readable sport title, e.g. NBA. |
| commence_time | character | Game start time (ISO 8601 string or unix seconds). |
| home_team | character | Home team name. |
| away_team | character | Away team name. |
| bookmaker_key | character | Bookmaker slug, e.g. draftkings. |
| bookmaker | character | Bookmaker display title, e.g. DraftKings. |
| market_key | character | Market key, e.g. player_points. |
| market_last_update | character | When this market's odds were last updated. |
| outcomes_name | character | Outcome label (team, Over/Under, player name, etc.). |
| outcomes_description | character | Outcome description (player name for props); absent for featured markets. |
| outcomes_price | numeric | The price/odds for the outcome. |
| outcomes_point | numeric | The handicap/total/prop line, when applicable. |
If the event exists but no bookmaker odds are posted yet for the requested markets/regions, a zero-row tibble with the same columns is returned.
See also
toa_sports_odds() for featured-market odds across all upcoming
events, toa_event_markets() to discover available market keys for an
event, and toa_sports_events() to look up event_id values. Part of
the SportsDataverse.
Other The Odds API: Odds & Markets:
toa_event_markets(),
toa_sports_odds()
Examples
# \donttest{
try(toa_event_odds(sport_key = 'basketball_nba',
event_id = '48db9c3293a52baab881d95d38f37a98',
regions = 'us',
markets = 'player_points',
odds_format = 'decimal',
date_format = 'iso'))
#> ℹ 2026-08-24 08:27:39.575169: Event 48db9c3293a52baab881d95d38f37a98 found, but no bookmaker odds are available yet for markets 'player_points' in regions 'us'.
#> ── Event Odds data from the-odds-api.com ───────────── oddsapiR 1.0.0 ──
#> ℹ Data updated: 2026-08-24 08:27:39 UTC
#> ℹ Odds API quota: 10513 used, 4989487 remaining (last call cost 0)
#> # A tibble: 0 × 14
#> # ℹ 14 variables: id <chr>, sport_key <chr>, sport_title <chr>,
#> # commence_time <chr>, home_team <chr>, away_team <chr>,
#> # bookmaker_key <chr>, bookmaker <chr>, market_key <chr>,
#> # market_last_update <chr>, outcomes_name <chr>,
#> # outcomes_description <chr>, outcomes_price <dbl>,
#> # outcomes_point <dbl>
# }