# match schedule

## View past, present and future match with totalcorner schema ⬜ 🟨 🟦 🟩

<mark style="color:blue;">`GET`</mark> `https://api.soccerfootball.info/v1/emulation/totalcorner/match/schedule/?date=DATE`

This endpoint returns with past, present or future match with totalcorner schema.\
\
**Different between totalcorner version:** \
➡️ The database is different. More up-to-date and accurate to the second. \
➡️ Over and under quote of goalline under ou\_odds value. The goal line value remains at the first place of i\_goal to ensure compatibility with the original schema. (over under bet) \
➡️No esports event. Only real football. \
➡️ Fix some not working column Id is alphanumeric not numeric \
➡️ Add some data like last 5 matches team performance WWLLLD (Win Loss Draw) \
➡️Translated team name and championship name with bet365 translation ref (param **`l`** )\
➡️ **Trend stats 15 minute and 5 minute!**  \
➡️ Advance stats: avg goal in past match, over under percent, btts percent ecc.. see response\
➡️ Don't need to use a long url eg. \&type=inplay\&columns=events,odds,asian ecc all data will be always sent. No performance problem\
➡️[Dominance index](https://info.soccerfootball.info/dominance-index)\
➡️ 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..."\
\
Present and future call is paginate by your subscription page item numbers: \
25 PRO🟨/ BASIC ⬜ , 50 ULTRA🟦  , 100 MEGA 🟩\
\
**Past call has no pagination**\ <br>

#### Query Parameters

| Name | Type   | Description                                       |
| ---- | ------ | ------------------------------------------------- |
| t    | string | Your API Token **`DIRECT API ONLY`**              |
| p    | string | current page (default 1)                          |
| date | string | Date ISO format without separator (default today) |
| 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 | soccer-football-info.p.rapidapi.com **`RAPIDAPI ONLY`** |

{% tabs %}
{% tab title="200 Success response" %}
{% tabs %}
{% tab title="Present / Future" %}

