Skip to content

Get teams

GET
/v1/teams
Server

Get teams

Authorizations

api_key
TypeAPI Key (header: X-Api-Key)

Parameters

Query Parameters

sorting
Typestring
default
page_size

Number of items per page

Typeinteger
default50
page

Current page

Typeinteger
default1
team_slug

slug of the team according to https://liaison.reuters.com/tools/sports-team-codes

Typestring
Exampleliverpool-fc
team_name

name of the club

Typestring
ExampleLiverpool FC
popular

show popular clubs (most bookings)

Typeboolean
Exampletrue
club_logo

show teams with club logo

Typeboolean
Exampletrue
sport_type

Enum: soccer, motorsport, tennis, rugby, darts, horseracing, boxing, other, motogp, formula1, cricket, basketball, combatsport, icehockey, nba, nfl, mlb, watersport, dtm, indycar, superbike, padel

Typestring
Examplesoccer
tournament_id

tournament to filter results

Typestring
Example6652b082b6d64e92af2794fb1e352e86_trn
slug

seo friendly alternative to uuid

Typestring
Exampleliverpool-fc
iso_country

filter teams on their (ISO 3166-1 alpha-3) country of origin

Typestring
ExampleGBR
event_startdate

Only returns teams which are linked to events with a startdate matching this criteria

Typestring
Example2024-04-01
interesting

filter interesting teams

Typeboolean
Exampletrue
team_id

filter on Team ID

Typestring
Example7841dbb553b74476b9236a92f56f27e9_tms

Responses

OK
application/json
JSON
{
"teams": [
{
"official_name": "Liverpool FC",
"team_id": "7841dbb553b74476b9236a92f56f27e9_tms",
"popular_team": true,
"sport_type": "string",
"slug": "liverpool-fc",
"iso_country": "GBR",
"wikipedia_slug": "Liverpool FC",
"wikipedia_snippet": "Liverpool Football Club is a professional football club based in Liverpool, England. The club competes in the Premier League...",
"venue_id": "7d881550d5ba4cb2b3faca11a9b1695d_vnx",
"team_slug": "LIV",
"logo_filename": "liverpoolfc_lrkvr.png"
}
],
"pagination": {
"total_size": 1,
"page_size": 50,
"next_page": "string",
"previous_page": "string"
}
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/teams?team_slug=liverpool-fc&team_name=Liverpool+FC&popular=true&club_logo=true&sport_type=soccer&tournament_id=6652b082b6d64e92af2794fb1e352e86_trn&slug=liverpool-fc&iso_country=GBR&event_startdate=2024-04-01&interesting=true&team_id=7841dbb553b74476b9236a92f56f27e9_tms' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/teams?team_slug=liverpool-fc&team_name=Liverpool+FC&popular=true&club_logo=true&sport_type=soccer&tournament_id=6652b082b6d64e92af2794fb1e352e86_trn&slug=liverpool-fc&iso_country=GBR&event_startdate=2024-04-01&interesting=true&team_id=7841dbb553b74476b9236a92f56f27e9_tms', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.xs2event.com/v1/teams';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'team_slug' => 'liverpool-fc',
    'team_name' => 'Liverpool FC',
    'popular' => 'true',
    'club_logo' => 'true',
    'sport_type' => 'soccer',
    'tournament_id' => '6652b082b6d64e92af2794fb1e352e86_trn',
    'slug' => 'liverpool-fc',
    'iso_country' => 'GBR',
    'event_startdate' => '2024-04-01',
    'interesting' => 'true',
    'team_id' => '7841dbb553b74476b9236a92f56f27e9_tms',
]);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $query);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$response = curl_exec($ch);
curl_close($ch);

echo $response;
?>
Python
import requests

url = 'https://api.xs2event.com/v1/teams'
params = {
    'team_slug': 'liverpool-fc',
    'team_name': 'Liverpool FC',
    'popular': true,
    'club_logo': true,
    'sport_type': 'soccer',
    'tournament_id': '6652b082b6d64e92af2794fb1e352e86_trn',
    'slug': 'liverpool-fc',
    'iso_country': 'GBR',
    'event_startdate': '2024-04-01',
    'interesting': true,
    'team_id': '7841dbb553b74476b9236a92f56f27e9_tms'
}
headers = {
    'Content-Type': 'application/json'
}

response = requests.get(url, params=params, headers=headers)
print(response.json())