Countries list

  1. Endpoint
  2. Parameters
  3. Response
  4. Examples

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.

ENDPOINT


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


GET:

PARAMETERS


Currently, this football API endpoint supports only one parameter which is the federation_id. It will cause the list of the returned countries to contain ones that are part of the provided federation. To see the full list of federations, you can check the federations list API endpoint documentation.


NameTypeRequiredExampleDescription
federation_idnumber3Filters the countries by the federation they belong to. You can find out more about our federations on the federation list API endpoint documentation page

RESPONSE


The response of this football 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.


NameTypeExampleDescription
federationobjectcontains the id and the name of the football federation to which the country belongs. You can find more about federations here.
idnumber5the id of the country which you can use in sub sequential requests.
is_realnumber1this 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.
leaguesurlthis is a football 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
namestringGermanythe name of the country.
national_teamobjectthis field contains the information about the national team associated with this country only if it is a real country
scoresurlthis is a football API link to the list of all live-scores that we have for this country right now

{
    "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"
                }
            }
        ]
    }
}


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 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()


Didn't find what you need?

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