Getting League Standings

This football api endpoint supports filtering by league, but they are now deprecated to get optimal results, please switch to using competitions instead. You can find more about competitions on the football competitions documentation page.
The football league standings api endpoint supports teams names in various languages to find out more about this. Read through our documentation on language support.

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



Seasons

Before you are able to get the data for a specific league you have to know the id of the season for which you want the standings for. As we know every season there is a new table with new and new statistics in it. In the table bellow, we have outlined the season that we have and which are their respective ids as well as some example leagues that might have standings for this season.

In our football data there are 2 kinds of season. Whole calendar year season e.g. 2020 or a autumn/spring season e.g. 2018/2019. The season which a league might have depends on the times in which it takes place. For example, the English Premier League, since it starts in the autumn and ends in the spring, it will get the second type of season (2018/2019). Leagues like the Swedish Allsvenskan and the Brazileiro which start in the beginning of the calendar year and are completed towards the end of the same year, get the the first type of season format (2017). 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)!

Season ID Name Example Leagues
1 2018 Allsvenskan, Brazileiro
2 2018/2019 Champions League, English Premier League, Serie A
3 2019 Allsvenskan, Brazileiro
4 2019/2020 Champions League, English Premier League, Serie A
5 2020 UEFA EURO, UEFA EURO Qualifiers, Allsvenskan, Brazileiro

Endpoint

In order to get the standings table for a football league from our api the only thing you need to do is the call the url bellow. We are supporting table standings data for leagues and competitions for 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

The history 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. Exception is league and competition_id you can use only one of them at the same time.

NameTypeRequiredExampleDescription
league*numberYes25 Indicates for which league you want to get the standings table for
competition_idnumberYes16The id of the competition that we want the standings for.
seasonnumberYes2 Indicates for which season you are getting the standings table for
langstringNoru2 letter ISO 639-1 language code which will translate the names of the teams to your desired language. To find out more about the languages we support you can check our dedicated football data language support page
* Our football api now transitioned to using competitions and leagues are deprecated.

Response

A response to a request will contain all the teams in the table standings with their relevant information. There is a JSON example bellow this 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.

NameTypeExampleDescription
league_id number25 The id of league which standings you have requested
season_id number2 The id of the season for which you have requested the table standings
name stringManchester CityThe name of the team in the requested language.
rank number1 the rank in the standings table that the team occupies
points number76 number of points accumulated
matches number31 the number of matches that the team has player
goal_diff number52 the goal difference of the team, if it is negative, it will be a negative number e.g. -6
goals_scored number70 the number of goals the team scored in their opponents goals
goals_conceded number18 the number of goals the team conceded in their own goal
lost number1 the number of games the team lost
drawn number7 the number of drawn matches
won number23 the number of matches the team won
team_id number7 the id of the team in our database
competition_idnumber16 the id of the competition which standings we are getting
{
    "success": true,
    "data": {
        "table": [
            {
                "league_id": "116",
                "season_id": "3",
                "name": "Dundalk",
                "rank": "1",
                "points": "56",
                "matches": "24",
                "goal_diff": "33",
                "goals_scored": "46",
                "goals_conceded": "13",
                "lost": "2",
                "drawn": "5",
                "won": "17",
                "team_id": "1891",
                "competition_id": "11"
            },
            {
                "league_id": "116",
                "season_id": "3",
                "name": "Shamrock Rovers",
                "rank": "2",
                "points": "48",
                "matches": "24",
                "goal_diff": "20",
                "goals_scored": "35",
                "goals_conceded": "15",
                "lost": "6",
                "drawn": "3",
                "won": "15",
                "team_id": "1893",
                "competition_id": "11"
            },
            {
                "league_id": "116",
                "season_id": "3",
                "name": "Bohemians",
                "rank": "3",
                "points": "42",
                "matches": "25",
                "goal_diff": "9",
                "goals_scored": "27",
                "goals_conceded": "18",
                "lost": "7",
                "drawn": "6",
                "won": "12",
                "team_id": "1507",
                "competition_id": "11"
            }
        ]
    }
}

Examples

The following examples show you how to use this 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 http://livescore-api.com/api-client/leagues/table.json?key=demo_key\\&secret=demo_secret\\&league=25\\&season=2
PHP
file_get_contents('http://livescore-api.com/api-client/leagues/table.json?key=demo_key\&secret=demo_secret\&league=25\&season=2');
Python
import urllib2
req = urllib2.Request('http://livescore-api.com/api-client/leagues/table.json?key=demo_key\&secret=demo_secret\&league=25\&season=2')
response = urllib2.urlopen(req)
print response.read()