How-to use the predictions API
We have discussed how our prediction API works in-depth in our tutorial. In this how-to guide, we’ll show you how to implement the predictions of the Champions League group stage. Our prediction API is based on the latest machine learning techniques, which will give you the best predictions possible.
We’ll only be discussing probabilities per match. For the value bet and player contribution models, you can refer to our prediction tutorial.
Step 1: Make our request
First some general information about the Champions League:
League id: 2
Current season id: 17299
Current stage (Group stage) id: 77448760
Current round id: 211704
At the time of writing, the Champions League is in its third round of the group stages. The dates are from 2020-11-03 to 2020-11-04
We use the following URL:
This URL requests all the Champion League matches of the third round of the group stages. Now that you have an overview of all the Champion League fixture ids, we can start implementing our Prediction API.
Remember the two endpoints?
See our tutorial again for a refresher, in case you forgot.
You have multiple options. Including the options to either use the probabilities by fixture id endpoint or to use the fixtures between dates endpoint with probability
as include.
We’ll analyze the following match between Real Madrid and Inter with fixture id #17361029.
Step 2: The API response
Summary of the data:
BTTS (Both teams to score) = 63.01% Over 2,5 goals scored = 61.67% Under 3,5 goals scored = 60.14% Home team (Real Madrid) over 0,5 goals scored = 82,13% Away team (Inter) over 0,5 goals scored = 76.82% Real Madrid win probability = 43.90% Inter win probability = 32.80% Draw probability = 23.29% A final score of 1-1 has the highest probability = 10.42% If you used the probabilities by fixture id endpoint, you will have to repeat this step for all the other Champion League matches.
But, if you used the probability
include on one of our fixtures or livescores endpoints, you won’t have to.
Predictions are updated multiple times a day. Take this into account when you start implementing.
Step 3: Example Page
Need some inspiration? The website below shows how you can display the various market predictions for one specific match.
Conclusion
Our prediction API uses cutting-edge technology developed by Sportmonks’ very own data scientists and development team. If you’re interested in the technology behind our predictions, you can have a look at our prediction API blog.
Last updated