view

View referee with its data ⬜ 🟨 🟦 🟩

GET https://api.soccerfootball.info/v1/referees/view/?i=ID

This endpoint returns with manager data a and last 5 matches If this entity has has_image to true, you can access/download the entity media; see te instruction inside FAQ. The parameter l must be a language code getted from languages/list endpoint. Some elements such as championship and team names can be translated

Query Parameters

NameTypeDescription

t

string

Your API Token DIRECT API ONLY

i

string

Referee ID

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":[],
   "result":[
      {
         "id":"5fb96964385d308c",
         "name":"Damir Skomina",
         "country":"SI",
         "has_image":false,
         "last_matches":[  // last 5 matches
            {
               "id":"5fb968a291fbd218",
               "date_match":"2020-11-04 20:00:00",
               "championship":{
                  "id":"5fda5fab16e51885",
                  "name":"UEFA Champions League",
                  "s_name":false
               },
               "teamA":{
                  "id":"5fda5fb4746c841f",
                  "name":"Club Brugge",
                  "score":"0"
               },
               "teamB":{
                  "id":"5fda6037746da851",
                  "name":"Borussia Dortmund",
                  "score":"3"
               }
            },
            ...
         ]
      }
   ]
}

Example of code for direct API

$url = 'https://api.soccerfootball.info/v1/referees/view/?t=TOKEN&i=ID';

$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/referees/view/?i=ID';

$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