
Contents
Accessing xG data
First, you need to make sure you have access to the Expected Metrics Add-on in the Sportmonks API. If you don’t have that, please head over to our dedicated xG page.
After that, you’ll need to familiarise yourself with the world of xG data. Below you can find all the xG values we offer.
The explanation of what every metric means can be found in our xG explained blog. To learn how these values are calculated you can head over to our ‘What is expected Goals?‘ blog. For a more detailed deep dive into our xG model, you can read this blog by our partners at Octosport.io.
Retrieving xG data
Now that you have familiarised yourself with xG data, you can start retrieving it. First, you’ll need to gather the tools.
Here’s what you’ll need:
- API token: First, obtain your Sportmonks API token. If you haven’t got one yet, simply head to MySportmonks and create one.
- Code editor: It is crucial to have a reliable code editor for crafting and refining your page’s code. We suggest using Visual Studio Code, though any editor you choose will suffice.
- Postman (Optional): While not essential, having Postman installed can significantly assist in testing and debugging your API requests. Refer to our Postman Guide for a comprehensive guide on using the Sportmonks Football API with Postman.
With these tools, you can use our xG data. Let’s get started!

Choose your endpoint
Then you need to choose the right endpoint based on your requirements. You can either use the GET Expected by Team or GET Expected by Player endpoints.
GET expected by team: Analyse team performance
When you aim to analyse the overall performance of teams in a match, the GET Expected by Team endpoint is your prime choice. This endpoint provides a comprehensive overview of xG values attributed to each participating team. This enables you to gauge teams’ offensive prowess, identify patterns, and derive valuable insights to inform strategic decisions.
GET expected by player: Spotlight on player contributions
For those seeking to delve deeper into individual player performances, the GET Expected by Player endpoint offers a tailored solution. By accessing this endpoint, you unlock a wealth of xG data specific to each player in the lineup. This allows you to examine individual players’ contributions, assess their impact on the game, and gain a good understanding of player performance dynamics.
"data": [ { "id": 27778093, "fixture_id": 19071356, "type_id": 7945, "participant_id": 6829, "data": { "value": 0.8069999999999999 }, "location": "home", "type": { "id": 7945, "name": "Expected Goals Open Play (xGOP)", "code": "expected-goals-open-play", "developer_name": "EXPECTED_GOALS_OPEN_PLAY", "model_type": "statistic", "stat_group": "offensive" } { "id": 27778095, "fixture_id": 19071356, "type_id": 7944, "participant_id": 6829, "data": { "value": 0.238 }, "location": "home", "type": { "id": 7944, "name": "Expected Goals Set Play (xGSP)", "code": "expected-goals-set-play", "developer_name": "EXPECTED_GOALS_SET_PLAY", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 10054642241, "sport_id": 1, "fixture_id": 18842644, "player_id": 26823, "team_id": 19, "position_id": 26, "formation_field": "3:1", "type_id": 11, "formation_position": 6, "player_name": "Martin Ødegaard", "jersey_number": 8, "xglineup": [ { "id": 1118772830, "fixture_id": 18842644, "player_id": 26823, "team_id": 19, "lineup_id": 10054642241, "type_id": 5304, "data": { "value": 0.0938 }, "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 1118772840, "fixture_id": 18842644, "player_id": 26823, "team_id": 19, "lineup_id": 10054642241, "type_id": 5305, "data": { "value": 0.1021 }, "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } } ] },
Including the xG data
You can also choose to include this data in one of your GET Fixtures or GET Livescores request. You can do that by using either of these includes: &include=xGFixture for fixture data.
&include=lineups.xGLineup for player data.
To retrieve more information about the specific values you’re receiving, you can use the include .type to both of the includes mentioned above. This will show you all the types we offer for our Expected Values.
Now you’re ready to send the request to our Football API, and you will retrieve the desired xG data.
{ "data": { "id": 18842619, "sport_id": 1, "league_id": 8, "season_id": 21646, "stage_id": 77464011, "group_id": null, "aggregate_id": null, "round_id": 307175, "state_id": 5, "venue_id": 492, "name": "Wolverhampton Wanderers vs Arsenal", "starting_at": "2024-04-20 18:30:00", "result_info": "Arsenal won after full-time.", "leg": "1/1", "details": null, "length": 90, "placeholder": false, "has_odds": true, "starting_at_timestamp": 1713637800, "expected": [ { "id": 31889006, "fixture_id": 18842619, "type_id": 5304, "participant_id": 19, "data": { "value": 1.7954 }, "location": "away", "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889005, "fixture_id": 18842619, "type_id": 5304, "participant_id": 29, "data": { "value": 0.2347 }, "location": "home", "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889008, "fixture_id": 18842619, "type_id": 5305, "participant_id": 19, "data": { "value": 2.1182 }, "location": "away", "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889007, "fixture_id": 18842619, "type_id": 5305, "participant_id": 29, "data": { "value": 0.6839 }, "location": "home", "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889022, "fixture_id": 18842619, "type_id": 7939, "participant_id": 19, "data": { "value": 2.49 }, "location": "away", "type": { "id": 7939, "name": "Expected Points (xPTS)", "code": "expected-points", "developer_name": "EXPECTED_POINTS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889021, "fixture_id": 18842619, "type_id": 7939, "participant_id": 29, "data": { "value": 0.32 }, "location": "home", "type": { "id": 7939, "name": "Expected Points (xPTS)", "code": "expected-points", "developer_name": "EXPECTED_POINTS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889018, "fixture_id": 18842619, "type_id": 7940, "participant_id": 19, "data": { "value": 0 }, "location": "away", "type": { "id": 7940, "name": "Expected Goals Penalties (xGP)", "code": "expected-goals-penalties", "developer_name": "EXPECTED_GOALS_PENALTIES", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889017, "fixture_id": 18842619, "type_id": 7940, "participant_id": 29, "data": { "value": 0 }, "location": "home", "type": { "id": 7940, "name": "Expected Goals Penalties (xGP)", "code": "expected-goals-penalties", "developer_name": "EXPECTED_GOALS_PENALTIES", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889016, "fixture_id": 18842619, "type_id": 7941, "participant_id": 19, "data": { "value": 0 }, "location": "away", "type": { "id": 7941, "name": "Expected Goals Free Kicks (xGFK)", "code": "expected-goals-free-kicks", "developer_name": "EXPECTED_GOALS_FREE_KICKS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889015, "fixture_id": 18842619, "type_id": 7941, "participant_id": 29, "data": { "value": 0 }, "location": "home", "type": { "id": 7941, "name": "Expected Goals Free Kicks (xGFK)", "code": "expected-goals-free-kicks", "developer_name": "EXPECTED_GOALS_FREE_KICKS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889014, "fixture_id": 18842619, "type_id": 7942, "participant_id": 19, "data": { "value": 0.073 }, "location": "away", "type": { "id": 7942, "name": "Expected Goals Corners (xGC)", "code": "expected-goals-corners", "developer_name": "EXPECTED_GOALS_CORNERS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889013, "fixture_id": 18842619, "type_id": 7942, "participant_id": 29, "data": { "value": 0.023 }, "location": "home", "type": { "id": 7942, "name": "Expected Goals Corners (xGC)", "code": "expected-goals-corners", "developer_name": "EXPECTED_GOALS_CORNERS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889020, "fixture_id": 18842619, "type_id": 7943, "participant_id": 19, "data": { "value": 1.7954 }, "location": "away", "type": { "id": 7943, "name": "Expected Goals Non Penalty Goals (npxG)", "code": "expected-non-penalty-goals", "developer_name": "EXPECTED_NON_PENALTY_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889019, "fixture_id": 18842619, "type_id": 7943, "participant_id": 29, "data": { "value": 0.2347 }, "location": "home", "type": { "id": 7943, "name": "Expected Goals Non Penalty Goals (npxG)", "code": "expected-non-penalty-goals", "developer_name": "EXPECTED_NON_PENALTY_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889012, "fixture_id": 18842619, "type_id": 7944, "participant_id": 19, "data": { "value": 0.222 }, "location": "away", "type": { "id": 7944, "name": "Expected Goals Set Play (xGSP)", "code": "expected-goals-set-play", "developer_name": "EXPECTED_GOALS_SET_PLAY", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889011, "fixture_id": 18842619, "type_id": 7944, "participant_id": 29, "data": { "value": 0.023 }, "location": "home", "type": { "id": 7944, "name": "Expected Goals Set Play (xGSP)", "code": "expected-goals-set-play", "developer_name": "EXPECTED_GOALS_SET_PLAY", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889010, "fixture_id": 18842619, "type_id": 7945, "participant_id": 19, "data": { "value": 1.572 }, "location": "away", "type": { "id": 7945, "name": "Expected Goals Open Play (xGOP)", "code": "expected-goals-open-play", "developer_name": "EXPECTED_GOALS_OPEN_PLAY", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889009, "fixture_id": 18842619, "type_id": 7945, "participant_id": 29, "data": { "value": 0.211 }, "location": "home", "type": { "id": 7945, "name": "Expected Goals Open Play (xGOP)", "code": "expected-goals-open-play", "developer_name": "EXPECTED_GOALS_OPEN_PLAY", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889026, "fixture_id": 18842619, "type_id": 9684, "participant_id": 19, "data": { "value": 1.5607 }, "location": "away", "type": { "id": 9684, "name": "Expected Goals Difference (xGD)", "code": "expected-goals-difference", "developer_name": "EXPECTED_GOALS_DIFFERENCE", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889025, "fixture_id": 18842619, "type_id": 9684, "participant_id": 29, "data": { "value": -1.5607 }, "location": "home", "type": { "id": 9684, "name": "Expected Goals Difference (xGD)", "code": "expected-goals-difference", "developer_name": "EXPECTED_GOALS_DIFFERENCE", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889028, "fixture_id": 18842619, "type_id": 9685, "participant_id": 19, "data": { "value": 0.3228 }, "location": "away", "type": { "id": 9685, "name": "Shooting Performance (SP)", "code": "shooting-performance", "developer_name": "SHOOTING_PERFORMANCE", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889027, "fixture_id": 18842619, "type_id": 9685, "participant_id": 29, "data": { "value": 0.4492 }, "location": "home", "type": { "id": 9685, "name": "Shooting Performance (SP)", "code": "shooting-performance", "developer_name": "SHOOTING_PERFORMANCE", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889030, "fixture_id": 18842619, "type_id": 9686, "participant_id": 19, "data": { "value": 0.6839 }, "location": "away", "type": { "id": 9686, "name": "Expected Goals Prevented (xGP)", "code": "expected-goals-prevented", "developer_name": "EXPECTED_GOALS_PREVENTED", "model_type": "statistic", "stat_group": "defensive" } }, { "id": 31889029, "fixture_id": 18842619, "type_id": 9686, "participant_id": 29, "data": { "value": 0.1182 }, "location": "home", "type": { "id": 9686, "name": "Expected Goals Prevented (xGP)", "code": "expected-goals-prevented", "developer_name": "EXPECTED_GOALS_PREVENTED", "model_type": "statistic", "stat_group": "defensive" } }, { "id": 31889024, "fixture_id": 18842619, "type_id": 9687, "participant_id": 19, "data": { "value": 0.2347 }, "location": "away", "type": { "id": 9687, "name": "Expected Goals Against (xGA)", "code": "expected-goals-against", "developer_name": "EXPECTED_GOALS_AGAINST", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 31889023, "fixture_id": 18842619, "type_id": 9687, "participant_id": 29, "data": { "value": 1.7954 }, "location": "home", "type": { "id": 9687, "name": "Expected Goals Against (xGA)", "code": "expected-goals-against", "developer_name": "EXPECTED_GOALS_AGAINST", "model_type": "statistic", "stat_group": "offensive" } } ] }, { "data": { "id": 18842619, "sport_id": 1, "league_id": 8, "season_id": 21646, "stage_id": 77464011, "group_id": null, "aggregate_id": null, "round_id": 307175, "state_id": 5, "venue_id": 492, "name": "Wolverhampton Wanderers vs Arsenal", "starting_at": "2024-04-20 18:30:00", "result_info": "Arsenal won after full-time.", "leg": "1/1", "details": null, "length": 90, "placeholder": false, "has_odds": true, "starting_at_timestamp": 1713637800, "lineups": [ { "id": 9550022478, "sport_id": 1, "fixture_id": 18842619, "player_id": 17544737, "team_id": 19, "position_id": 25, "formation_field": "2:2", "type_id": 11, "formation_position": 3, "player_name": "William Saliba", "jersey_number": 2, "xglineup": [ ] }, { "id": 9550022484, "sport_id": 1, "fixture_id": 18842619, "player_id": 3259, "team_id": 19, "position_id": 25, "formation_field": "2:1", "type_id": 11, "formation_position": 2, "player_name": "Ben White", "jersey_number": 4, "xglineup": [ { "id": 1096652905, "fixture_id": 18842619, "player_id": 3259, "team_id": 19, "lineup_id": 9550022484, "type_id": 5304, "data": { "value": 0.0256 }, "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } } ] }, { "id": 9550022486, "sport_id": 1, "fixture_id": 18842619, "player_id": 97811, "team_id": 19, "position_id": 25, "formation_field": "2:3", "type_id": 11, "formation_position": 4, "player_name": "Gabriel Magalhães", "jersey_number": 6, "xglineup": [ ] }, { "id": 9550022475, "sport_id": 1, "fixture_id": 18842619, "player_id": 16827155, "team_id": 19, "position_id": 27, "formation_field": "4:1", "type_id": 11, "formation_position": 9, "player_name": "Bukayo Saka ", "jersey_number": 7, "xglineup": [ { "id": 1096524378, "fixture_id": 18842619, "player_id": 16827155, "team_id": 19, "lineup_id": 9550022475, "type_id": 5304, "data": { "value": 0.4093 }, "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 1096524381, "fixture_id": 18842619, "player_id": 16827155, "team_id": 19, "lineup_id": 9550022475, "type_id": 5305, "data": { "value": 0.0992 }, "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } } ] }, { "id": 9550022488, "sport_id": 1, "fixture_id": 18842619, "player_id": 26823, "team_id": 19, "position_id": 26, "formation_field": "3:1", "type_id": 11, "formation_position": 6, "player_name": "Martin Ødegaard", "jersey_number": 8, "xglineup": [ { "id": 1096532597, "fixture_id": 18842619, "player_id": 26823, "team_id": 19, "lineup_id": 9550022488, "type_id": 5304, "data": { "value": 0.2048 }, "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 1096638033, "fixture_id": 18842619, "player_id": 26823, "team_id": 19, "lineup_id": 9550022488, "type_id": 5305, "data": { "value": 0.2386 }, "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } } ] }, { "id": 9550022474, "sport_id": 1, "fixture_id": 18842619, "player_id": 5329, "team_id": 19, "position_id": 27, "formation_field": "4:2", "type_id": 11, "formation_position": 10, "player_name": "Gabriel Jesus", "jersey_number": 9, "xglineup": [ { "id": 1096507834, "fixture_id": 18842619, "player_id": 5329, "team_id": 19, "lineup_id": 9550022474, "type_id": 5304, "data": { "value": 0.0889 }, "type": { "id": 5304, "name": "Expected Goals (xG)", "code": "expected-goals", "developer_name": "EXPECTED_GOALS", "model_type": "statistic", "stat_group": "offensive" } }, { "id": 1096662247, "fixture_id": 18842619, "player_id": 5329, "team_id": 19, "lineup_id": 9550022474, "type_id": 5305, "data": { "value": 0.0011 }, "type": { "id": 5305, "name": "Expected Goals on Target (xGoT)", "code": "expected-goals-on-target", "developer_name": "EXPECTED_GOALS_ON_TARGET", "model_type": "statistic", "stat_group": "offensive" } } ] },
Understanding the response
Understanding the response from the Sportmonks Football API is essential for effectively using xG data in your football analysis. The response provides detailed information in a structured format, including the unique id (id) of the expected value, the fixture related to the value (fixture_id), the type of the Expected value (type_id), the participant related to the Expected value (participant_id), the value itself (value), and the location of the home or away team (location). For the example above, you can see that Arsenal had an xG value of 2.49 in the match against Wolves. If you’re interested in a detailed explanation of the xG metrics, you can read our xG explained blog.
Analysing the xG data
Now that you already understand the significance of xG values, you’ll need to consider the context of the match when analysing xG data. Factors such as team strength, playing style, and match conditions can influence xG values. Then, you can analyse xG data over multiple matches to identify patterns and trends. Look for correlations between xG values and match outcomes to uncover valuable insights. Finally, you can use xG data to inform tactical decisions, evaluate performance or enhance predictive modelling.
Want some more information?
Expected goals is usually expressed as a value between 0 and 1, where 0 indicates a very low probability of scoring and 1 indicates a very high probability. For example, a clear one-on-one chance with the goalkeeper might have a high xG value close to 1, while a long-range speculative shot might have a low xG value closer to 0. An xG value above 0.38 for a specific shot is considered a big chance. For example, a penalty has an average xG of 0.79 to be scored.
Keep in mind that the quality of a player is not accounted for. So, for expected goals, it does not matter if Lionel Messi is the one taking a shot or if the data scientist of Sportmonks takes the shot.