view

View manager with its data ⬜ 🟨 🟦 🟩

GET https://api.soccerfootball.info/v1/managers/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

Headers

{
   "status":200,
   "errors":[],
   "pagination":[],
   "result":[
      {
         "id":"5fb962e4cf4aaa11",
         "name":"Stefano Pioli",
         "country":"IT",
         "has_image":false,
         "current_team":{
            "public_id":"5fda5fcad92584cd",
            "name":"AC Milan"
         },
         "history_teams":[
            {
               "team":{
                  "id":"5fda5fcad92584cd",
                  "name":"AC Milan"
               },
               "from":"2019-10-27",
               "to":"now"
            },
            ...
         ],
         "last_matches":[  // last 5 matches
            {
               "id":"5febc3461e382392",
               "date_match":"2021-01-06 19:45:00",
               "championship":{
                  "id":"5fda5fab11fbd288",
                  "name":"Italy Serie A",
                  "s_name":"Serie A 20/21"
               },
               "teamA":{
                  "id":"5fda5fcad92584cd",
                  "name":"AC Milan",
                  "score":"1"
               },
               "teamB":{
                  "id":"5fda603ef024cb64",
                  "name":"Juventus",
                  "score":"3"
               }
            },
            ...
         ]
      }
   ]
}

Example of code for direct API

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