Client for the 'Odds-API.io' Sports Betting Odds API

Query live and upcoming sports betting odds from the 'Odds-API.io' REST API < https://docs.odds-api.io>. Covers sports, bookmakers, leagues, events, per-event odds, value bets and arbitrage bets across 265+ bookmakers, returned as tidy data frames. An API key is required; a free tier is available.


oddsapiio

CRAN status License: MIT

Official R client for Odds-API.io, a real-time sports betting odds API covering 265+ bookmakers across 10+ sports. Full API documentation lives at docs.odds-api.io.

The free tier includes 100 requests/hour, no credit card required.

Installation

Once on CRAN:

install.packages("oddsapiio")

Development version from GitHub:

# install.packages("remotes")
remotes::install_github("odds-api-io/odds-api-r")

Authentication

Sign up at odds-api.io to get a free API key, then set it as an environment variable (for example in .Renviron):

Sys.setenv(ODDS_API_KEY = "your-key")

Every function also accepts an explicit api_key argument.

Quick start

library(oddsapiio)

# Sports and bookmakers (no API key needed)
oa_sports()
#>         name       slug
#> 1   Football   football
#> 2 Basketball basketball
#> 3     Tennis     tennis
#> ...

# Leagues for a sport
oa_leagues("football")
#>                       name                   slug eventsCount
#> 1 England - Premier League england-premier-league          32
#> 2          Spain - La Liga          spain-la-liga          28
#> ...

# Upcoming events
events <- oa_events("football", league = "england-premier-league")
head(events[, c("id", "home", "away", "date", "status")])
#>       id              home      away                 date  status
#> 1 123456 Manchester United Liverpool 2026-08-15T15:00:00Z pending
#> ...

# Odds for one event, tidy: one row per price line
odds <- oa_odds(events$id[1], bookmakers = c("Bet365", "SingBet"))
subset(odds, market == "ML")
#>   eventId bookmaker market            updatedAt home draw away
#> 1  123456    Bet365     ML 2026-08-14T10:30:00Z 2.10 3.40 3.20

# Value bets and arbitrage opportunities
oa_value_bets("Bet365", include_event_details = TRUE)
oa_arbitrage_bets(c("Bet365", "SingBet"))

Functions

Function Endpoint
oa_sports() GET /v3/sports
oa_bookmakers() GET /v3/bookmakers
oa_leagues(sport) GET /v3/leagues
oa_events(sport, ...) GET /v3/events
oa_odds(event_id, bookmakers) GET /v3/odds
oa_value_bets(bookmaker, ...) GET /v3/value-bets
oa_arbitrage_bets(bookmakers, ...) GET /v3/arbitrage-bets

Links

License

MIT

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("oddsapiio")

0.1.1 by Markus Bjermeland, 2 months ago


https://odds-api.io, https://github.com/odds-api-io/odds-api-r


Report a bug at https://github.com/odds-api-io/odds-api-r/issues


Browse source code at https://github.com/cran/oddsapiio


Authors: Markus Bjermeland [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports httr2, jsonlite

Suggests testthat


See at CRAN