# view full

## View match with its data and odds (full) 🟨 ⬜ 🟦 🟩

<mark style="color:blue;">`GET`</mark> `https://api.soccerfootball.info/v1/matches/view/full/?i=ID`

This endpoint returns with match data and its odds \
The parameters **`l`** must be a language code getted from languages/list endpoint. \
The odds bookmarkers are Bet365 and Unibet\
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

| Name | Type   | Description                               |
| ---- | ------ | ----------------------------------------- |
| t    | string | Your API Token **`DIRECT API ONLY`**      |
| i    | string | Match ID                                  |
| l    | string | Language code (default value is "en\_US") |

#### Headers

| Name            | Type   | Description                                         |
| --------------- | ------ | --------------------------------------------------- |
| X-RapidAPI-Key  | string | Your API token **`RAPIDAPI ONLY`**                  |
| X-RapidAPI-Host | string | soccerfootballinfo.rapidapi.com **`RAPIDAPI ONLY`** |

{% tabs %}
{% tab title="200 Success response" %}

```javascript
{
   "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_ot_score, penalty_ot_miss
               "timer":"120+1", // event time if + it's overtime or null if is in penalties
               "team":"A" // ref team A or B
            },
            ...
         ],
         "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"
         },
         "odds":{
             "starting" : { // opening odds
               "1X2" :{
                  "bet365":{
                     "1":"1.364",
                     "2":"6.500",
                     "X":"5.000"
                  },
                  "unibet":{
                     "1":"1.3",
                     "2":"8.5",
                     "X":"5"
                  }
               },
               "over_under" : {
                  "bet365":{
                     "o":"1.925",
                     "u":"1.875",
                     "v":"3"
                  },
                  "unibet":{
                     "o":"2.33",
                     "u":"1.55",
                     "v":"3.5"
                  }
               },
               "asian_handicap":{
                  "bet365":{
                     "1":"1.775",
                     "2":"2.025",
                     "v":"0.0,-0.5"
                  },
                  "unibet":{
                     "1":"2",
                     "2":"1.74",
                     "v":"-1.5"
                  }
               }
            },
            "kickoff":{ // odds at start match
               "1X2":{
                  "bet365":{
                     "1":"5.000",
                     "2":"1.615",
                     "X":"4.000"
                  },
                  "unibet":{
                     "1":"5.8",
                     "2":"1.56",
                     "X":"3.8"
                  }
               },
               "asian_handicap":{
                  "bet365":{
                     "1":"1.775",
                     "2":"2.025",
                     "v":"+1"
                  },
                  "unibet":{
                     "1":"2.35",
                     "2":"1.55",
                     "v":"0.5"
                  }
               },
               "over_under":{
                  "bet365":{
                     "o":"1.925",
                     "u":"1.875",
                     "v":"2.5"
                  },
                  "unibet":{
                     "o":"1.78",
                     "u":"1.97",
                     "v":"2.5"
                  }
               },
               "1h_asian_handicap":{
                  "bet365":{
                     "1":"2.000",
                     "2":"1.800",
                     "v":"+0.25"
                  }
               },
               "1h_goalline":{
                  "bet365":{
                     "o":"1.900",
                     "u":"1.900",
                     "v":"1"
                  }
               },
               "1h_asian_corner":{
                  "bet365":{
                     "o":"1.900",
                     "u":"1.900",
                     "v":"4.5"
                  }
               },
               "1h_result":{
                  "bet365":{
                     "1":"5.000",
                     "2":"2.200",
                     "X":"2.200"
                  }
               }
            },
            "live":{ // only if match is IN_PLAY or BREAK
              ... // same of kickoff
            }
         },
         "bet365_url" : "https://www.bet365.EXT/#/AC/B1/C1/D8/E128998076/F3"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

{% file src="<https://1849281761-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MO7VPtH3yGUfnmbVIHd%2Fuploads%2F289e6TUQHD5HA6cyKgpP%2Fezgif-7-b4ccf70f18.gif?alt=media&token=80d7c09f-2a23-48cd-baeb-8aa29dcf4695>" %}

## Example of code for direct API

{% tabs %}
{% tab title="PHP" %}

```php
$url = 'https://api.soccerfootball.info/v1/matches/view/full/?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;
}
```

{% endtab %}

{% tab title="Javascript" %}

```python
fetch("https://api.soccerfootball.info/v1/matches/view/full/?t=TOKEN&i=ID", {
    "method": "GET"
})
.then(response => {
    console.log(response);
})
.catch(err => {
    console.error(err);
});
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const request = require('request');

const options = {
  method: 'GET',
  url: 'https://api.soccerfootball.info/v1/matches/view/full/?t=TOKEN&i=ID'
};

request(options, function (error, response, body) {
    if (error) throw new Error(error);

    console.log(body);
});
```

{% endtab %}

{% tab title="Phyton" %}

```python
import requests

url = "https://api.soccerfootball.info/v1/matches/view/full/?t=TOKEN&i=ID"

response = requests.get(url).json()

print(response)
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --request GET \
    --url 'https://api.soccerfootball.info/v1/matches/view/full/?t=TOKEN&i=ID'
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://api.soccerfootball.info/v1/matches/view/full/?t=TOKEN&i=ID"

    req, _ := http.NewRequest("GET", url, nil)

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
```

{% endtab %}
{% endtabs %}

## Example of code for RapidAPI

{% tabs %}
{% tab title="PHP" %}

```php
$url = 'https://soccer-football-info.p.rapidapi.com/matches/view/full/?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;
}
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
fetch("https://soccer-football-info.p.rapidapi.com/matches/view/full/?i=ID", {
    "method": "GET",
    "headers": {
        "X-RapidAPI-Key": "TOKEN",
        "X-RapidAPI-Host": "soccer-football-info.p.rapidapi.com"
    }
})
.then(response => {
    console.log(response);
})
.catch(err => {
    console.error(err);
});
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const request = require('request');

const options = {
  method: 'GET',
  url: "https://soccer-football-info.p.rapidapi.com/matches/view/full/?i=ID",
  headers: {
   "X-RapidAPI-Key": "TOKEN",
     "X-RapidAPI-Host": "soccer-football-info.p.rapidapi.com"
   useQueryString: true
  }
};

request(options, function (error, response, body) {
    if (error) throw new Error(error);

    console.log(body);
});
```

{% endtab %}

{% tab title="Phyton" %}

```python
import requests

url = "https://soccer-football-info.p.rapidapi.com/matches/view/full/?i=ID"

headers = {
    "X-RapidAPI-Key": "TOKEN",
      "X-RapidAPI-Host": "soccer-football-info.p.rapidapi.com"
}

response = requests.request("GET", url, headers=headers)

print(response.text)
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --request GET \
    --url https://soccer-football-info.p.rapidapi.com/matches/view/full/?i=ID \
    --header 'X-RapidAPI-Host: soccer-football-info.p.rapidapi.com' \
    --header 'X-RapidAPI-Key: TOKEN'
```

{% endtab %}

{% tab title="GO" %}

```go
package main

import (
    "fmt"
    "net/http"
    "io/ioutil"
)

func main() {

    url := "https://soccer-football-info.p.rapidapi.com/matches/view/full/?i=ID"

    req, _ := http.NewRequest("GET", url, nil)

    req.Header.Add("X-RapidAPI-Key", "TOKEN")
    req.Header.Add("X-RapidAPI-Host", "soccer-football-info.p.rapidapi.com")

    res, _ := http.DefaultClient.Do(req)

    defer res.Body.Close()
    body, _ := ioutil.ReadAll(res.Body)

    fmt.Println(res)
    fmt.Println(string(body))

}
```

{% endtab %}
{% endtabs %}

More example of code on [rapidAPI](https://rapidapi.com/soccerfootball-info-soccerfootball-info-default/api/soccer-football-)
