Topscorer standings
Step 1: Gather the tools
You are going to need the following tools:
Sportmonks' API token
Code editor (Visual studio used in examples)
Postman (optional)
You can find a link to another article where we discuss the tools in-depth on our Developer Tools Guide.
Step 2: Determine the league and season
What league and specifically what season interests you? For this guide, we’ll go with the 20/21 season of the Scottish Premiership (league id: 501, season id: 17141).
Step 3: Choose the correct endpoint
Requesting top scorers can be done with the endpoint: get topscorers by season id.
However, we will slightly modify the request because we want the player and team names and not just their player id. We can do this for all three top scorers, which are:
Goalscorers → players who have scored a goal
Assistscorers → players who gave assists
Cardscorers → players who have received yellow or red cards
We then plug the nested includesgoalscorers.player
andgoalscorers.team
to the request. So we could for example request everything:
It’s up to you how much data you want to receive. For our example, we are only interested in the goal-scoring top scorers. So we’ll use this URL:
Step 4: Analyze the response
We can see that the Scottish Premiership’s top scorer is Kevin Nisbet from Hibernian with six goals including one penalty goal.
For more detailed information you can head to our leagues & topscorers tutorial.
League & topscorers standingsLast updated