BeatTheBookie data service endpoints

This site provides you a list all available BeatTheBookie data service endpoints, what data is provided and which parameters have to be provided.

  1. /seasons
  2. /data
  3. /zip-poisson-model
  4. /vanilla-poisson-xg-model
  5. /mv-classification-model
  6. /ml-poisson-model
  7. /team-matching

/seasons

This endpoint provides all available season for the different endpoints. So you are able to loop over every season.

/divisions

This endpoint provides all available divisions for the different endpoints. So you are able to loop over every division.

/data

The endpoint provides over 10 years of historic data including betting odds for the 1×2 market and Over/Under 2.5 goals market.

ParameterDefaultValues
divisionno default (mandatory)available in the /divisions endpoint
seasonno default (mandatory)available in then /seasons endpoint

It returns the statistics for each match of a season. Depending on the division and the season the statistics contains not only base stats but also advanced stats (xG, PPDA, deep) for the home and the away team. The historic bet365 odds are provided for the 1×2 market.

[{
    "division_id": "ebbe640962da284afb5ba2255e9f83f1",
    "division": "Serie A",
    "season_id": "7960fa3a1efa5919fd94059da7f3a119",
    "season": "2019_2020",
    "match_date": "2020-03-08",
    "match_teams": "Parma - Spal",
    "home_team_id": "85bf516cb6ae2cc86249d1e7b9fa890c",
    "home_team": "Parma",
    "away_team_id": "c5df563daf29234b9e42ccf730e5080f",
    "away_team": "Spal",
    "home_num_players":"27",
    "home_team_market_value":"151100000",
    "home_avg_market_value":"5596296",
    "away_num_players":"28",
    "away_team_market_value":"73650000",
    "away_avg_market_value":"2630357",
    "home_goals": 0,
    "away_goals": 1,
    "home_shots": 11,
    "away_shots": 6,
    "home_shots_on_target": 2,
    "away_shots_on_target": 2,
    "home_corners": 4,
    "away_corners": 5,
    "home_yellow": 2,
    "away_yellow": 2,
    "home_red": 0,
    "away_red": 0,
    "home_xgoals": 1.39,
    "away_xgoals": 1.13,
    "home_deep": 6,
    "away_deep": 3,
    "home_ppda": 6.03,
    "away_ppda": 10.19,
    "bet365_home_odds": 2,
    "bet365_draw_odds": 3.4,
    "bet365_away_odds": 3.8
  },
...

Following divisions and seasons are provided via the endpoint:

DivisionBase stats available for…Advanced stats (xG and more) available for
2. BundesligaSince 2017/18Since 2017/18
BundesligaSince 2014/15 Since 2014/15
Premier League Since 2014/15 Since 2014/15
ChampionshipSince 2017/18Since 2017/18
Serie ASince 2014/15 Since 2014/15
Serie BSince 2018/19Since 2018/19
La LigaSince 2014/15Since 2014/15
La Liga 2Since 2014/15Since 2018/19
Ligue 1Since 2014/15Since 2014/15
ErediviseSince 2018/19Since 2018/19
Liga PortugalSince 2014/15Since 2017/18
Argentine Primera DivisionSince 2017/18Since 2017/18
Belgian Pro LeagueSince 2017/18Since 2017/18
Ligue 2Since 2017/18Since 2017/18
Major League SoccerSince 2018Since 2018

/zip-poisson-model

The endpoint provides data of my good old ZIP Poisson model.

ParameterDefaultValues
modepred“pred” – provides predictions for next matches
“hist” – provides historic matches including predictions
divisionno default (mandatory)available in the /divisions endpoint
seasonno default (mandatory)available in then/seasons endpoint

It returns the match facts as well as the predictive features (e.g. attack / defence strength) for the teams as well as differt market predictions.

[
  {
    "division_id": "a355facc87c038e88972f99b7c6d388b",
    "division": "2. Bundesliga",
    "season_id": "a290f895d08db6bb30a573aedf784bad",
    "season": "2021_2022",
    "match_date": "2021-08-01",
    "match_teams": "Erzgebirge Aue - St Pauli",
    "home_team_id": "85a7e0e269f59e495ff35ebae520a3fd",
    "home_team": "Erzgebirge Aue",
    "away_team_id": "a34346a46ada46edcae15a6944c3920e",
    "away_team": "St Pauli",
    "home_attacking_strength": 1.09,
    "home_defence_strength": 1.11,
    "away_attacking_strength": 0.88,
    "away_defence_strength": 1.23,
    "home_expected_goals": 2.2,
    "away_expected_goals": 1.3,
    "home_win_prob": 0.5793,
    "draw_prob": 0.2032,
    "away_win_prob": 0.2176,
    "under_15_prob": 0.1508,
    "over_15_prob": 0.8492,
    "under_25_prob": 0.3425,
    "over_25_prob": 0.6575
  },
...

Following divisions and seasons are provided via the endpoint:

DivisionPredictive scopeHistoric scope
2. BundesligaUpcoming 4 weeksSince 2008_2009
BundesligaUpcoming 4 weeksSince 2008_2009
Premier League Upcoming 4 weeksSince 2008_2009
ChampionshipUpcoming 4 weeksSince 2014_2015
Serie AUpcoming 4 weeksSince 2008_2009
Serie BUpcoming 4 weeksSince 2014_2015
La LigaUpcoming 4 weeksSince 2008_2009
La Liga 2Upcoming 4 weeksSince 2014_2015
Ligue 1Upcoming 4 weeksSince 2008_2009
Ligue 2Upcoming 4 weeksSince 2017_2018
ErediviseUpcoming 4 weeksSince 2014_2015
Liga PortugalUpcoming 4 weeksSince 2014_2015
MLSUpcoming 4 weeksSince 2017
Argentine Primera DivisionUpcoming 4 weeksSince 2017/2018
Belgian Pro LeagueUpcoming 4 weeksSince 2008_2009

/vanilla-poisson-xg-model

This endpoint provides the predictions of 3 different xG Poisson models compared in this blog post. I decided to provide following models:

  • Short-term: xG EMA10
  • Mid-term: xG EMA20
  • Long-term: xG EMA30

So it’s possible to differ between e.g. the short-term and long-term performance of a team, when analysing a match.

ParameterDefaultValues
modepred“pred” – provides predictions for next matches
“hist” – provides historic matches including predictions
divisionno default (mandatory)available in the /divisions endpoint
seasonno default (mandatory)available in then/seasons endpoint

For the upcoming fixtures the endpoint provides the model features and prediction results for all 3 models. The historic fixtures also contains the match statistics for goals and xG.

[
  {
    "division_id": "dff80cb4edd4a90c83a23346b5b9bef0",
    "division": "Bundesliga",
    "season_id": "06b84148ed1c6a06340478bef065f5bc",
    "season": "2021_2022",
    "match_date": "2021-09-11",
    "match_teams": "Leverkusen - Dortmund",
    "home_team_id": "31f296e354f2693c68d01f1570ca3df1",
    "home_team": "Leverkusen",
    "away_team_id": "2728451089b9149bad7b106a792e51f9",
    "away_team": "Dortmund",
    "home_xg_attack_strength_ema10": 1.19,
    "home_xg_attack_strength_ema20": 1.18,
    "home_xg_attack_strength_ema30": 1.2,
    "home_xg_defence_strength_ema10": 1.07,
    "home_xg_defence_strength_ema20": 1.01,
    "home_xg_defence_strength_ema30": 0.97,
    "away_xg_attack_strength_ema10": 1.13,
    "away_xg_attack_strength_ema20": 1.2,
    "away_xg_attack_strength_ema30": 1.23,
    "away_xg_defence_strength_ema10": 0.95,
    "away_xg_defence_strength_ema20": 0.89,
    "away_xg_defence_strength_ema30": 0.86,
    "home_expected_goals_ema10": 1.7,
    "home_expected_goals_ema20": 1.6,
    "home_expected_goals_ema30": 1.5,
    "away_expected_goals_ema10": 1.7,
    "away_expected_goals_ema20": 1.7,
    "away_expected_goals_ema30": 1.7,
    "home_win_prob_ema10": 0.3871,
    "home_win_prob_ema20": 0.3589,
    "home_win_prob_ema30": 0.3574,
    "draw_prob_ema10": 0.2269,
    "draw_prob_ema20": 0.2309,
    "draw_prob_ema30": 0.2331,
    "away_win_prob_ema10": 0.386,
    "away_win_prob_ema20": 0.4102,
    "away_win_prob_ema30": 0.4095,
    "under_15_prob_ema10": 0.1482,
    "under_15_prob_ema20": 0.162,
    "under_15_prob_ema30": 0.1688,
    "over_15_prob_ema10": 0.8518,
    "over_15_prob_ema20": 0.838,
    "over_15_prob_ema30": 0.8312,
    "under_25_prob_ema10": 0.342,
    "under_25_prob_ema20": 0.3651,
    "under_25_prob_ema30": 0.3761,
    "over_25_prob_ema10": 0.658,
    "over_25_prob_ema20": 0.6349,
    "over_25_prob_ema30": 0.6239
  },
...

Following divisions and seasons are provided via the endpoint:

DivisionPredictive scopeHistoric scope
2. BundesligaUpcoming 4 weeks Since 2017/18
BundesligaUpcoming 4 weeks Since 2014/15
Premier League Upcoming 4 weeks Since 2014/15
ChampionshipUpcoming 4 weeks Since 2017/18
Serie AUpcoming 4 weeks Since 2014/15
Serie BUpcoming 4 weeksSince 2018/19
La LigaUpcoming 4 weeksSince 2014/15
La Liga 2Upcoming 4 weeks Since 2017/18
Ligue 1Upcoming 4 weeksSince 2014/15
ErediviseUpcoming 4 weeks Since 2018/19
Liga PortugalUpcoming 4 weeks Since 2017/18
Argentine Primera DivisionUpcoming 4 weeksSince 2017/18
Belgian Pro LeagueUpcoming 4 weeksSince 2017/18
Ligue 2Upcoming 4 weeksSince 2017/18
Major League SoccerUpcoming 4 weeksSince 2018

/mv-classification-model

This endpoints provides predictions based on a simple classification model using just market values for the home and away team.

ParameterDefaultValues
modepred“pred” – provides predictions for next matches
“hist” – provides historic matches including predictions
divisionno default (mandatory)available in the /divisions endpoint
seasonno default (mandatory)available in then/seasons endpoint
[
	{
	"division_id":"dff80cb4edd4a90c83a23346b5b9bef0",
	"division":"Bundesliga",
	"season_id":"0c32472f2fc8b5c139688f05a2e862f0",
	"season":"2022_2023",
	"match_date":"2023-03-11",
	"match_teams":"Ein Frankfurt - Stuttgart",
	"home_team_id":"27e4c7e9967dd8103e2769397b01abb3",
	"home_team":"Ein Frankfurt",
	"away_team_id":"a330ac6c48198545d4d2f9ff2cb0fc05",
	"away_team":"Stuttgart",
	"home_market_value":267950000,
	"away_market_value":123350000,
	"home_win_prob":0.67324,
	"draw_prob":0.23985,
	"away_win_prob":0.08691
	}
...

Following divisions and seasons are provided via the endpoint:

DivisionPredictive scopeHistoric scope
2. BundesligaUpcoming 4 weeksSince 2016/17
BundesligaUpcoming 4 weeksSince 2016/17
Premier League Upcoming 4 weeksSince 2016/17
ChampionshipUpcoming 4 weeksSince 2016/17
Serie AUpcoming 4 weeksSince 2016/17
Serie BUpcoming 4 weeksSince 2016/17
La LigaUpcoming 4 weeksSince 2016/17
La Liga 2Upcoming 4 weeksSince 2016/17
Ligue 1Upcoming 4 weeksSince 2016/17
ErediviseUpcoming 4 weeksSince 2016/17
Liga PortugalUpcoming 4 weeksSince 2016/17
Argentine Primera DivisionUpcoming 4 weeksSince 2017/18
Belgian Pro LeagueUpcoming 4 weeksSince 2016/17
Ligue 2Upcoming 4 weeksSince 2017/18
Major League SoccerUpcoming 4 weeksSince 2017

/ml-poisson-model

This endpoint provides the predictions based on my ML Poisson model:

ParameterDefaultValues
modepred“pred” – provides predictions for next matches
“hist” – provides historic matches including predictions
divisionno default (mandatory)available in the /divisions endpoint
seasonno default (mandatory)available in then/seasons endpoint

For the upcoming fixtures the endpoint provides the model features, expected goals and prediction results and the model features.

[
	{
	"division_id":"dff80cb4edd4a90c83a23346b5b9bef0",
	"division":"Bundesliga",
	"season_id":"0c32472f2fc8b5c139688f05a2e862f0",
	"season":"2022_2023",
	"match_date":"2022-10-01",
	"match_teams":"RB Leipzig - Bochum",
	"home_team_id":"91a12d20948437ab748799eeeed825f4",
	"home_team":"RB Leipzig",
	"away_team_id":"e5f7abdc9c96c4b16466b8b55cd74897",
	"away_team":"Bochum",
	"home_xg_for_ema5":1.5214658431,
	"home_xg_against_ema5":1.9022007169,
	"away_xg_for_ema5":0.8977509084,
	"away_xg_against_ema5":2.1966467057,
	"home_expected_goals":1.7,
	"away_expected_goals":1.0,
	"home_win_prob":0.4829,
	"draw_prob":0.2683,
	"away_win_prob":0.2487
	},
...

Following divisions and seasons are provided via the endpoint:

DivisionPredictive scopeHistoric scope
2. BundesligaUpcoming 4 weeks Since 2017/18
BundesligaUpcoming 4 weeks Since 2014/15
Premier League Upcoming 4 weeks Since 2014/15
ChampionshipUpcoming 4 weeks Since 2017/18
Serie AUpcoming 4 weeks Since 2014/15
Serie BUpcoming 4 weeksSince 2018/19
La LigaUpcoming 4 weeksSince 2014/15
La Liga 2Upcoming 4 weeks Since 2017/18
Ligue 1Upcoming 4 weeksSince 2014/15
ErediviseUpcoming 4 weeks Since 2018/19
Liga PortugalUpcoming 4 weeks Since 2017/18
Argentine Primera DivisionUpcoming 4 weeksSince 2017/18
Belgian Pro LeagueUpcoming 4 weeksSince 2017/18
Ligue 2Upcoming 4 weeksSince 2017/18
Major League SoccerUpcoming 4 weeksSince 2018

/team-matching

The endpoint provides a complete list of all team names used in the BeatTheBookie system and the matched names for the different data sources. The list of teams is limited by the provided division.

[
  {
  "team_id":"0031c41178ec3d2e15605a8962c6311e",
  "team":"Arles",
  "mappings":[
	{"platform":"football-data","platform_team_name":"Arles"}]
  },
  {
  "team_id":"013d5e8c67e9155030c74930aaf5be33",
  "team":"Swansea",
  "mappings":[
	{"platform":"football-data", "platform_team_name":"Swansea"},
	{"platform":"understat","platform_team_name":"Swansea"},
	{"platform":"fivethirtyeight","platform_team_name":"Swansea City"}]
  },
  ...
]

For following source a team matching is currently provided:

  • football-data.co.uk
  • Transfermarkt
  • Footystats
  • FiveThirtyEight
  • Mollybet
  • Understat