Quickstart — First API Call in 5 Minutes
A complete, copy-paste tutorial to fetch Australian odds.
Step 1: Get your API key
- Sign up at sockodds.com/signup
- Copy the key it shows you — it is shown once
- Keep it handy for the next step
Step 2: Make a request
- Copy one of the examples below into a file
- Replace
YOUR_API_KEYwith your actual API key - Run it!
https://api.sockodds.com/v2/events?apiKey=YOUR_API_KEY&leagueID=AFL,NRL&oddsAvailable=truecurl -X GET "https://api.sockodds.com/v2/events?leagueID=AFL,NRL&oddsAvailable=true" -H "x-api-key: YOUR_API_KEY"const response = await fetch("https://api.sockodds.com/v2/events?leagueID=AFL,NRL&oddsAvailable=true", { 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/events", params=dict(leagueID="AFL,NRL", oddsAvailable="true"), 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/events?leagueID=AFL,NRL&oddsAvailable=true")
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/events?leagueID=AFL,NRL&oddsAvailable=true");
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/events?leagueID=AFL,NRL&oddsAvailable=true"))
.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/events?leagueID=AFL,NRL&oddsAvailable=true", 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))Step 3: See live odds
You'll get a response like this (trimmed to one market):
{
"success": true,
"nextCursor": "afl_2026-09-03_fremantle_vs_hawthorn",
"data": [
{
"eventID": "afl_2026-09-03_fremantle_vs_hawthorn",
"sportID": "AUSSIE_RULES",
"leagueID": "AFL",
"type": "match",
"teams": {
"home": { "teamID": "FREMANTLE_AFL", "names": { "long": "Fremantle", "medium": "Fremantle", "short": "FRE" }, "statEntityID": "home" },
"away": { "teamID": "HAWTHORN_AFL", "names": { "long": "Hawthorn", "medium": "Hawthorn", "short": "HAW" }, "statEntityID": "away" }
},
"status": { "started": false, "ended": false, "cancelled": false, "live": false, "finalized": false, "oddsPresent": true, "oddsAvailable": true, "startsAt": "2026-09-03T09:40:00Z", "displayLong": "Upcoming" },
"info": { "displayName": "Hawthorn @ Fremantle", "commenceTime": "2026-09-03T09:40:00Z", "lastUpdatedAt": "2026-09-03T08:27:48.000Z", "stale": false },
"odds": {
"points-all-game-eo-odd": {
"oddID": "points-all-game-eo-odd",
"opposingOddID": "points-all-game-eo-even",
"marketName": "Odd/Even Total Points",
"statID": "points",
"statEntityID": "all",
"periodID": "game",
"betTypeID": "eo",
"sideID": "odd",
"bookOdds": "-116",
"fairOdds": null,
"bookOverUnder": null,
"bookSpread": null,
"byBookmaker": {
"unibet": {
"bookmakerID": "unibet",
"odds": "-115",
"decimal": 1.87,
"available": true,
"lastUpdatedAt": "2026-09-03T10:22:09.000Z"
},
"tabtouch": {
"bookmakerID": "tabtouch",
"odds": "-118",
"decimal": 1.85,
"available": true,
"lastUpdatedAt": "2026-09-03T10:21:03.000Z"
}
}
}
},
"links": { "bookmakers": { "sportsbet": "https://www.sportsbet.com.au/betting/australian-rules/afl/…", "tab": "https://www.tab.com.au/sports/betting/Australian%20Rules/competitions/AFL/matches/…" } },
"players": {}
}
]
}
Understand the response
Event details:
eventID— unique identifier for this gameteams.home.names.long— home teamstatus.startsAt— when the game starts (UTC)info.stale— whether the source has stopped writing this event
Odds data: each odd is keyed by oddID, which follows this pattern:
{statID}-{statEntityID}-{periodID}-{betTypeID}-{sideID}Note: the oddID does NOT include bookmakerID. Each oddID contains odds from ALL available bookmakers nested under byBookmaker.
Example: points-home-game-ml-home means:
points— stat being bet on (the score)home— entity (home team)game— the full gameml— head to head / moneyline (betTypeID)home— side of the bet
The odds show:
- Each oddID contains odds from multiple bookmakers under
byBookmaker - Every book carries
odds(American string) anddecimal - All odds values are strings, not numbers —
decimalis a number
Done!
Congratulations! You just fetched Australian odds from the SockOdds API.
Next steps
Build something real
- Live Odds Tracker — track line movement
- Arbitrage Calculator — find cross-book margins
- Odds Comparison Dashboard
- Player Props Analyzer
- Parlay Builder
Learn the basics
Use the SDK
npm install sports-odds-api
pip install sports-odds-api
gem install sports-odds-api
go get github.com/SportsGameOdds/sports-odds-api-goExplore all endpoints
Common next questions
How do I get odds from multiple bookmakers?
By default every bookmaker your plan allows is returned under byBookmaker. Filter with bookmakerID=sportsbet,tab, or in code: Object.entries(odd.byBookmaker). All bookmakers →
How do I get event status?
It is on every event: status.started, status.live, status.ended, status.finalized; filter with live=true.
How do I get historical data?
Use startsAfter and startsBefore with finalized=true. Finished events are retained from 2026-09.
How often should I poll?
Every 2–5 minutes. The source refreshes every ~2 minutes, so faster polling wastes quota. Best practices →
What counts as an "object"?
One event (game) with ALL its markets and ALL its bookmakers. 10 events = 10 objects; the same 10 polled twice = 20.