view
Last updated
Last updated
GET
https://api.soccerfootball.info/v1/teams/view/?i=ID
This endpoint returns with team 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.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
{
"status":200,
"errors":[],
"pagination":[],
"result":[
{
"id":"5fda5fcad92584cd",
"name":"AC Milan",
"country":"IT",
"manager":{
"id":"5fb962e4cf4aaa11",
"name":"Stefano Pioli"
},
"stadium":{
"id":"5fb96978c469c28a",
"name":"Giuseppe Meazza",
"city":"Milan",
"country":"IT",
"capacity":"80018",
"geocoords":"45.478025,9.124206"
},
"has_image":false,
"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"
},
"team_result":"LOSS"
},
...
],
"last_lineup":{
"start":[
{
"id":"5fb9692f65e3959a",
"name":"Gianluigi Donnarumma",
"s_n":"99"
},
...
],
"substitutions":[
{
"id":"5fb9692f6831e7f2",
"name":"Antonio Donnarumma",
"s_n":"90"
},
...
]
}
}
]
}
$url = 'https://api.soccerfootball.info/v1/teams/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;
}
fetch("https://api.soccerfootball.info/v1/teams/view/?t=TOKEN&i=ID", {
"method": "GET"
})
.then(response => {
console.log(response);
})
.catch(err => {
console.error(err);
});
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.soccerfootball.info/v1/teams/view/?t=TOKEN&i=ID'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
import requests
url = "https://api.soccerfootball.info/v1/teams/view/?t=TOKEN&i=ID"
response = requests.get(url).json()
print(response)
curl --request GET \
--url 'https://api.soccerfootball.info/v1/teams/view/?t=TOKEN&i=ID'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.soccerfootball.info/v1/teams/view/?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))
}
$url = 'https://soccer-football-info.p.rapidapi.com/teams/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;
}
fetch("https://soccer-football-info.p.rapidapi.com/teams/view/?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);
});
const request = require('request');
const options = {
method: 'GET',
url: "https://soccer-football-info.p.rapidapi.com/teams/view/?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);
});
import requests
url = "https://soccer-football-info.p.rapidapi.com/teams/view/?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)
curl --request GET \
--url https://soccer-football-info.p.rapidapi.com/teams/view/?i=ID \
--header 'X-RapidAPI-Host: soccer-football-info.p.rapidapi.com' \
--header 'X-RapidAPI-Key: TOKEN'
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://soccer-football-info.p.rapidapi.com/teams/view/?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))
}
More example of code on rapidAPI
t
string
Your API Token DIRECT API ONLY
i
string
Team ID
l
string
Language code (default value is "en_US")
X-RapidAPI-Key
string
Your API token RAPIDAPI ONLY
X-RapidAPI-Host
string
soccerfootballinfo.rapidapi.com RAPIDAPI ONLY