Topscorers standings
Last updated
Last updated
In this tutorial, we will teach you how to request the top scorers per stage and the entire season.
Let’s start right away.
You can use the top scorers by season id endpoint if you want to request all the top scorers per stage* of a season. The endpoint returns the top 25 players per type: goals, cards and assists. *Please check our stages tutorial for more information
Let's say you want to request the topscorers of the English Premier League season 20/21 (season id: 17420):
In the response example, we only included the goalscorers type. If you look at the complete response you will also see the assists and card scorers.
Naturally, you can also enrich the response by using includes. However, you need to prefix the include.
Please read the responses carefully. Sometimes the standings for cards are based on points instead of the total amount of cards. A red card is worth 2 points and a yellow card 1.
What is prefixing exactly? With nested includes, you add the additional information at the end of the include, i.e., lineup.player
With prefixing, it’s just the other way around. You will need to prefix every available include with the actual include you’re looking for.
So, for example, if you want to have additional information about the goalscorers and team, you will need to include goalscorers.player
and goalscorers.team.
A list of available includes are:
goalscorers.player
goalscorers.team
assistscorers.player
assistscorers.team
cardscorer.player
cardscorers.team
We're going to only show you additional information about the goalscorers for this tutorial:
As you can see, you now have more information about both the player himself and his team.
As mentioned before, the previous request will give you all the top scorers of goals, cards and assist per stage. But what if you want the total amount of a season? We have the aggregated topscorers endpoint for this.
This endpoint is often used for cups like the UEFA Champions and Europa League. The preliminary stages for these cups are not included in the response as we follow the official UEFA guidelines.
The response is the same as the previous one. The only difference is that it will give you a list of the entire season or the cup’s top scorers. You can also enrich the data response you get by using includes.
You will need to prefix every available include with the actual include you’re looking for. For example, if you want to have additional information about the goalscorers and team, you will need to include aggregatedGoalscorers.player
and aggregatedGoalscorers.team
.
A list of available includes are:
aggregatedGoalscorers.player
aggregatedGoalscorers.team
aggregatedAssistscorers.player
aggregatedAssistscorers.team
aggregatedCardscorers.player
aggregatedCardscorers.team