# World Cup 2022

## How to build your World Cup 2022 application with Sportmonks’ Football Data

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.                                                        &#x20;

Let’s take a look at how you can gather the correct football data and build an World Cup 2022 Qatar application.

### Season schedule

<figure><img src="https://1087665238-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJWcc-TbBVUybJ0WbUQ%2Fuploads%2FZYXr3piSeE0NCFUvUJ8A%2FSchedule-WC.png?alt=media&#x26;token=7785f295-d0d6-4370-b3e6-54240262975f" alt=""><figcaption></figcaption></figure>

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?&#x20;

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](https://docs.sportmonks.com/v2/endpoint-overview/seasons/get-season-by-id) with the includes `stages.fixtures.localTeam` and `stages.fixtures.visitorTeam`to retrieve all the stages with the fixtures and the two teams involved:

{% tabs %}
{% tab title="Request" %}

```javascript
https://soccer.sportmonks.com/api/v2.0/seasons/18017?api_token={YOUR_TOKEN}&include=stages.fixtures.localTeam,stages.fixtures.visitorTeam
```

{% endtab %}

{% tab title="Part of the response" %}

```javascript
{
    "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
                                    }
                                }
                            },
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
We've added the official match numbers of the World Cup fixtures in the `details` field. This also helps you draw a nice visual.
{% endhint %}

### **Season standings**

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 ](https://football-postman.sportmonks.com/#b02a2306-910d-4409-b8cb-f8b3c9052857)for this:

{% tabs %}
{% tab title="Request" %}

```javascript
https://soccer.sportmonks.com/api/v2.0/standings/season/18017?api_token={YOUR_TOKEN}
```

{% endtab %}

{% tab title="Part of the response" %}

```javascript
{
    "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
                    }
                ]
            }
        },
```

{% endtab %}
{% endtabs %}

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](https://football-postman.sportmonks.com/#401a488d-bdde-4114-88bf-d6d7f45b95f6) by `group_ids`:

{% tabs %}
{% tab title="Request" %}

```javascript
https://soccer.sportmonks.com/api/v2.0/standings/season/18017?api_token={YOUR_TOKEN}&group_ids=225402
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "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
                    }
                ]
            }
        }
    ],
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can also filter multiple group ids separated by a comma.
{% endhint %}

{% hint style="success" %}
In our World Cup 2022 all-in package, you will also have access to[ live standings.](https://football-postman.sportmonks.com/#841ae829-a8eb-408d-8436-2654ba7bd120)
{% endhint %}

### **Team squads and jerseys**

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](https://football-postman.sportmonks.com/#d16d9a4c-7e7f-4bc2-94e0-3242dc2bcd75) with the include`squad.player`

```javascript
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](https://football-postman.sportmonks.com/#3a8dcebc-5484-4f54-88ed-7ccaeff4a2a6).

We also have all the team jerseys available for the participating teams. You can request them via:

```javascript
https://soccer.sportmonks.com/api/v2.0/leagues/732/shirts?api_token={YOUR_TOKEN}
```

### **Topscorers**

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://football-postman.sportmonks.com/#a9f45d6e-5888-44d0-8bfe-5dcfe4729b1d)

```javascript
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:

```javascript
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:

```javascript
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?&#x20;

We have the [aggregated topscorers endpoint ](https://football-postman.sportmonks.com/#636ad56e-3e81-4d59-ba4b-03ac2edd975f)for this. Please head over to our tutorial for more information.

{% content-ref url="../tutorials/league-and-topscorers-standings" %}
[league-and-topscorers-standings](https://docs.sportmonks.com/v2/tutorials/league-and-topscorers-standings)
{% endcontent-ref %}

{% hint style="success" %}
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.
{% endhint %}

{% content-ref url="match-and-team-pages/how-to-build-a-match-page-with-events-and-statistics" %}
[how-to-build-a-match-page-with-events-and-statistics](https://docs.sportmonks.com/v2/how-to-guides/match-and-team-pages/how-to-build-a-match-page-with-events-and-statistics)
{% endcontent-ref %}

Do you have any questions? Just[ contact our team](https://www.sportmonks.com/contact-support/) with any questions or concerns.
