Skip to contents

Get game betting lines from the CollegeBasketballData API.

Usage

cbbd_lines(
  season = most_recent_mbb_season(),
  team = NULL,
  conference = NULL,
  start_date_range = NULL,
  end_date_range = NULL
)

Arguments

season

(integer optional): Season, 4-digit ending-year (e.g. 2024). Defaults to most_recent_mbb_season().

team

(character optional): Team name filter.

conference

(character optional): Conference abbreviation filter.

start_date_range

(character optional): ISO 8601 start of date range.

end_date_range

(character optional): ISO 8601 end of date range.

Value

A hoopR_data tibble with one row per game. The lines column is a nested list of per-provider lines:

col_nametypesdescription
game_idintegerCollegeBasketballData game id.
seasonintegerSeason (4-digit ending-year).
season_typecharacterSeason type.
start_datecharacterGame start date (ISO 8601).
home_team_idintegerHome team id.
home_teamcharacterHome team name.
home_conferencecharacterHome team conference.
home_scorenumericHome team final score.
away_team_idintegerAway team id.
away_teamcharacterAway team name.
away_conferencecharacterAway team conference.
away_scorenumericAway team final score.
lineslistNested list of per-provider betting lines.

See also

Other CBD Lines Functions: cbbd_lines_providers()

Examples

# \donttest{
  try(cbbd_lines(season = 2024, team = "Duke"))
#>  2026-06-09 22:48:21.114423: Invalid arguments or no betting lines available!
#>  Args: season = 2024, team = "Duke", conference = NULL, start_date_range = NULL, end_date_range = NULL
#>  Error: api.collegebasketballdata.com requires an API key.        See ?register_cbbd for details.
#> data frame with 0 columns and 0 rows
# }