Teams Guide — Fetch by ID, League, or Sport
Overview
The /teams endpoint returns the teams on current events. Use sportID or leagueID for a list, or teamID for a single team (still returned as an array with one object). /players works the same way with eventID, teamID or playerID, and returns the production SGO playerIDs (SONNY_GRAY_1_MLB).
Fetching by team
https://api.sockodds.com/v2/teams?apiKey=YOUR_API_KEY&teamID=BRISBANE_LIONS_AFLcurl -X GET "https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL" -H "x-api-key: YOUR_API_KEY"const response = await fetch("https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { data, nextCursor, notice } = await response.json();
console.log(JSON.stringify(data, null, 2));import requests
response = requests.get("https://api.sockodds.com/v2/teams", params=dict(teamID="BRISBANE_LIONS_AFL"), headers={"x-api-key": "YOUR_API_KEY"})
output = response.json()
print(output["data"])require 'net/http'
require 'json'
uri = URI("https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL")
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = 'YOUR_API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.pretty_generate(JSON.parse(res.body)['data'])<?php
$ch = curl_init("https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$output = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($output['data']);import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL"))
.header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/teams?teamID=BRISBANE_LIONS_AFL", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))Returns something like:
{
"success": true,
"data": [
{ "sportID": "AUSSIE_RULES", "leagueID": "AFL", "teamID": "BRISBANE_LIONS_AFL", "names": { "long": "Brisbane Lions", "medium": "Brisbane Lions", "short": "BRI" }, "colors": { "primary": "", "secondary": "", "primaryContrast": "", "secondaryContrast": "" }, "statEntityID": "home" }
]
}
Fetching by league
https://api.sockodds.com/v2/teams?apiKey=YOUR_API_KEY&leagueID=AFLcurl -X GET "https://api.sockodds.com/v2/teams?leagueID=AFL" -H "x-api-key: YOUR_API_KEY"const response = await fetch("https://api.sockodds.com/v2/teams?leagueID=AFL", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { data, nextCursor, notice } = await response.json();
console.log(JSON.stringify(data, null, 2));import requests
response = requests.get("https://api.sockodds.com/v2/teams", params=dict(leagueID="AFL"), headers={"x-api-key": "YOUR_API_KEY"})
output = response.json()
print(output["data"])require 'net/http'
require 'json'
uri = URI("https://api.sockodds.com/v2/teams?leagueID=AFL")
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = 'YOUR_API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.pretty_generate(JSON.parse(res.body)['data'])<?php
$ch = curl_init("https://api.sockodds.com/v2/teams?leagueID=AFL");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$output = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($output['data']);import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sockodds.com/v2/teams?leagueID=AFL"))
.header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/teams?leagueID=AFL", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))Up to 50 teams per page by default (max 250); a nextCursor is returned when there are more.
Fetching by sport
https://api.sockodds.com/v2/teams?apiKey=YOUR_API_KEY&sportID=RUGBY_LEAGUEcurl -X GET "https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE" -H "x-api-key: YOUR_API_KEY"const response = await fetch("https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { data, nextCursor, notice } = await response.json();
console.log(JSON.stringify(data, null, 2));import requests
response = requests.get("https://api.sockodds.com/v2/teams", params=dict(sportID="RUGBY_LEAGUE"), headers={"x-api-key": "YOUR_API_KEY"})
output = response.json()
print(output["data"])require 'net/http'
require 'json'
uri = URI("https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE")
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = 'YOUR_API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.pretty_generate(JSON.parse(res.body)['data'])<?php
$ch = curl_init("https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$output = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($output['data']);import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE"))
.header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/teams?sportID=RUGBY_LEAGUE", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))Players
https://api.sockodds.com/v2/players?apiKey=YOUR_API_KEY&eventID=afl_2026-09-03_fremantle_vs_hawthorncurl -X GET "https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn" -H "x-api-key: YOUR_API_KEY"const response = await fetch("https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn", { headers: { "x-api-key": "YOUR_API_KEY" } });
const { data, nextCursor, notice } = await response.json();
console.log(JSON.stringify(data, null, 2));import requests
response = requests.get("https://api.sockodds.com/v2/players", params=dict(eventID="afl_2026-09-03_fremantle_vs_hawthorn"), headers={"x-api-key": "YOUR_API_KEY"})
output = response.json()
print(output["data"])require 'net/http'
require 'json'
uri = URI("https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn")
req = Net::HTTP::Get.new(uri)
req['x-api-key'] = 'YOUR_API_KEY'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts JSON.pretty_generate(JSON.parse(res.body)['data'])<?php
$ch = curl_init("https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['x-api-key: YOUR_API_KEY']);
$output = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($output['data']);import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn"))
.header("x-api-key", "YOUR_API_KEY").GET().build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());req, _ := http.NewRequest("GET", "https://api.sockodds.com/v2/players?eventID=afl_2026-09-03_fremantle_vs_hawthorn", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, err := http.DefaultClient.Do(req)
if err != nil { log.Fatal(err) }
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))Player-prop markets put the playerID in the statEntityID slot of the oddID, so a player's props on an event are the odds keys containing their id.