Standings

The competition standings football API endpoint supports teams names in various languages to find out more about this, read through our documentation on language support.

Standings are a vital part of the football data that people are interested in. It is no longer that only the live-scores, fixtures, or history data matters. We provide our subscribers with the possibility to get the current standings of any competition using this dedicated endpoint.



SEASONS


Before you are able to get the data for a specific competition you have to know the ID of the season for which you want the standings. As we know, every season there is a new table with new and new standings in it. Below we have outlined the seasons that we have and what are their respective ids as well as some example competitions that might have standings for this season. In our football API, there are 2 kinds of seasons. Whole calendar year season e.g. 2020 or an autumn/spring season e.g. 2018/2019. The season that a competition might have depends on the period during which it takes place. Let's take for example, the English Premier League (ID 2). Since it starts in the autumn and ends in the spring will use the second type of season (2021/2022). Competitions like the Swedish Allsvenskan (ID 14) and the Brazileiro (ID 24) which start at the beginning of the calendar year and are completed towards the end of the same year get the first type of season format (2022). When it comes to qualifiers for international tournaments involving national teams the season for the qualification group standings is the same as the season in which the final tournament will take place. For example, the season for the UEFA EURO Qualifiers Groups is (2020)!


You can find more about our seasons and their IDs on the seasons list documentation page.


ENDPOINT


In order, to get the standings table for a football competition from our football API the only thing you need to do is the call the URL bellow. We are supporting table standings data for 400+ competitions from all over the globe. In this example, we have used the demo api key and secret pair. If you login in, you will see all examples with your own api key and api secret


GET:

PARAMETERS


If you do not provide a season parameter, our football API will figure out which is the current season and then provide the standings for the competition for this season.

The standings table football API endpoint supports several parameters that you can use to filter the football data and traverse through it at your convenience. The parameters are listed in the table below. You can use the parameters together as well as separately.


NameTypeRequiredExampleDescription
competition_idNumber12The ID of the competition which standings you need
groupStringCThe name of the specific group which standings you need in case the competition has more than one groups like the UEFA Champions League
group_idNumber11The ID of the group for which we would like to get the standings
langStringarThe ISO alpha2 code of the language in which you want the team names.
seasonNumber11The ID of the season for which you need the standings. This parameter is useful if you want the standings for past seasons. If this parameter is not provided the football API endpoint will return the standings for the most current season of the competition.

RESPONSE


A response to a request will contain all the teams in the table standings with their relevant information. There is a JSON example below. Its a table with just a fraction of the teams participating in the English Premier League. An actual response will contain all 20 teams, it is just too big for us to put all of the data in this page.


{
    "success": true,
    "data": {
        "table": [
            {
                "league_id": "0",
                "season_id": "13",
                "name": "Manchester City",
                "rank": "1",
                "points": "56",
                "matches": "22",
                "goal_diff": "41",
                "goals_scored": "54",
                "goals_conceded": "13",
                "lost": "2",
                "drawn": "2",
                "won": "18",
                "team_id": "12",
                "competition_id": "2",
                "group_id": "1312",
                "group_name": "1"
            },
            {
                "league_id": "0",
                "season_id": "13",
                "name": "Liverpool",
                "rank": "2",
                "points": "45",
                "matches": "21",
                "goal_diff": "37",
                "goals_scored": "55",
                "goals_conceded": "18",
                "lost": "2",
                "drawn": "6",
                "won": "13",
                "team_id": "7",
                "competition_id": "2",
                "group_id": "1312",
                "group_name": "1"
            }
        ]
    }
}


NameTypeExampleDescription
competition_idNumber2the id of the competition which standings we are getting
drawnNumber7the number of drawn matches
goal_diffNumber52the goal difference of the team, if it is negative, it will be a negative number e.g. -6
goals_concededNumber18the number of goals the team conceded in their own goal
goals_scoredNumber70the number of goals the team scored in their opponents goals
group_idNumber1681The ID of the group in which the standings are
group_nameStringAThe name of the group where the standings are
lostNumber1the number of games the team lost
matchesNumber31the number of matches that the team has played
nameStringManchester UnitedThe name of the team in the requested language.
pointsNumber76number of points accumulated
rankNumber1the rank in the standings table that the team occupies
season_idNumber2The id of the season for which you have requested the table standings
stage_idNumber1675The id of the stage in which the group is located
stage_nameStringRegular SeasonThe name of the stage in which the group is located in
team_idNumber19the id of the team in our database
wonNumber23the number of matches the team won

EXAMPLES


The following examples show you how to use this football API endpoint in various programming languages. In the examples, bellow we have used the English Premier League as an example, but it could be any other league that has standings. In this example, we have used the demo api key and secret pair. If you login in, you will see all examples with your own api key and api secret


cUrl:

curl -XGET "https://livescore-api.com/api-client/leagues/table.json?competition_id=2&key=demo_key&secret=demo_secret"
PHP:
file_get_contents('https://livescore-api.com/api-client/leagues/table.json?competition_id=2\&key=demo_key\&secret=demo_secret');
Python:
import urllib2
req = urllib2.Request('https://livescore-api.com/api-clientleagues/table.json?competition_id=2\&key=demo_key\&secret=demo_secret')
response = urllib2.urlopen(req)
print response.read()


Didn't find what you need?

Do no hesitate to contact us. We will get back to you as soon as possible.