SportsData API
whapi · Media
The William Hill SportsData REST API is a collection of GET methods to provide William Hill product data such as sport, competition, event, market and selection data (including prices).
Authentication
Sample Requests
Retrieves a list of events for the provided IDs.
Hover any highlighted part to learn what it does
| apiKey | example |
curl -X GET "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/?ids=example&sort=id%2Casc&limit=100&fields=example&offset=0&channel=example&culture=example&exclude=example&include=example&settled=true&marketEW=example&marketIds=example&marketSort=example&isPublished=yes&marketCount=1&includeEmpty=true&marketStatus=example&marketChannel=example&headlineSummary=false&marketDisplayed=yes&marketPublished=yes&selectionStatus=example&selectionChannel=example&selectionPublished=yes&includeAllDescendants=false" \ -H "apiKey: example"
import requests
params = {
"ids": "example",
"sort": "id,asc",
"limit": "100",
"fields": "example",
"offset": "0",
"channel": "example",
"culture": "example",
"exclude": "example",
"include": "example",
"settled": "true",
"marketEW": "example",
"marketIds": "example",
"marketSort": "example",
"isPublished": "yes",
"marketCount": "1",
"includeEmpty": "true",
"marketStatus": "example",
"marketChannel": "example",
"headlineSummary": "false",
"marketDisplayed": "yes",
"marketPublished": "yes",
"selectionStatus": "example",
"selectionChannel": "example",
"selectionPublished": "yes",
"includeAllDescendants": "false"
}
headers = {
"apiKey": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/');
url.searchParams.set('ids', 'example');
url.searchParams.set('sort', 'id,asc');
url.searchParams.set('limit', '100');
url.searchParams.set('fields', 'example');
url.searchParams.set('offset', '0');
url.searchParams.set('channel', 'example');
url.searchParams.set('culture', 'example');
url.searchParams.set('exclude', 'example');
url.searchParams.set('include', 'example');
url.searchParams.set('settled', 'true');
url.searchParams.set('marketEW', 'example');
url.searchParams.set('marketIds', 'example');
url.searchParams.set('marketSort', 'example');
url.searchParams.set('isPublished', 'yes');
url.searchParams.set('marketCount', '1');
url.searchParams.set('includeEmpty', 'true');
url.searchParams.set('marketStatus', 'example');
url.searchParams.set('marketChannel', 'example');
url.searchParams.set('headlineSummary', 'false');
url.searchParams.set('marketDisplayed', 'yes');
url.searchParams.set('marketPublished', 'yes');
url.searchParams.set('selectionStatus', 'example');
url.searchParams.set('selectionChannel', 'example');
url.searchParams.set('selectionPublished', 'yes');
url.searchParams.set('includeAllDescendants', 'false');
const response = await fetch(url, {
headers: {
'apiKey': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/")
q := baseURL.Query()
q.Set("ids", "example")
q.Set("sort", "id,asc")
q.Set("limit", "100")
q.Set("fields", "example")
q.Set("offset", "0")
q.Set("channel", "example")
q.Set("culture", "example")
q.Set("exclude", "example")
q.Set("include", "example")
q.Set("settled", "true")
q.Set("marketEW", "example")
q.Set("marketIds", "example")
q.Set("marketSort", "example")
q.Set("isPublished", "yes")
q.Set("marketCount", "1")
q.Set("includeEmpty", "true")
q.Set("marketStatus", "example")
q.Set("marketChannel", "example")
q.Set("headlineSummary", "false")
q.Set("marketDisplayed", "yes")
q.Set("marketPublished", "yes")
q.Set("selectionStatus", "example")
q.Set("selectionChannel", "example")
q.Set("selectionPublished", "yes")
q.Set("includeAllDescendants", "false")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("apiKey", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/")
uri.query = URI.encode_www_form({
"ids" => "example",
"sort" => "id,asc",
"limit" => "100",
"fields" => "example",
"offset" => "0",
"channel" => "example",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"settled" => "true",
"marketEW" => "example",
"marketIds" => "example",
"marketSort" => "example",
"isPublished" => "yes",
"marketCount" => "1",
"includeEmpty" => "true",
"marketStatus" => "example",
"marketChannel" => "example",
"headlineSummary" => "false",
"marketDisplayed" => "yes",
"marketPublished" => "yes",
"selectionStatus" => "example",
"selectionChannel" => "example",
"selectionPublished" => "yes",
"includeAllDescendants" => "false"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["apiKey"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/events/?" . http_build_query([
"ids" => "example",
"sort" => "id,asc",
"limit" => "100",
"fields" => "example",
"offset" => "0",
"channel" => "example",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"settled" => "true",
"marketEW" => "example",
"marketIds" => "example",
"marketSort" => "example",
"isPublished" => "yes",
"marketCount" => "1",
"includeEmpty" => "true",
"marketStatus" => "example",
"marketChannel" => "example",
"headlineSummary" => "false",
"marketDisplayed" => "yes",
"marketPublished" => "yes",
"selectionStatus" => "example",
"selectionChannel" => "example",
"selectionPublished" => "yes",
"includeAllDescendants" => "false"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"apiKey: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Gets a list of all sports
Hover any highlighted part to learn what it does
| apiKey | example |
curl -X GET "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/?sort=id%2Casc&limit=100&fields=example&offset=0&culture=example&exclude=example&include=example&isPublished=yes" \ -H "apiKey: example"
import requests
params = {
"sort": "id,asc",
"limit": "100",
"fields": "example",
"offset": "0",
"culture": "example",
"exclude": "example",
"include": "example",
"isPublished": "yes"
}
headers = {
"apiKey": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/');
url.searchParams.set('sort', 'id,asc');
url.searchParams.set('limit', '100');
url.searchParams.set('fields', 'example');
url.searchParams.set('offset', '0');
url.searchParams.set('culture', 'example');
url.searchParams.set('exclude', 'example');
url.searchParams.set('include', 'example');
url.searchParams.set('isPublished', 'yes');
const response = await fetch(url, {
headers: {
'apiKey': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/")
q := baseURL.Query()
q.Set("sort", "id,asc")
q.Set("limit", "100")
q.Set("fields", "example")
q.Set("offset", "0")
q.Set("culture", "example")
q.Set("exclude", "example")
q.Set("include", "example")
q.Set("isPublished", "yes")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("apiKey", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/")
uri.query = URI.encode_www_form({
"sort" => "id,asc",
"limit" => "100",
"fields" => "example",
"offset" => "0",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"isPublished" => "yes"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["apiKey"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/sports/?" . http_build_query([
"sort" => "id,asc",
"limit" => "100",
"fields" => "example",
"offset" => "0",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"isPublished" => "yes"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"apiKey: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Retrieves a weighted list of Selections.
Hover any highlighted part to learn what it does
| apiKey | example |
curl -X GET "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/?limit=100&Locale=en-US&fields=example&culture=example&exclude=example&include=example&sortName=example&sportIds=example&competitionIds=example¶m_topBetEventId=example" \ -H "apiKey: example"
import requests
params = {
"limit": "100",
"Locale": "en-US",
"fields": "example",
"culture": "example",
"exclude": "example",
"include": "example",
"sortName": "example",
"sportIds": "example",
"competitionIds": "example",
"param_topBetEventId": "example"
}
headers = {
"apiKey": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/');
url.searchParams.set('limit', '100');
url.searchParams.set('Locale', 'en-US');
url.searchParams.set('fields', 'example');
url.searchParams.set('culture', 'example');
url.searchParams.set('exclude', 'example');
url.searchParams.set('include', 'example');
url.searchParams.set('sortName', 'example');
url.searchParams.set('sportIds', 'example');
url.searchParams.set('competitionIds', 'example');
url.searchParams.set('param_topBetEventId', 'example');
const response = await fetch(url, {
headers: {
'apiKey': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/")
q := baseURL.Query()
q.Set("limit", "100")
q.Set("Locale", "en-US")
q.Set("fields", "example")
q.Set("culture", "example")
q.Set("exclude", "example")
q.Set("include", "example")
q.Set("sortName", "example")
q.Set("sportIds", "example")
q.Set("competitionIds", "example")
q.Set("param_topBetEventId", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("apiKey", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/")
uri.query = URI.encode_www_form({
"limit" => "100",
"Locale" => "en-US",
"fields" => "example",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"sortName" => "example",
"sportIds" => "example",
"competitionIds" => "example",
"param_topBetEventId" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["apiKey"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/whapi.com/sportsdata/2/topbets/?" . http_build_query([
"limit" => "100",
"Locale" => "en-US",
"fields" => "example",
"culture" => "example",
"exclude" => "example",
"include" => "example",
"sortName" => "example",
"sportIds" => "example",
"competitionIds" => "example",
"param_topBetEventId" => "example"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"apiKey: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with SportsData API?
SportsData API is a Media API. Developers commonly use media APIs for:
- storing and delivering images, video, and audio
- building digital asset management and media libraries
- transcoding and optimising media for the web
- adding video streaming and playback to your app
- automating content tagging and metadata extraction
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. SportsData API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide