Skip to content

Get event

GET
/v1/events/{event_id}
Server

Get event

Authorizations

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

Parameters

Path Parameters

event_id*

XS2event ID of the Event

Typestring
Required

Query Parameters

accept_language

To localize an event in a specific name. Fallback to en

Typestring
Exampleen

Responses

OK
application/json
JSON
{
"event_id": "5d3b8b1c916f4a158dc736dc8ef7c97a_evt",
"event_name": "Arsenal FC vs Luton Town",
"date_start": "2024-04-03T19:30:00",
"date_stop": "2024-04-03T21:15:00",
"event_status": "soldout",
"tournament_id": "6652b082b6d64e92af2794fb1e352e86_trn",
"tournament_name": "Premier League",
"venue_id": "7552e5ca74124757be3f4b0dc1687aa9_vnx",
"venue_name": "Emirates Stadium",
"location_id": "2326aaa6494c401ba94e8bf9c0b5de44_ddr",
"city": "London",
"iso_country": "GBR",
"latitude": "51.555",
"longitude": "-0.108611",
"sport_type": "string",
"season": "23/24",
"tournament_type": "league",
"date_confirmed": true,
"date_start_main_event": "2024-04-03T19:30:00+00:00",
"date_stop_main_event": "2024-04-03T21:15:00+00:00",
"hometeam_id": "3eae14a18975444a8af9d35f4e978f0e_tms",
"hometeam_name": "Arsenal FC",
"visiting_id": "12c3564d227044f4a22ea29b3fe806fa_tms",
"visiting_name": "Luton Town",
"created": "2023-06-16T07:08:25",
"updated": "2024-04-03T00:30:31",
"event_description": "Top of the table clash in London.",
"min_ticket_price_eur": 50,
"max_ticket_price_eur": 150,
"slug": "premier-league-arsenal-fc-vs-luton-town-2324-5d3b8",
"number_of_tickets": 50000,
"sales_periods": [
{
"date_start": "2024-06-01T00:00:00",
"date_stop": "2024-06-30T23:59:59",
"label": "Early Bird"
}
],
"is_popular": true
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/events/{event_id}?accept_language=en' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/events/{event_id}?accept_language=en', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.xs2event.com/v1/events/{event_id}';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'accept_language' => 'en',
]);

$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/events/{event_id}'
params = {
    'accept_language': 'en'
}
headers = {
    'Content-Type': 'application/json'
}

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