view basic

View match with its data (basic) ⬜ 🟨 🟦 🟩

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

This endpoint returns with match data The parameters l must be a language code getted from languages/list endpoint. Some elements such as championship and team names can be translated

Add bet365_url that contains bet365 url match. Please note, this is the link pointing to the match. After kickoff, the link may change but bet365 should send you back to the updated link. You have to replace .EXT with your needed extension ".com, .it etc..."

Query Parameters

NameTypeDescription

t

string

Your API Token DIRECT API ONLY

i

string

Match 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":"5fb96890388c2271",
         "date":"2020-10-01 19:00:00",
         "status":"ENDED",  // can be: IN_PLAY, BREAK, ENDED, CANCELLED, POSTPONE AND NOT_STARTED
         "timer":"90:00",  // match timer if is in extra time there is +minute eg. 90:00+01:00
         "est_e_time" : "6", // estimate extra time false if unknown
         "championship":{
            "id":"5fda5fa809f9d51b",
            "name":"UEFA Europa League - Qualificazioni",
            "s_name":"UEFA Europa League 20/21" // seson name
         },
         "teamA":{
            "id":"5fda603b651fccc9",
            "name":"Rio Ave",
            "score":{
               "f":"10", // final score
               "1h":"0", // 1 half
               "2h":"1", // 2 half
               "o":"2",  // overtime 
               "p":"8"   // penalties
            },
            "perf":{
                "l_5_matches" : "WLWLW", // last 5 match performance (from left to right)
                "avg_game_goals" : "2.5",
                "avg_goals_scored" : "1.5",
                "avg_goals_conceded" : "0.5",
                "o_1_5_team" : "50", // percent of over 1.5 by team in last 5 matches
                "btts" : "60", // percent of btts
                "o_0_5_game" : "100", // percent of over 0.5 by game in last 5 matches
                "o_1_5_game" : "100", // percent of over 1.5 by game in last 5 matches
                "o_2_5_game" : "100", // percent of over 2.5 by game in last 5 matches
                "o_3_5_game" : "100", // percent of over 3.5 by game in last 5 matches
                "tot_goals_scored" : "10", // total goals scored in last 5 matches
                "goals_scored_0_15": ["0","0"], // goals scored between 0 and 15 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_scored_16_30": ["1","10"], // goals scored between 16 and 30 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_scored_31_45": ["1","10"], // goals scored between 31 and end first half minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_scored_46_60": ["1","10"], // goals scored between 46 and 60 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_scored_61_75": ["5","50"], // goals scored between 61 and 75 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_scored_76_90": ["2","20"], // goals scored between 76 and end second half in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "tot_goals_conceded": "10", // total goals conceded in last 5 matches
                "goals_conceded_0_15": ["0","0"], // goals conceded between 0 and 15 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_conceded_16_30": ["1","10"], // goals conceded between 16 and 30 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_conceded_31_45": ["1","10"], // goals conceded between 31 and end first half minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_conceded_46_60": ["1","10"], // goals conceded between 46 and 60 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_conceded_61_75": ["5","50"], // goals conceded between 61 and 75 minute in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
                "goals_conceded_76_90": ["2","20"] // goals conceded between 76 and end second half in last 5 matches format [NUMBER_GOAL ; PERCENT_OF_TOTAL]
            },
            "position" : "1", // position in championship (if)
            "stats":{
               "possession":"40",
               "attacks":{
                  "n":"111", // normal 
                  "d":"23",  // dangerous
                  "o_s":"0"  // off side
               },
               "shoots":{
                  "t":"6", // total 
                  "off":"3", // off target shot
                  "on":"3", // on target shot
                  "g_a":"4" // goal attemps 
               },
               "penalties":"0",
               "corners":{
                  "t":"1", // total
                  "f":"1", // final 
                  "h":"0" // 1 half
               },
               "fouls":{
                  "t":"21", // total fouls
                  "y_c":"5", // yellow card
                  "y_t_r_c":"1", // yellow to red card
                  "r_c":"1" // red card
               },
               "substitutions":"4",
               "throwins":null,
               "injuries":null,
               "dominance_avg_2_5": "10.10", // average of last 2.5 minutes of dominance index
                "xG" : {
                 "kickoff" : "1.02", // Expected goal at kickoff
                 "live" : "0.88" // Current expected goal
               }
            },
            "lineup":[
                 "start":[
                     {
                        "id":"5fb9692f65e3959a",
                        "name":"Gianluigi Donnarumma",
                        "s_n":"99" // shirt number
                     },
                     ...
                  ],
                  "substitutions":[
                     {
                        "id":"5fb9692f6831e7f2",
                        "name":"Antonio Donnarumma",
                        "s_n":"90"
                     },
                     ...
                  ]
            ],
            "manager":{
               "id":"5fb962e92066c1b6",
               "name":"Gama"
            }
         },
         "teamB":{
            ... // same teamA
         },
         "events":[
            {
               "type":"red_card", // can be: corner, goal, yellow_card, red_card, substitution, penalty_score, penalty_miss, penalty_ot_score, penalty_ot_miss
               "timer":"120+1", // eevent time if + it's overtime or null if is in penalties
               "team":"A"
            },
            ...
         ],
          "dominance_index": [
            {
                "timer":"00:00", // timer of dominance index
                "teamA":"5",
                "teamB":"5"
             },
             ...
         ],
         "referee":{
            "id":"5fb96963d60bb8bc",
            "name":"Jesus Gil Manzano"
         },
         "stadium":{
            "id":"5fb96978c6a5b482",
            "name":"Estadio dos Arcos"
         },
         ,
         "bet365_url" : "https://www.bet365.EXT/#/AC/B1/C1/D8/E128998076/F3"
      }
   ]
}

Example of code for direct API

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