list
get
https://api.soccerfootball.info
/v1/countries/list/
List of all countries ⬜ 🟨 🟦 🟩
This endpoint returns with all countries and the relented entries. You can use this call to get country code and use it in another endpoints.
The possible format of this call is json or csv (MS office compatible)
Format CSV is in MS excel compatible mode (double click open without import!)
Parameters
Query
t
string
Your API Token
DIRECT API ONLY
f
string
Format response can be "json" or "csv" (default "json")
Header
X-RapidAPI-Key
string
Your API token
RAPIDAPI ONLY
X-RapidAPI-Host
string
soccerfootballinfo.rapidapi.com
RAPIDAPI ONLY
Responses
200
Success response

How to see API call details
478KB
Image
PHP
Javascript
NodeJS
Phyton
cURL
GO
$url = 'https://api.soccerfootball.info/v1/countries/list/?t=TOKEN';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_PROXY => null,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_CUSTOMREQUEST => "GET"
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if (!$err) {
$result = json_decode($response);
print_r($result);
} else {
echo "cURL Error:" . $err;
}
fetch("https://api.soccerfootball.info/v1/countries/list/?t=TOKEN", {
"method": "GET"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.soccerfootball.info/v1/countries/list/?t=TOKEN'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);