list

List of all championships ⬜ 🟨 🟦 🟩

GET https://api.soccerfootball.info/v1/championships/list/

This endpoint return with all championships and its data. This is a paginate call, see instruction inside FAQ If this entity has has_image to true, you can access/download the entity media; see the instruction inside FAQ. The parameter c must be a country code getted from coutries/list endpoint. The parameter l must be a language code getted from languages/list endpoint. Format CSV is in MS excel compatible mode (double click open without import!) The latest data are on the last page.

Query Parameters

NameTypeDescription

t

string

Your API Token DIRECT API ONLY

f

string

Format response can be "json" or "csv" (default is "json")

p

string

Page number (default value is 1)

c

string

Country code or "all" (default value is "all")

l

string

Language code (default value is "en_US")

Headers

NameTypeDescription

X-RapidAPI-Key

string

Your API token RAPIDAPI ONLY

X-RapidAPI-Host

string

soccerfootballinfo.rapidapi.com RAPIDAPI ONLY

{
   "status":200,
   "errors":[],
   "pagination":[
      {
         "page":1,// current page
         "per_page":100, // items per page
         "items":1950 // total items number
      }
   ],
   "result":[
      {
         "id":"5fda5fa713daf8c1", // championship unique id
         "name":"Kosovo - Superliga",
         "country":null,
         "has_image": false,
         "important": true // important championship has extended stats
      },
      ...
   ]
}

Example of code for direct API

$url = 'https://api.soccerfootball.info/v1/championships/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;
}

Example of code for RapidAPI

$url = 'https://soccer-football-info.p.rapidapi.com/championships/list/';

$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",
    CURLOPT_HTTPHEADER => [
        "X-RapidAPI-Host: soccer-football-info.p.rapidapi.com",
        "X-RapidAPI-Key: TOKEN"
    ],
));

$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;
}

More example of code on rapidAPI

Last updated