Skip to content

Get venues

GET
/v1/venues
Server

Get venues

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
country

Country in iso format

Typestring
ExampleGBR
venue_type

Enum: racetrack, stadium, other

Typestring
Examplestadium
popular

Search for popular stadiums

Typeboolean
Exampletrue
venue_name

Venue name

Typestring
ExampleAnfield
city

Search by city name

Typestring
ExampleLiverpool
slug

Seo friendly alternative to uuid

Typestring
Exampleanfield
venue_id

Filter on venue ID

Typestring
Example7d881550d5ba4cb2b3faca11a9b1695d_vnx

Responses

OK
application/json
JSON
{
"venues": [
{
"venue_id": "7d881550d5ba4cb2b3faca11a9b1695d_vnx",
"official_name": "Anfield",
"country": "GBR",
"popular_stadium": true,
"venue_type": "string",
"capacity": 53394,
"city": "Liverpool",
"latitude": "53.430819",
"longitude": "-2.960827",
"number": "1",
"postalcode": "L4 0TH",
"streetname": "Anfield Road",
"opened": 1892,
"track_length": 4000,
"wikipedia_slug": "Anfield",
"wikipedia_snippet": "Anfield is a football stadium in Anfield, Liverpool, Merseyside, England...",
"slug": "anfield"
}
],
"pagination": {
"total_size": 1,
"page_size": 50,
"next_page": "string",
"previous_page": "string"
}
}

Samples

cURL
curl -X GET \
'https://api.xs2event.com/v1/venues?country=GBR&venue_type=stadium&popular=true&venue_name=Anfield&city=Liverpool&slug=anfield&venue_id=7d881550d5ba4cb2b3faca11a9b1695d_vnx' \
 -H "Content-Type: application/json"
JavaScript
fetch('https://api.xs2event.com/v1/venues?country=GBR&venue_type=stadium&popular=true&venue_name=Anfield&city=Liverpool&slug=anfield&venue_id=7d881550d5ba4cb2b3faca11a9b1695d_vnx', {headers:{'Content-Type':'application/json'}})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$url = 'https://api.xs2event.com/v1/venues';
$method = 'GET';
$headers = [
    'Content-Type' => 'application/json',
];
$query = http_build_query([
    'country' => 'GBR',
    'venue_type' => 'stadium',
    'popular' => 'true',
    'venue_name' => 'Anfield',
    'city' => 'Liverpool',
    'slug' => 'anfield',
    'venue_id' => '7d881550d5ba4cb2b3faca11a9b1695d_vnx',
]);

$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/venues'
params = {
    'country': 'GBR',
    'venue_type': 'stadium',
    'popular': true,
    'venue_name': 'Anfield',
    'city': 'Liverpool',
    'slug': 'anfield',
    'venue_id': '7d881550d5ba4cb2b3faca11a9b1695d_vnx'
}
headers = {
    'Content-Type': 'application/json'
}

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