Season standings
Standings, also known as rankings, show the positions of the teams competing in a season. Standings show the total number of games played, won, and lost, the number of goals for and against and the number of points they have accumulated.
Keep track of the season performances of your favourite teams. The standings endpoint is used to retrieve full league standing tables.
The response of the standings endpoint can be returned in two formats depending on the league setup. For โnormalโ leagues, the response format differs from cups.
You can choose a variety of endpoints to retrieve the season standings.
This section will briefly discuss all the options available to request season standings.
An overview of all available options:
GET All Standings: returns all the standings available within your subscription.
GET Standing by Season ID: returns the full league standing table from your requested season id.
GET Standings by Round ID: returns the full league standing table from your requested round id.
GET Standing Correction by Season ID: returns the standing corrections from your requested season id.
Get Live Standings by League ID: returns the LIVE league standing table from your requested league id.
For all the season standings endpoints the base URL is the same:
https://api.sportmonks.com/v3/football/standings
Per endpoint the rest of the URL requires additional information. We will explain this per endpoint.
Requesting standings
GET All Standings
The first option is to request all the standings available in your subscription. The URL to retrieve all your standings is the same as the base URL for standings. All you have to do is authorize the request with your API token. Check our authentication section for more info.
In the response, you will see the unique id of the standing, the participant, sport, league and season. And also, if applicable, the stage, group and round id related to the standing. Furthermore, you will see the position, result (indicated if the participant went up or down in the standings table), form and the number of points.
Interested in adding extra information to the response? Check our adding useful information section
GET Standings by Season ID
The GET Standings by Season ID is the most commonly used endpoint to return the full league standing table from your requested season id. So, how do you request all of this data yourself? Weโre going to show you how!
This section will show you how to request standings for the Danish Superliga season 2022/2023 (season id: 19686). You will need to add the season_id
parameters to your request.
https://api.sportmonks.com/v3/football/standings
/seasons/{season_id}
This will result in the following request:
As you can see, the response is an overview of complete league standings, but what if youโre interested in the standings in a specific round?
GET Standings by Round ID
The GET Standings by Round ID is perfect for displaying the leagues' standings in a particular round. Itโs great to show historical data or to make analyses based on historical standings. You will need to add the round_id
parameters to your request.
https://api.sportmonks.com/v3/football/standings
/rounds/{round_id}
For example, if youโre interested in the standings from round 11 (round id: 274241) in the Danish Superliga:
You can request all rounds from a season via the Rounds by Season ID endpoint
GET Standings by Corrections by Season ID
Sometimes, a team gets a disciplinary sanction that results in a point deduction. The GET Standings Correction by Season ID endpoint is designed to return the standing corrections from your requested season id. To retrieve this, you will have to add the following info to the base URL of standings:
https://api.sportmonks.com/v3/football/standings
/corrections/seasons/{season_id}
For this example only, weโre going to use a different season id than from the free plan. This is to give you an understanding of the APIโs response. Weโre using the season id of the French Ligue 1 2021/2022 season.
GET Live Standings by League ID
Next to historical standings per round, you can obtain live standings. The GET Live Standings by League ID returns the LIVE league standing table from your requested league ID. To retrieve this, you will have to add the following info to the base URL of standings:
https://api.sportmonks.com/v3/football/standings
/live/league/{league_id}
Please note that in this instance, you need to parse a league id.
This is because you can only obtain LIVE standings for active seasons.
For example your request for the Scottish Premiership (league id 501) will be:
Adding useful information
Now, you might have noticed that the API returns only the necessary information. But what if youโre interested in league and team names? Or if youโre interested in more details? You can use certain includes for this.
Check the endpoint page for a complete overview of the available includes.
Letโs say you want the standings of the Danish Superliga 2022/2023 season, but this time with the team and league information and the standing details. As youโve learnt in the GET Standings by Season ID section, your request is:
Now, you can add the participant
, league
and details.type
include for more info:
Including .type
is not recommended as an include on any endpoint. Types are used throughout the entire API. We recommend retrieving all types from the types endpoint and storing them in your database or other data structure. Only include the type if no other option is available or when testing the API.
Selecting and filtering
Letโs continue with the previous example. You now have included team information in the response, but youโre only interested in the team, league and standings type names. You can select those names via the select option:
Check our selecting and filtering tutorial for more information.
Last updated