The Odds API provides real time sports betting data including money lines, player props, point spreads, over/under and a variety of other live odds information. The information is constantly updating and pulls info from a variety of different sports book including: Fan duel, Draft Kings, Bet MGM, Caesars, The Score, Fanatics and more. The API has data from U.S. sports books as well as European sports books, which is beneficial for providing data on sports like Tennis, Soccer and more. The API also provides odds data in multiple different forms including American, Decimal, and Fractional. This makes it easy to perform calculations with the data, as the user can easily select whichever option they prefer. This API is also good for R, as the data is returned in a JSON format, which is easy to use in R with the jsonlite package.
Uses
One of the main uses of the Odds API is to set up a system that detects arbitrages between sports books. These can be found prior to games as well as during games.
Another use for the Odds API is creating live trackers for different sports games to see the probabilities and odds of different outcomes throughout the game and what impacts them.
The API can also be used to find ‘value’, and find bets where a sports book may be underestimating a certain outcome occurring.
Levels
The Odds API offers 5 different service levels, with four of them being paid and one being free. The free version allows the user to get their own API key, and allots them 500 credits for a month. A credit is used when data/information is pulled from the API and accessed through R. Besides additional credits, some levels of the paid version also offer historical odds, which can also be very helpful for users that are performing deeper analysis. Although the paid version would be an important upgrade for a user that is looking to consistently use the API’s data for making bets, the free version will be just fine for the tutorial we are going through here.
Select the Start button under the “Starter Free” section
Enter your first name and email address
After you have entered your info, your personal API key will be sent to your inbox. Once you have it you can copy and paste it, and it will be used later in this tutorial.
API Demonstration All the steps to utilize the API and retrieve the data are in the R script, we will now upload the csv file we created in the R script.
The data above is the data we collected through the API. It shows an MLB game, the teams playing in it, the sports book it is on, and the moneyline for each team on each sports book. THis is just a small example of the many uses this API has.