World Cup 2022 Qatar

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.

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.

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

Season schedule

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 GET Schedule by Season ID endpoint with the includes to retrieve all the stages with the fixtures and the teams involved:

https://api.sportmonks.com/v3/football/schedules/seasons/18017?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 77452386,
      "sport_id": 1,
      "league_id": 732,
      "season_id": 18017,
      "type_id": 223,
      "name": "Group Stage",
      "sort_order": 1,
      "finished": true,
      "is_current": false,
      "starting_at": "2022-11-20",
      "ending_at": "2022-12-02",
      "games_in_current_week": false,
      "rounds": [
        {
          "id": 238362,
          "sport_id": 1,
          "league_id": 732,
          "season_id": 18017,
          "stage_id": 77452386,
          "name": "1",
          "finished": true,
          "is_current": false,
          "starting_at": "2022-11-20",
          "ending_at": "2022-11-24",
          "games_in_current_week": false,
          "fixtures": [
            {
              "id": 18494000,
              "sport_id": 1,
              "league_id": 732,
              "season_id": 18017,
              "stage_id": 77452386,
              "group_id": 246695,
              "aggregate_id": null,
              "round_id": 238362,
              "state_id": 5,
              "venue_id": 343332,
              "name": "Spain vs Costa Rica",
              "starting_at": "2022-11-23 16:00:00",
              "result_info": "Spain won after full-time.",
              "leg": "1/1",
              "details": null,
              "length": 90,
              "placeholder": false,
              "last_processed_at": "2023-03-02 17:49:00",
              "has_odds": true,
              "starting_at_timestamp": 1669219200,
              "participants": [
                {
                  "id": 18598,
                  "sport_id": 1,
                  "country_id": 1739,
                  "venue_id": 10981,
                  "gender": "male",
                  "name": "Costa Rica",
                  "short_code": "CRI",
                  "image_path": "https://cdn.sportmonks.com/images/soccer/teams/6/18598.png",
                  "founded": 1921,
                  "type": "national",
                  "placeholder": false,
                  "last_played_at": "2014-06-29 20:00:00",
                  "meta": {
                    "location": "away",
                    "winner": false,
                    "position": 2
                  }
                },
                {
                  "id": 18710,
                  "sport_id": 1,
                  "country_id": 32,
                  "venue_id": 2020,
                  "gender": "male",
                  "name": "Spain",
                  "short_code": "ESP",
                  "image_path": "https://cdn.sportmonks.com/images/soccer/teams/22/18710.png",
                  "founded": 1913,
                  "type": "national",
                  "placeholder": false,
                  "last_played_at": "2022-12-06 15:00:00",
                  "meta": {
                    "location": "home",
                    "winner": true,
                    "position": 4
                  }
                }
              ],
              "scores": [
                {
                  "id": 11089070,
                  "fixture_id": 18494000,
                  "type_id": 1,
                  "participant_id": 18598,
                  "score": {
                    "goals": 0,
                    "participant": "away"
                  },
                  "description": "1ST_HALF"
                },
                {
                  "id": 11089071,
                  "fixture_id": 18494000,
                  "type_id": 1,
                  "participant_id": 18710,
                  "score": {
                    "goals": 3,
                    "participant": "home"
                  },
                  "description": "1ST_HALF"
                },
                {
                  "id": 11089072,
                  "fixture_id": 18494000,
                  "type_id": 2,
                  "participant_id": 18598,
                  "score": {
                    "goals": 0,
                    "participant": "away"
                  },
                  "description": "2ND_HALF"
                },
                {
                  "id": 11089073,
                  "fixture_id": 18494000,
                  "type_id": 2,
                  "participant_id": 18710,
                  "score": {
                    "goals": 7,
                    "participant": "home"
                  },
                  "description": "2ND_HALF"
                },
                {
                  "id": 11089074,
                  "fixture_id": 18494000,
                  "type_id": 1525,
                  "participant_id": 18598,
                  "score": {
                    "goals": 0,
                    "participant": "away"
                  },
                  "description": "CURRENT"
                },
                {
                  "id": 11089075,
                  "fixture_id": 18494000,
                  "type_id": 1525,
                  "participant_id": 18710,
                  "score": {
                    "goals": 7,
                    "participant": "home"
                  },
                  "description": "CURRENT"
                }
              ]
            },
            // And more

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 for this:

https://api.sportmonks.com/v3/football/standings/seasons/18017?api_token=YOUR_TOKEN
Response
{
  "data": [
    {
      "id": 2414,
      "participant_id": 18694,
      "sport_id": 1,
      "league_id": 732,
      "season_id": 18017,
      "stage_id": 77452386,
      "group_id": 246691,
      "round_id": null,
      "standing_rule_id": 18453,
      "position": 1,
      "result": "equal",
      "points": 7
    },
    {
      "id": 2417,
      "participant_id": 18645,
      "sport_id": 1,
      "league_id": 732,
      "season_id": 18017,
      "stage_id": 77452386,
      "group_id": 246692,
      "round_id": null,
      "standing_rule_id": 18455,
      "position": 1,
      "result": "equal",
      "points": 7
    },
    {
      "id": 2409,
      "participant_id": 18704,
      "sport_id": 1,
      "league_id": 732,
      "season_id": 18017,
      "stage_id": 77452386,
      "group_id": 246697,
      "round_id": null,
      "standing_rule_id": 18465,
      "position": 1,
      "result": "equal",
      "points": 6
    },
    // And more

In our World Cup 2022 all-in package, you will also have access to live standings.

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 GET Team by Season ID.

https://api.sportmonks.com/v3/football/teams/seasons/18017?api_token=YOUR_TOKEN

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 API 2.0 for now:

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://api.sportmonks.com/v3/football/topscorers/seasons/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

So how do we know which topscorer belongs to which type? We use the include type. So we could for example request everything:

https://api.sportmonks.com/v3/football/topscorers/seasons/19726?api_token=YOUR_TOKEN&include=type;player

The previous requests will give you all the top scorers of goals, cards and assist.

You can also build a match and team page with the World Cup 2022 data. We cover detailed match, team, player, and season statistics.

Do you have any questions? Just contact our team with any questions or concerns.

Last updated