In this reference page, we will show you how you can the list of all countries that our live-score api data supports and how to interpret it.
In order, to get the list of all countries that our live-score data feed supports, the only thing you need to do is the call the url bellow. 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 of this soccer API endpoint contains the following information, for every country
element in the list. The same rules apply for the JSON objects and the CSV columns.
Name | Type | Example | Description |
---|---|---|---|
id | number | 5 | the id of the country which you can use in sub sequential requests. |
name | string | Germany | the name of the country. |
is_real | number | 1 | this is flag that shows whether the country is real. What does this mean is that sometimes the live-scores that we provide in order feed could be related to a real country like England. Then the is_real flag will have the value of 1 . Other times we will provide football live scores for FIFA World Cup. In this case the country like South America or FIFA will have is_real value of 0 because it is not a real country. |
leagues | url | this is a soccer API link to the list of all leagues that we have in this country. For example, if you follow this link for England you will see a list of the leagues for which we provide live-scores like: Premiership, Championship, FA Cup and more. You can find out more about the leagues endpoint in the leagues endpoint reference | |
scores | url | this is a soccer API link to the list of all live-scores that we have for this country right now | |
federation | object | contains the id and the name of the football federation to which the country belongs. You can find more about federations here. | |
national_team | object | this field contains the information about the national team associated with this country only if it is a real country |
{
"success": true,
"data": {
"country": [
{
"id": "82",
"name": "Africa",
"is_real": "0",
"leagues": "http:\/\/livescore-api.com\/api-client\/leagues\/list.json?key=demo_key&secret=demo_secret&country=82",
"scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&country=82",
"national_team": null,
"federation": {
"id": "3",
"name": "CAF"
}
},
{
"id": "67",
"name": "Algeria",
"is_real": "1",
"leagues": "http:\/\/livescore-api.com\/api-client\/leagues\/list.json?key=demo_key&secret=demo_secret&country=67",
"scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&country=67",
"national_team": {
"id": "1528",
"name": "Algeria",
"stadium": "Stade du 5 Juillet 1962",
"location": "Stade du 5 Juillet 1962"
},
"federation": {
"id": "3",
"name": "CAF"
}
},
{
"id": "65",
"name": "Argentina",
"is_real": "1",
"leagues": "http:\/\/livescore-api.com\/api-client\/leagues\/list.json?key=demo_key&secret=demo_secret&country=65",
"scores": "http:\/\/livescore-api.com\/api-client\/scores\/live.json?key=demo_key&secret=demo_secret&country=65",
"national_team": {
"id": "1443",
"name": "Argentina",
"stadium": "Estadio Monumental Antonio Vespucio Liberti",
"location": "Estadio Monumental Antonio Vespucio Liberti"
},
"federation": {
"id": "6",
"name": "CONMEBOL"
}
}
]
}
}
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 https://livescore-api.com/api-client/countries/list.json?date=today&key=demo_key\\&secret=demo_secret
PHP:
file_get_contents('https://livescore-api.com/api-client/countries/list.json?date=today&key=demo_key\&secret=demo_secret');
Python:
import urllib2
req = urllib2.Request('https://livescore-api.com/api-client/countries/list.json?date=today&key=demo_key\&secret=demo_secret')
response = urllib2.urlopen(req)
print response.read()