Comment on page
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 World Cup.
Our Prediction API is based on the latest machine learning techniques, giving you the best predictions possible.
First some general information about the World Cup:
- League id: 732
- Current stage (Quarterfinals) id: 77452384
At the time of writing, the World Cup is in the quarterfinals.
The fixtures for that round are displayed here:
- Croatia vs Brazil (18452329)
- Netherlands vs Argentina (18452330)
- Morocco vs Portugal (18452331)
- England vs France (18452332)
We use the following URL:
https://api.sportmonks.com/v3/football/fixtures/between/2022-12-09/2022-12-10?api_token=YOUR_TOKEN&filters=fixtureLeagues:732&include=participants
This URL requests all the World Cup matches of the quarterfinals. Now we can start implementing the Prediction API.
We have three Prediction endpoints:
The first two endpoint give probabilities of matches. The third endpoint contains the value of the predictions for a certain league. The third endpoint will not be used here.
All probabilities are available 21 days before the match starts.
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
predictions
as include.We’ll analyze the following match between Croatia vs Brazil with fixture_id=
18452329
.Fixtures by Date Range
Probabilities by Fixture ID
https://api.sportmonks.com/v3/football/fixtures/between/2022-12-09/2022-12-10?api_token=YOUR_TOKEN&filters=fixtureLeagues:732&include=predictions;participants
https://api.sportmonks.com/v3/football/predictions/probabilities/fixtures/18452329?api_token=YOUR_TOKEN
{
"data": [
{
"id": 3297856,
"fixture_id": 18452329,
"predictions": {
"yes": 52.75,
"no": 47.25
},
"type_id": 235
},
{
"id": 3297853,
"fixture_id": 18452329,
"predictions": {
"home": 25.2,
"away": 50.5,
"draw": 24.3
},
"type_id": 237
},
{
"id": 3297857,
"fixture_id": 18452329,
"predictions": {
"yes": 31,
"no": 69
},
"type_id": 236
},
{
"id": 3297860,
"fixture_id": 18452329,
"predictions": {
"yes": 78.96,
"no": 21.04
},
"type_id": 333
},
// And more
- Over/Under 2.5 Probability (235) = 52.75% chance that there will be more than 2.5 goals.
- Over/Under 3.5 Probability (236) = 31 % chance of more than 3.5 goals, 69% chance of less than 3.5 goals.
- Fulltime Result Probability (237) = Chance of 25.2% that the home team (Croatia) will win. 50.5% that the away team (Brazil) will win and 24.3% that the match will end in a draw.
- Away Over/Under 0.5 Probability (333) = 78.96% that the away team will score more than 0.5 goals (Brazil), 21.04% chance that there will be less than 0.5 goals score by the away team.
- Home Over/Under 0.5 Probability (334) = 60.74% that the away team will score more than 0.5 goals (Croatia), 39.26% chance that there will be less than 0.5 goals score by the away team.
- Away Over/Under 2.5 Probability (328) = 48.7 that the away team will score more than 2.5 goals, 51.3% that the away team will score less than 2.5 goals.
- Correct Score Probability (240) = 11.25% chance of a final score of 1-1.
- Home Over/Under 1.5 Probability (331) = that the home team will score more than 1.5 goals, 51.3% that the away team will score less than 2.5 goals.
- Both Teams To Score Probability (231) = 54.45% chance that both teams will score.
- Over/Under 1.5 Probability (234) = 76.28% chance that there will be more than 1.5 goals.
If you used the probabilities by fixture id endpoint, you will have to repeat this step for all the other World Cup 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.
Besides the Prediction API, we also have the Value Bet API. While the Prediction API evaluates the probabilities of game events, the Value Bet API is processing thousands of historical odds data and market trends to find Value opportunities, compared to bookmakers' odds.
Once the opening odds are available, the value detection algorithm is running every 10 minutes up to the beginning of the match. Each value detected by the model is coming with a set of features described below.
If you want to combine your Value Bets requests with your requests on the Fixture endpoint or Livescore endpoint, you can add the relationship include
&include=valuebet
. Last modified 3mo ago