Custom
get
https://api.soccerfootball.info
/v1/custom/
Custom endpoints 🟨 🟦 🟩
How to see API call details
How to see API call details
478KB
Image

Example of code for direct API

PHP
Javascript
NodeJS
Phyton
cURL
GO
1
$url = 'https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID';
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => $url,
7
CURLOPT_PROXY => null,
8
CURLOPT_RETURNTRANSFER => true,
9
CURLOPT_FOLLOWLOCATION => true,
10
CURLOPT_ENCODING => "",
11
CURLOPT_MAXREDIRS => 10,
12
CURLOPT_TIMEOUT => 30,
13
CURLOPT_CUSTOMREQUEST => "GET"
14
));
15
16
$response = curl_exec($curl);
17
$error = curl_error($curl);
18
19
curl_close($curl);
20
21
if (!$err) {
22
$result = json_decode($response);
23
print_r($result);
24
} else {
25
echo "cURL Error:" . $err;
26
}
Copied!
1
fetch("https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID", {
2
"method": "GET"
3
})
4
.then(response => {
5
console.log(response);
6
})
7
.catch(err => {
8
console.error(err);
9
});
Copied!
1
const request = require('request');
2
3
const options = {
4
method: 'GET',
5
url: 'https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID'
6
};
7
8
request(options, function (error, response, body) {
9
if (error) throw new Error(error);
10
11
console.log(body);
12
});
Copied!
1
import requests
2
3
url = "https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID"
4
5
response = requests.get(url).json()
6
7
print(response)
Copied!
1
curl --request GET \
2
--url 'https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID'
Copied!
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
"io/ioutil"
7
)
8
9
func main() {
10
11
url := "https://api.soccerfootball.info/v1/custom/?t=TOKEN&i=ID"
12
13
req, _ := http.NewRequest("GET", url, nil)
14
15
res, _ := http.DefaultClient.Do(req)
16
17
defer res.Body.Close()
18
body, _ := ioutil.ReadAll(res.Body)
19
20
fmt.Println(res)
21
fmt.Println(string(body))
22
23
}
Copied!

Example of code for RapidAPI

PHP
Javascript
NodeJS
Phyton
cURL
GO
1
$url = 'https://soccerfootballinfo.rapidapi.com/custom/?i=ID';
2
3
$curl = curl_init();
4
5
curl_setopt_array($curl, array(
6
CURLOPT_URL => $url,
7
CURLOPT_PROXY => null,
8
CURLOPT_RETURNTRANSFER => true,
9
CURLOPT_FOLLOWLOCATION => true,
10
CURLOPT_ENCODING => "",
11
CURLOPT_MAXREDIRS => 10,
12
CURLOPT_TIMEOUT => 30,
13
CURLOPT_CUSTOMREQUEST => "GET",
14
CURLOPT_HTTPHEADER => [
15
"x-rapidapi-host: soccerfootballinfo.rapidapi.com",
16
"x-rapidapi-key: TOKEN"
17
],
18
));
19
20
$response = curl_exec($curl);
21
$error = curl_error($curl);
22
23
curl_close($curl);
24
25
if (!$err) {
26
$result = json_decode($response);
27
print_r($result);
28
} else {
29
echo "cURL Error:" . $err;
30
}
Copied!
1
fetch("https://soccerfootballinfo.rapidapi.com/custom/?i=ID", {
2
"method": "GET",
3
"headers": {
4
"x-rapidapi-key": "TOKEN",
5
"x-rapidapi-host": "soccerfootballinfo.rapidapi.com"
6
}
7
})
8
.then(response => {
9
console.log(response);
10
})
11
.catch(err => {
12
console.error(err);
13
});
Copied!
1
const request = require('request');
2
3
const options = {
4
method: 'GET',
5
url: "https://soccerfootballinfo.rapidapi.com/custom/?i=ID",
6
headers: {
7
"x-rapidapi-key": "TOKEN",
8
"x-rapidapi-host": "soccerfootballinfo.rapidapi.com"
9
useQueryString: true
10
}
11
};
12
13
request(options, function (error, response, body) {
14
if (error) throw new Error(error);
15
16
console.log(body);
17
});
Copied!
1
import requests
2
3
url = "https://soccerfootballinfo.rapidapi.com/custom/?i=ID"
4
5
headers = {
6
"x-rapidapi-key": "TOKEN",
7
"x-rapidapi-host": "soccerfootballinfo.rapidapi.com"
8
}
9
10
response = requests.request("GET", url, headers=headers)
11
12
print(response.text)
Copied!
1
curl --request GET \
2
--url https://soccerfootballinfo.rapidapi.com/custom/?i=ID \
3
--header 'x-rapidapi-host: soccerfootballinfo.rapidapi.com' \
4
--header 'x-rapidapi-key: TOKEN'
Copied!
1
package main
2
3
import (
4
"fmt"
5
"net/http"
6
"io/ioutil"
7
)
8
9
func main() {
10
11
url := "https://soccerfootballinfo.rapidapi.com/custom/?i=ID"
12
13
req, _ := http.NewRequest("GET", url, nil)
14
15
req.Header.Add("x-rapidapi-key", "TOKEN")
16
req.Header.Add("x-rapidapi-host", "soccerfootballinfo.rapidapi.com")
17
18
res, _ := http.DefaultClient.Do(req)
19
20
defer res.Body.Close()
21
body, _ := ioutil.ReadAll(res.Body)
22
23
fmt.Println(res)
24
fmt.Println(string(body))
25
26
}
Copied!
More example of code on rapidAPI