API Cheat Sheet — Quick Reference
- Get an API key here. It is shown once.
- Place it in the
apiKeyquery param or thex-api-keyheader. - A full list of endpoints and parameters is in the reference.
- Responses are JSON. The
datafield contains what you queried for. - Use the Data Explorer to see the schema.
- The most-used endpoint is
/events. Common params:oddsAvailable=true,leagueID=AFL,NRL,oddID=points-home-game-ml-home,includeAltLines=true.
Endpoints
The API is on version 2, so each endpoint is prefixed with https://api.sockodds.com/v2. For example the /leagues endpoint is at https://api.sockodds.com/v2/leagues. The main endpoint for odds and status is /events.
| I want… | Call |
|---|---|
| upcoming AFL events with all odds | /v2/events/?leagueID=AFL |
| one event | /v2/events/?eventID=afl_2026-09-03_fremantle_vs_hawthorn |
| just the head to head on every NRL event | /v2/events/?leagueID=NRL&oddID=points-home-game-ml-home&includeOpposingOdds=true |
| only two bookmakers | /v2/events/?leagueID=AFL&bookmakerID=sportsbet,tab |
| events that finished already | /v2/events/?leagueID=MLB&finalized=true |
| the next page | /v2/events/?leagueID=EPL&cursor={nextCursor} |
| which leagues exist right now | /v2/leagues/ |
| which markets exist for a league | /v2/markets/?leagueID=AFL |
| which stats a sport prices | /v2/stats/?sportID=CRICKET |
| players on an event | /v2/players/?eventID=… |
| my limits and usage | /v2/account/usage |
Authentication
All requests require an API key. Header:
fetch("https://api.sockodds.com/v2/events", { headers: { "x-api-key": "your-api-key-here" } });Or query param:
fetch("https://api.sockodds.com/v2/events?apiKey=YOUR_API_KEY_GOES_HERE");
Response format
{
"success": true,
"data": [...],
"nextCursor": "...",
"notice": "..."
}success tells you whether the request succeeded. data is the list of objects you queried for. nextCursor is the cursor for the next page where paging applies. notice is present only when your plan filtered the response. Errors carry success: false and error.
Example request
https://api.sockodds.com/v2/events?leagueID=AFL,NRL&oddsAvailable=true&limit=1&apiKey=YOUR_API_KEYleagueID=AFL,NRL— only AFL and NRL eventsoddsAvailable=true— only events with open marketslimit=1— one event; results are ordered by eventIDapiKey=…— authenticates the request
Data schema
The best way to get a sense of the data is the Data Explorer. In general it is organised as:
- Sports
- Leagues — each sport has one or more
- Teams — each league has one or more
- Events — each team has one or more
The core unit is the Event. It contains all odds markets for that event at Event.odds.<oddID>, and bookmaker-specific data at Event.odds.<oddID>.byBookmaker.<bookmakerID>.
Each oddID combines:
statID— the statistic (points, disposals, tries…)statEntityID— whose performance (home, away, all, a playerID)periodID— the period (game, 1h, 1q…)betTypeID— the type of bet (sp, ml, ou…)sideID— the side (home, away, over, under…)