Good to have you here. The World Cup is the biggest sports events around the globe, so let's not waste a second and start building your dream application.
Welcome to our how-to guide about building a World Cup 2022 application with our football data. The World Cup 2022 is the biggest and most popular football tournaments worldwide. It’s going to be an exciting tournament with top-tier countries like Brazil, Spain, Germany, Argentina, France, and England.
In this how-to guide, we’re going to access the following information:
Full season schedule
(live) Standings
Team squads
Season topscorers
Team jerseys
Please note that you will need to have access to league World Cup (#732) in order to display and access the data.
Let’s take a look at how you can gather the correct football data and build an World Cup 2022 Qatar application.
Imagine you want to load the complete schedule of the World Cup and display this in a nice visual. You would need the complete schedule including knockout games which haven't yet been determined when the season starts.
So, how can you display the full season schedule yourself?
Our development team has added a property on both fixture and team responses called is_placeholder
. This property indicates if the resource is used to display dummy data. The false of this property will always be a boolean
value.
The is_placeholder
property will tell you that the data is not final or is used for placeholder purposes. The id of a fixture will remain the same when real data is merged to it.
You can use the season by ID endpoint with the includes stages.fixtures.localTeam
and stages.fixtures.visitorTeam
to retrieve all the stages with the fixtures and the two teams involved:
https://soccer.sportmonks.com/api/v2.0/seasons/18017?api_token={YOUR_TOKEN}&include=stages.fixtures.localTeam,stages.fixtures.visitorTeam
{
"data": {
"id": 15733,
"name": "2020",
"league_id": 1326,
"is_current_season": true,
"current_round_id": 186274,
"current_stage_id": 77442469,
"stages": {
"data": [
{
"id": 77442465,
"name": "Final",
"type": "Knock Out",
"league_id": 1326,
"season_id": 15733,
"sort_order": 5,
"has_standings": false,
"fixtures": {
"data": [
{
"id": 17922163,
"league_id": 1326,
"season_id": 15733,
"stage_id": 77442465,
"round_id": null,
"group_id": null,
"aggregate_id": null,
"venue_id": 1315,
"referee_id": null,
"localteam_id": 254406,
"visitorteam_id": 254407,
"winner_team_id": null,
"weather_report": null,
"commentaries": false,
"attendance": null,
"pitch": null,
"details": null,
"neutral_venue": false,
"winning_odds_calculated": false,
"formations": {
"localteam_formation": null,
"visitorteam_formation": null
},
"scores": {
"localteam_score": 0,
"visitorteam_score": 0,
"localteam_pen_score": null,
"visitorteam_pen_score": null,
"ht_score": null,
"ft_score": null,
"et_score": null,
"ps_score": null
},
"time": {
"status": "NS",
"starting_at": {
"date_time": "2021-07-11 19:00:00",
"date": "2021-07-11",
"time": "19:00:00",
"timestamp": 1626030000,
"timezone": "UTC"
},
"minute": null,
"second": null,
"added_time": null,
"extra_minute": null,
"injury_time": null
},
"coaches": {
"localteam_coach_id": null,
"visitorteam_coach_id": null
},
"standings": {
"localteam_position": null,
"visitorteam_position": null
},
"assistants": {
"first_assistant_id": null,
"second_assistant_id": null,
"fourth_official_id": null
},
"leg": "1/1",
"colors": null,
"deleted": false,
"is_placeholder": true,
"localTeam": {
"data": {
"id": 254406,
"legacy_id": null,
"name": "Winner Semi-final 1",
"short_code": null,
"twitter": null,
"country_id": null,
"national_team": false,
"founded": null,
"logo_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
"venue_id": null,
"current_season_id": null,
"is_placeholder": null
}
},
"visitorTeam": {
"data": {
"id": 254407,
"legacy_id": null,
"name": "Winner Semi-final 2",
"short_code": null,
"twitter": null,
"country_id": null,
"national_team": false,
"founded": null,
"logo_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
"venue_id": null,
"current_season_id": null,
"is_placeholder": null
}
}
}
]
}
},
{
"id": 77442466,
"name": "Semi-finals",
"type": "Knock Out",
"league_id": 1326,
"season_id": 15733,
"sort_order": 4,
"has_standings": false,
"fixtures": {
"data": [
{
"id": 17922164,
"league_id": 1326,
"season_id": 15733,
"stage_id": 77442466,
"round_id": null,
"group_id": null,
"aggregate_id": null,
"venue_id": 1315,
"referee_id": null,
"localteam_id": 254404,
"visitorteam_id": 254405,
"winner_team_id": null,
"weather_report": null,
"commentaries": false,
"attendance": null,
"pitch": null,
"details": null,
"neutral_venue": false,
"winning_odds_calculated": false,
"formations": {
"localteam_formation": null,
"visitorteam_formation": null
},
"scores": {
"localteam_score": 0,
"visitorteam_score": 0,
"localteam_pen_score": null,
"visitorteam_pen_score": null,
"ht_score": null,
"ft_score": null,
"et_score": null,
"ps_score": null
},
"time": {
"status": "NS",
"starting_at": {
"date_time": "2021-07-06 19:00:00",
"date": "2021-07-06",
"time": "19:00:00",
"timestamp": 1625598000,
"timezone": "UTC"
},
"minute": null,
"second": null,
"added_time": null,
"extra_minute": null,
"injury_time": null
},
"coaches": {
"localteam_coach_id": null,
"visitorteam_coach_id": null
},
"standings": {
"localteam_position": null,
"visitorteam_position": null
},
"assistants": {
"first_assistant_id": null,
"second_assistant_id": null,
"fourth_official_id": null
},
"leg": "1/1",
"colors": null,
"deleted": false,
"is_placeholder": true,
"localTeam": {
"data": {
"id": 254404,
"legacy_id": null,
"name": "Winner QF-1",
"short_code": null,
"twitter": null,
"country_id": null,
"national_team": false,
"founded": null,
"logo_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
"venue_id": null,
"current_season_id": null,
"is_placeholder": null
}
},
"visitorTeam": {
"data": {
"id": 254405,
"legacy_id": null,
"name": "Winner QF-2",
"short_code": null,
"twitter": null,
"country_id": null,
"national_team": false,
"founded": null,
"logo_path": "https://cdn.sportmonks.com/images/soccer/team_placeholder.png",
"venue_id": null,
"current_season_id": null,
"is_placeholder": null
}
}
},
We've added the official match numbers of the World Cup fixtures in the details
field. This also helps you draw a nice visual.
The World Cup 2022 group stages and teams are announced. Are you interested in an overview of all the groups? You can best use our standings by season ID endpoint for this:
https://soccer.sportmonks.com/api/v2.0/standings/season/18017?api_token={YOUR_TOKEN}
{
"data": [
{
"id": 225400,
"name": "Group A",
"league_id": 1326,
"season_id": 15733,
"round_id": 186274,
"round_name": 1,
"stage_id": 77442469,
"stage_name": "Group Stage",
"resource": "group",
"standings": {
"data": [
{
"position": 1,
"team_id": 18658,
"team_name": "Italy",
"round_id": 186274,
"round_name": 1,
"group_id": 225400,
"group_name": "Group A",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 2,
"team_id": 18708,
"team_name": "Switzerland",
"round_id": 186274,
"round_name": 1,
"group_id": 225400,
"group_name": "Group A",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 3,
"team_id": 18716,
"team_name": "Turkey",
"round_id": 186274,
"round_name": 1,
"group_id": 225400,
"group_name": "Group A",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "Possible 8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 4,
"team_id": 18721,
"team_name": "Wales",
"round_id": 186274,
"round_name": 1,
"group_id": 225400,
"group_name": "Group A",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": null,
"points": 0,
"recent_form": "",
"status": null
}
]
}
},
This will return all the group standings with the teams involved. Are you only interested in one group? No problem, you can filter the standings by group_ids
:
https://soccer.sportmonks.com/api/v2.0/standings/season/18017?api_token={YOUR_TOKEN}&group_ids=225402
{
"data": [
{
"id": 225402,
"name": "Group C",
"league_id": 1326,
"season_id": 15733,
"round_id": 186274,
"round_name": 1,
"stage_id": 77442469,
"stage_name": "Group Stage",
"resource": "group",
"standings": {
"data": [
{
"position": 1,
"team_id": 18643,
"team_name": "Austria",
"round_id": 186274,
"round_name": 1,
"group_id": 225402,
"group_name": "Group C",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 2,
"team_id": 18689,
"team_name": "Macedonia FYR",
"round_id": 186274,
"round_name": 1,
"group_id": 225402,
"group_name": "Group C",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 3,
"team_id": 18694,
"team_name": "Netherlands",
"round_id": 186274,
"round_name": 1,
"group_id": 225402,
"group_name": "Group C",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": "Possible 8th Finals",
"points": 0,
"recent_form": "",
"status": null
},
{
"position": 4,
"team_id": 18624,
"team_name": "Ukraine",
"round_id": 186274,
"round_name": 1,
"group_id": 225402,
"group_name": "Group C",
"overall": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"home": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"away": {
"games_played": 0,
"won": 0,
"draw": 0,
"lost": 0,
"goals_scored": 0,
"goals_against": 0
},
"total": {
"goal_difference": "0",
"points": 0
},
"result": null,
"points": 0,
"recent_form": "",
"status": null
}
]
}
}
],
You can also filter multiple group ids separated by a comma.
In our World Cup 2022 all-in package, you will also have access to live standings.
Now you’ve retrieved the World Cup 2022 season schedule and group standings, it might be interesting to display all the squads participating.
The easiest way to request this is to use our teams by season ID endpoint with the includesquad.player
https://soccer.sportmonks.com/api/v2.0/teams/season/18017?api_token={YOURTOKEN}&include=squad.player
Of course, if you want the teams separately you can use the team squad by team and season ID endpoint.
We also have all the team jerseys available for the participating teams. You can request them via:
https://soccer.sportmonks.com/api/v2.0/leagues/732/shirts?api_token={YOUR_TOKEN}
It’s always interesting to see which players are the top, goal, card and assist scorers of a big tournament.
You can use the topscorers by season endpoint: get topscorers by season ID.
https://soccer.sportmonks.com/api/v2.0/topscorers/season/18017?api_token={YOUR_TOKEN}
Using the above request will give a basic API response with only IDs.
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 includes goalscorers.player and goalscorers.team to the request. So we could for example request everything:
https://soccer.sportmonks.com/api/v2.0/topscorers/season/18017?api_token={YOUR_TOKEN}&include=goalscorers.player,goalscorers.team,assistscorers.player,assistscorers.team,cardscorers.player,cardscorers.team
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:
https://soccer.sportmonks.com/api/v2.0/topscorers/season/18017?api_token={YOUR_TOKEN}&include=goalscorers.player,goalscorers.team
The previous requests 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. Please head over to our tutorial for more information.
You can also build a match and team page with the World Cup 2022 data. We cover detailed match, team, player, and season statistics. Please visit our how to build a match page with events and statistics for more info.
Do you have any questions? Just contact our team with any questions or concerns.