```javascript
{
   "success":1,
   "pagination":{
      "current":1,
      "prev":false,
      "next":true,
      "per_page":100,
      "pages":5
   },
   "data":[
      {
         "id":"6044182dd31fdc64",
         "h":"Campinense Clube",
         "h_id":"5fda6031b85b47ea",
         "a":"EC Bahia",
         "a_id":"5fda5fcebabd1ab4",
         "l":"Brasile - Coppa di Brasile",
         "l_id":"5fda5fa7a37c687c",
         "l_c":"BR",
         "start":"2021-03-10 00:30:00",
         "status":null,
         "est_e":"0",
         "hc":"0",
         "ac":"0",
         "hg":"0",
         "ag":"0",
         "hrc":"0",
         "arc":"0",
         "hyc":"0",
         "ayc":"0",
         "hd_avg2_5" : "10.5", // team A (home) dominance avg 2.5
         "ad_avg2_5" : "10.5", // team B (away) dominance avg 2.5
         "hf_hc":"0",
         "hf_ac":"0",
         "hf_hg":"0",
         "hf_ag":"0",
         "ish":"0",
         "hp":null, 
         "ap":null, 
         "h_perf":"WWDLD", 
         "a_perf":"DDLWW", 
         "h_xG":[ // xG null if missing
            "1.08", // kickoff xG value
            "0.70" //  current xG value
         ],
         "a_xG":[
            "1.08",
            "0.70"
         ],
         "events":null,
         "d_index": [
            {
                "timer":"00:00", // timer of dominance index
                "teamA":"5",
                "teamB":"5"
             },
             ...
         ],
         "p_odds":[
            "9.000",
            "6.500",
            "1.200"
         ],
         "i_odds":[
            null,
            null,
            null
         ],
         "po_odds":[
            "6.500",
            "4.000",
            "1.400"
         ],
         "p_asian":[
            "+1.0"
         ],
         "i_asian":[
            ""
         ],
         "p_corner":[
            "10.5"
         ],
         "i_corner":[
            ""
         ],
         "p_corner_h":[
            "5"
         ],
         "i_corner_h":[
            ""
         ],
         "p_goal":[
            "2.5,3.0"
         ],
         "ou_odds":[
            "2.050",
            "1.800",
            "2.5,3.0"
         ],
         "i_goal":[
            ""
         ],
         "p_goal_h":[
            "1.0"
         ],
         "i_goal_h":[
            ""
         ],
         "asian_corner":[
            ""
         ],
         "attacks":[
            "0",
            "0"
         ],
         "attacks_h":[
            "0",
            "0"
         ],
         "dang_attacks":[
            "0",
            "0"
         ],
         "dang_attacks_h":[
            "0",
            "0"
         ],
         "shot_on":[
            "0",
            "0"
         ],
         "shot_on_h":[
            "0",
            "0"
         ],
         "shot_off":[
            "0",
            "0"
         ],
         "shot_off_h":[
            "0",
            "0"
         ],
         "possess":[
            "0",
            "0"
         ],
         "possess_h":[
            "0",
            "0"
         ],
         "g_a":[
            "0",
            "0"
         ],
         "o_s":[
            "0",
            "0"
         ],
         "fo":[
            "0",
            "0"
         ],
         "p_avg_g_g":[ // average game goals in past 5 matches
            "2.5", // teamA (home)
            "1"  // teamB (away)
         ],
         "p_avg_g_s":[ // average goals scored in past 5 matches
            "0.5",
            "0.5"
         ],
         "p_avg_g_c":[ // average goals conceded in past 5 matches
            "1",
            "0.5"
         ],
         "p_o_1_5_t":[ // percent of over 1.5 goal by team in past 5 matches
            "60",
            "30"
         ],
         "p_btts":[ // percent of BTTS (Goal/Goal) in past 5 matches
            "20",
            "80"
         ],
         "p_o_0_5_game":[ // percent of over 0.5 goal by game in past 5 matches
            "60",
            "30"
         ],
         "p_o_1_5_game":[ // percent of over 1.5 goal by game in past 5 matches
            "60",
            "30"
         ],
         "p_o_2_5_game":[ // percent of over 2.5 goal by game in past 5 matches
            "60",
            "30"
         ],
         "p_o_3_5_game":[ // percent of over 3.5 goal by game in past 5 matches
            "60",
            "30"
         ],
         "p_t_g_s":[ // total goals scored in last 5 matches
             "60", // teamA (home) number of goals
             "30"  // teamB (home) number of goals
         ],
         "p_g_s_0_15":[ // goals scored between 0 and 15 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_s_16_30":[ // goals scored between 16 and 30 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_s_31_45":[ // goals scored between 31 and end first half in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_s_46_60":[ // goals scored between 46 and 60 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_s_61_75":[ // goals scored between 61 and 75 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_s_76_90":[ // goals scored between 76 and end second half in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_t_g_c":[ // total goals conceded in last 5 matches
             "60", // teamA (home) number of goals
             "30"  // teamB (home) number of goals
         ],
         "p_g_c_0_15":[ // goals conceded between 0 and 15 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_c_16_30":[ // goals conceded between 16 and 30 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_c_31_45":[ // goals conceded between 31 and end first half in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_c_46_60":[ // goals conceded between 46 and 60 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_c_61_75":[ // goals conceded between 61 and 75 minute in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "p_g_c_76_90":[ // goals conceded between 76 and end second half in last 5 matches
             "1", // teamA (home) number of goals
             "2", // teamB (home) number of goals
             "10", // teamA (home) percent of total
             "20"  // teamB (home) percent of total
         ],
         "bet365_url" : "https://www.bet365.EXT/#/AC/B1/C1/D8/E130968528/F3/I0/"
      },
      ...
   ]
}
```

{% endtab %}

{% tab title="Past" %}

