This tutorial will teach you how competitions are structured and how you can use this to your advantage.
We will walk through different stages, groups and rounds together. Please visit our API references for a complete overview of the possible values of the stages attribute. Let’s get started with the definitions of rounds, groups and stages:
Rounds: represent the game-week the season is in. For example round 1.
Stages: represent the stage the season is in. For example: ‘regular season’, ‘semi-finals’.
Groups: represent the groups of the season. For example group A, group B etc...
What are rounds?
Most of the football competitions are played once a week. The majority of the competitions handles a double round-robin structure, meaning that every team will play matches until everyone has played against each other twice.
Competitions have divided every match day into a specific round. This way, you can see exactly how many rounds are scheduled and which team plays against whom per round. Quite convenient, huh?
We at Sportmonks have given every round a name and a unique round id. This will greatly help you with requesting data about the rounds.
We’ll show you how the rounds are structured. For instance, imagine you want to know how many rounds are scheduled for the Scottish Premiership’s current season.
We use theseason by id endpoint.
Our request
Here are the details of the Scottish Premiership (league id: 501 and season id: 17141).
If you have followed our previous tutorials, you will know that the API returns a basic response by default. Let’s enrich our response by using the roundsinclude.
Indicates if the season is the current one. Possible values are "true" or "false"
current_round_id
The unique id of the current round
current_stage_id
The unique id of the current stage
Rounds Field Description
Field
Description
id
The unique id of the round
name
The name of the round
league_id
The unique league id the round belongs to
season_id
The unique season id the round belongs to
stage_id
The unique stage id the round belongs to
start
The start date of the round
end
The end date of the round
And just like that, you’ve successfully requested all the rounds including their ID of the Scottish Premiership 20/21 season! You can use these ids to request fixtures per round.
However, you might’ve noticed that the API also returns a stage id. What exactly is this stage id?
What are stages?
Every competition has the main stage, which is often the regular season with the double round-robin structure. Teams that do well in the main stage get to advance to the next stage, which is the play-offs.
Sounds confusing?
Let’s take a look together at three examples: TheEnglish Premier League (league id: 8), the Scottish Premiership (league id: 501) and the UEFA Champions League (league id: 2).
Just like with rounds, you can best request an overview of all the stages of one season with ourseason by id endpoint.
The English Premier League
Instead of rounds we are going to request all the stages of this season. Of course, you can also request both in the same request.
Indicates if the season is the current one. Possible values are "true" or "false"
current_round_id
The unique id of the current round
current_stage_id
The unique id of the current stage
Stages Field Description
Field
Description
id
The unique id of the stage
name
The name of the stage
type
Indicates what kind of type the stage is
league_id
The unique league id the stage belongs to
season_id
The unique season id the stage belongs to
sort_order
The order of the stages
has_standings
Indicates if the stage supports standings
You can see that there is one regular season, which is an indication that this is the ‘main’ stage of the competition. Want to know which team plays in the Champions League based on the standings? You can find this out by requesting the standings by season id.
You can see that this season contains multiple phases and that it’s not one regular season. It has a first and second phase. You can see that the current stage id is the first phase. The second phase will start when the first one has ended.
We just looked at two domestic leagues. But how does a cup work?
This season has a lot of different stages. First, teams need to qualify via the preliminary stages for the qualifying stages.
Once they’ve placed themselves for the qualifying rounds, they will need to progress through the play-offs before entering the group stage. As you can see, the group stage is the current stage.
Based on the group stages’ standings, some teams will progress to the next stage: 8th finals and some will be knocked out. It’s crucial that you read the response properly to avoid confusion.
What are groups?
We just mentioned groups briefly. Now let’s have a look at how our API shows you this data. We will continue with our example of the Champions League. Just like the stages and rounds, you can use groups as an include on the season by id endpoint:
Let’s evaluate the response. You can see eight groups ( A – H ). The field description is available in the third tab. Just like with the stage and round ids, you can use the group ids as a filter on many other endpoints.
Conclusion
Armed with information about rounds, groups and stages of a season, you’re now capable of filtering your requests.
For example, the below request will give us the top scorers of the group stage in the UEFA Champions League. Please refer to ourtopscorers tutorial for more information.