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.
In order to get the list of all leagues that our football live-score 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
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.
Name Type Example Description league_id integer 2 the 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_name string Premier League the name of the soccer league country_id integer 5 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_name string France the name of the country to which the league belongs to. fixtures url this is an API link to the list of all fixtures that we have for this league right now. scores url this is an API link to the list of all live-scores 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"
}
]
}
}
cUrl
curl -XGET http://livescore-api.com/api-client/fixtures/leagues.json?key=demo_key\\&secret=demo_secret
PHPfile_get_contents('http://livescore-api.com/api-client/fixtures/leagues.json?key=demo_key\&secret=demo_secret');
Pythonimport 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()