League standings

Step 1: Gather the tools

You are going to need the following tools:

  • Sportmonks API token

  • Code editor (Visual studio used in examples)

  • Postman (optional)

You can find a link to another article where we discuss the tools in-depth on our Developer Tools Guide.

Step 2: Determine the league and season

What league and specifically what season interests you? For this guide, we’ll go with the 20/21 season of the Scottish Premiership (league id: 501, season id: 17141).

Step 3: Choose the correct endpoint

For seasonal standings, we simply have the endpoint: get standings by season id.

https://soccer.sportmonks.com/api/v2.0/standings/season/17141?api_token={API_TOKEN}

You only need to parse a season id. Simple and straightforward, just the way we like it.

Step 4: Analyze the response

"data": [
        {
            "id": 77447501,
            "name": "1st Phase",
            "league_id": 501,
            "season_id": 17141,
            "round_id": 194976,
            "round_name": 9,
            "type": "Group Stage",
            "stage_id": 77447501,
            "stage_name": "1st Phase",
            "resource": "stage",
            "standings": {
                "data": [
                    {
                        "position": 1,
                        "team_id": 62,
                        "team_name": "Rangers",
                        "round_id": 194976,
                        "round_name": 9,
                        "group_id": null,
                        "group_name": null,
                        "overall": {
                            "games_played": 11,
                            "won": 9,
                            "draw": 2,
                            "lost": 0,
                            "goals_scored": 26,
                            "goals_against": 3
                        },
                        "home": {
                            "games_played": 5,
                            "won": 5,
                            "draw": 0,
                            "lost": 0,
                            "goals_scored": 14,
                            "goals_against": 0
                        },
                        "away": {
                            "games_played": 6,
                            "won": 4,
                            "draw": 2,
                            "lost": 0,
                            "goals_scored": 12,
                            "goals_against": 3
                        },
                        "total": {
                            "goal_difference": "23",
                            "points": 29
                        },
                        "result": "Championship Round",
                        "points": 29,
                        "recent_form": "WDWWW",
                        "status": null
                    },
                    {
                        "position": 2,
                        "team_id": 53,
                        "team_name": "Celtic",
                        "round_id": 194976,
                        "round_name": 9,
                        "group_id": null,
                        "group_name": null,
                        "overall": {
                            "games_played": 10,
                            "won": 8,
                            "draw": 1,
                            "lost": 1,
                            "goals_scored": 25,
                            "goals_against": 7
                        },
                        "home": {
                            "games_played": 5,
                            "won": 4,
                            "draw": 0,
                            "lost": 1,
                            "goals_scored": 14,
                            "goals_against": 5
                        },
                        "away": {
                            "games_played": 5,
                            "won": 4,
                            "draw": 1,
                            "lost": 0,
                            "goals_scored": 11,
                            "goals_against": 2
                        },
                        "total": {
                            "goal_difference": "18",
                            "points": 25
                        },
                        "result": "Championship Round",
                        "points": 25,
                        "recent_form": "WWWWL",
                        "status": null
                    },

We can see that the Rangers are in first place with 11 games played, nine won and two draws, and their number of accumulated points is 29. They are followed by 2nd place Celtic, with ten games played, 8 won, one draw and one loss, and 25 points. There is a lot more information regarding their standings that you can opt to use for your application.

Need standings based on a group? In our leagues & topscorers standings tutorial, we discuss all the possibilities.

League & topscorers standings

Last updated