Includes
The "Includes" parameter allows you to specify additional information to be included in the API response. For xG values, we offer two primary includes: xGFixture
and the nested include lineups.xGLineup
.
Expected by Team (xG by Team)
Fixtures
To retrieve the xG values by team for a fixture, we've introduced an include to use. You can use xGFixture
on the Fixture entities, to retrieve the xG values for teams participating in a match. You can use this include as follows:
Seasons
To retrieve the xG values by team for a season, we've implemented this to an existing include for you to use. You can use statistics.details.type
on the Teams endpoints, to retrieve the xG values for teams participating in a season. You can use this include as follows:
Please note that not all season xG types are available yet. At the moment we only offer xG (type ID: 5304).
Expected by player (xG by Player)
Fixtures
To retrieve the xG values by player for a fixture, we've introduced a nested include to use. You can use lineups.xGLineup
on the Fixture entities, to retrieve the xG values for players participating in a match. You can use this include as follows:
Seasons
We've added this to an existing include for you to use in order to access the xG values by player for a given season. To obtain the xG values for the teams taking part in a season, use the statistics.details.type
include on the Players endpoints. This can be put to use for the following:
Please note that not all season xG types are available yet. At the moment we only offer xG (type ID: 5304).
Expected Points Table (xPTS Table)
To retrieve the xPTS table for a specific league, you can use an include that already exists and is widely used within our API. You can use the details.type
include on any of the Standings endpoints. There you'll find the type ID 7393 for Expected Points (xPTS). Here's how you use that include:
If you've got any questions or comments about using these includes, feel free to reach out to us at support@sportmonks.com.
Last updated