Sports catalog
curl --request GET \
--url https://api.worm.wtf/sports/import requests
url = "https://api.worm.wtf/sports/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/sports/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.worm.wtf/sports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.worm.wtf/sports/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/sports/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/sports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "Basketball",
"slug": "basketball",
"leagues": [
{ "name": "NBA", "slug": "nba" }
]
}
],
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Sports
Sports catalog
List sports and leagues for sport/league filters on markets, events, and search.
GET
/
sports
/
Sports catalog
curl --request GET \
--url https://api.worm.wtf/sports/import requests
url = "https://api.worm.wtf/sports/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.worm.wtf/sports/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.worm.wtf/sports/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.worm.wtf/sports/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.worm.wtf/sports/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.worm.wtf/sports/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": [
{
"name": "Basketball",
"slug": "basketball",
"leagues": [
{ "name": "NBA", "slug": "nba" }
]
}
],
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}
Use this endpoint to discover valid
sport and league slugs before calling List markets, List events, or Search.
Query Parameters
This endpoint does not accept query parameters today.Use slugs from this catalog on List markets, List events, and search endpoints:
sport— comma-separated sport slugs (for examplebasketballorbasketball,football).league— comma-separated league slugs from each sport’sleaguesarray. You must also send a matchingsporton the same request.
Response
array
Sports catalog rows.
Show Data fields
Show Data fields
string
Display name of the sport.
string
Sport slug. Pass this value in comma-separated
sport query parameters on list and search endpoints.array
Leagues under this sport. Each item:
object
Empty object on success for this endpoint.
object | null
null on success. Error object on failed requests.{
"data": [
{
"name": "Basketball",
"slug": "basketball",
"leagues": [
{ "name": "NBA", "slug": "nba" }
]
}
],
"meta": {},
"error": null
}
{
"data": null,
"meta": null,
"error": {
"code": -17,
"slug": "throttled",
"message": "Request was throttled.",
"details": []
}
}
{
"data": null,
"meta": null,
"error": {
"code": -3,
"slug": "internal_error",
"message": "An internal error occurred.",
"details": []
}
}