```javascript
{
   "success":1,
   "pagination":{
      "current":1,
      "prev":false,
      "next":true,
      "per_page":100,
      "pages":5
   },
   "data":[
      {
         "id":"6044182dd31fdc64",
         "h":"Campinense Clube",
         "h_id":"5fda6031b85b47ea",
         "a":"EC Bahia",
         "a_id":"5fda5fcebabd1ab4",
         "l":"Brasile - Coppa di Brasile",
         "l_id":"5fda5fa7a37c687c",
         "l_c":"BR",
         "start":"2021-03-10 00:30:00",
         "status":null,
         "est_e":"0",
         "hc":"0",
         "ac":"0",
         "hg":"0",
         "ag":"0",
         "hrc":"0",
         "arc":"0",
         "hyc":"0",
         "ayc":"0",
         "hf_hc":"0",
         "hf_ac":"0",
         "hf_hg":"0",
         "hf_ag":"0",
         "ish":"0",
         "events":[
            {
               "tp":"c", // type can be: c (corner), g (goal), rc (red_card), yc (yellow_card), su (substitution), pos (penalty overtime score), pom (penalty overtime miss), pm (penalty miss), ps (penalty score)
               "h":"a",  // refe team h (home teamA), a (away teamB)
               "t":"26"  // time of events in minute
            },
            ...
         ],
         "p_odds":[
            "9.000",
            "6.500",
            "1.200"
         ],
         "i_odds":[
            null,
            null,
            null
         ],
         "po_odds":[
            "6.500",
            "4.000",
            "1.400"
         ],
         "p_asian":[
            "+1.0"
         ],
         "i_asian":[
            ""
         ],
         "p_corner":[
            "10.5"
         ],
         "i_corner":[
            ""
         ],
         "p_corner_h":[
            "5"
         ],
         "i_corner_h":[
            ""
         ],
         "p_goal":[
            "2.5,3.0"
         ],
         "ou_odds":[
            "2.050",
            "1.800",
            "2.5,3.0"
         ],
         "i_goal":[
            ""
         ],
         "p_goal_h":[
            "1.0"
         ],
         "i_goal_h":[
            ""
         ],
         "asian_corner":[
            ""
         ],
         "attacks":[
            "0",
            "0"
         ],
         "attacks_h":[
            "0",
            "0"
         ],
         "dang_attacks":[
            "0",
            "0"
         ],
         "dang_attacks_h":[
            "0",
            "0"
         ],
         "shot_on":[
            "0",
            "0"
         ],
         "shot_on_h":[
            "0",
            "0"
         ],
         "shot_off":[
            "0",
            "0"
         ],
         "shot_off_h":[
            "0",
            "0"
         ],
         "possess":[
            "0",
            "0"
         ],
         "possess_h":[
            "0",
            "0"
         ],
         "g_a":[
            "0",
            "0"
         ],
         "o_s":[
            "0",
            "0"
         ],
         "fo":[
            "0",
            "0"
         ]
      },
      ...
   ]
}
```

{% endtab %}
{% endtabs %}
{% 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/emulation/totalcorner/match/schedule/?date=DATE&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);
$error = 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/emulation/totalcorner/match/schedule/?date=DATE&t=TOKEN", {
    "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/emulation/totalcorner/match/schedule/?date=DATE&t=TOKEN'
};

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/emulation/totalcorner/match/schedule/?date=DATE&t=TOKEN"

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

print(response)
```

{% endtab %}

{% tab title="cURL" %}

```bash
curl --request GET \
    --url 'https://api.soccerfootball.info/v1/emulation/totalcorner/match/schedule/?date=DATE&t=TOKEN'
```

{% endtab %}

{% tab title="GO" %}

```go
package main

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

func main() {

    url := "https://api.soccerfootball.info/v1/emulation/totalcorner/match/schedule/?date=DATE&t=TOKEN"

    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/v1/emulation/totalcorner/match/schedule/?date=DATE';

$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);
$error = 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/v1/emulation/totalcorner/match/schedule/?date=DATE", {
    "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/v1/emulation/totalcorner/match/schedule/?date=DATE",
  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/v1/emulation/totalcorner/match/schedule/?date=DATE"

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/v1/emulation/totalcorner/match/schedule/?date=DATE \
    --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/v1/emulation/totalcorner/match/schedule/?date=DATE"

    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-info)
