Getting list of leagues with fixtures

In this reference we will show you how you can the list of all leagues for which we currently have fixtures data and how to interpret the data that you receive.

Endpoint

In order to get the list of all leagues that our football livescore data feed supports the only thing you need to do is the call the url bellow. Currently, we are supporting fixtures for national leagues 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:

Response

The response contains the following information of how to find the fixtures for every league that we support. The same rules apply for the JSON objects and the CSV columns.

NameTypeExampleDescription
league_idinteger2the id of the league using which you can get the fixtures. To find out more about the leagues API endpoint you can read the leagues reference page.
league_namestringPremier League the name of the soccer league
country_idinteger5 the id of the country football association to which the league belongs to. To find out more about the countries API endpoint you can read the countries reference page.
country_namestringFrancethe name of the country to which the league belongs to.
fixturesurlthis is an API link to the list of all fixtures that we have for this league right now.
scoresurlthis is an API link to the list of all livescores that we have for this league right now. This link will return any results only if there are football from this league currently being played.<
{
    "success": true,
    "data": {
        "leagues": [
            {
                "league_id": "114",
                "league_name": "Bundesliga",
                "country_id": "1",
                "country_name": "Germany",
                "fixures": "http:\/\/livescore-api.com\/api-client\/fixtures\/matches.json?key=demo_key&secret=demo_secret&league=114",
                "scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&league=114"
            },
            {
                "league_id": "4",
                "league_name": "Premiership",
                "country_id": "3",
                "country_name": "Scotland",
                "fixures": "http:\/\/livescore-api.com\/api-client\/fixtures\/matches.json?key=demo_key&secret=demo_secret&league=4",
                "scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&league=4"
            },
            {
                "league_id": "94",
                "league_name": "Major League Soccer",
                "country_id": "46",
                "country_name": "USA",
                "fixures": "http:\/\/livescore-api.com\/api-client\/fixtures\/matches.json?key=demo_key&secret=demo_secret&league=94",
                "scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&league=94"
            }
        ]
    }
}

Examples

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