Skip to content

Recipes

Task-oriented guides. Each one states a goal, shows the exact sequence of calls, gives working code, and names the traps that are not visible from the reference alone.

Every code sample on these pages has been run against the production API - the payloads and values shown are real responses, not illustrations.

RecipeWhat you getTime
Get a token and make your first callCredential exchange, token caching, first working request5 min
Display a league tableThe two-step navigation from stage to rendered table10 min
Get one match with score and statsReading a score correctly, statistics, timeline10 min
Show a match timelineOrdering, deduplication, corrections, added time, substitutions15 min
Build a livescore boardOne polled endpoint, clock rendering, when to move to push15 min
Display a knockout bracketRounds, nodes and slots into a renderable tree, two-legged ties20 min
Sync incrementally instead of re-fetchingThe timestamp cursor, why the boundary is inclusive12 min
Show top scorers, cards and assists19 ranking types, and why player rows invert participant12 min
Compare two teams head to headAll-time balance, last 10, and the five-level event tree8 min
List a team squadPlayers, departed players and the coach in one array8 min
Build a season calendarA whole season of fixtures with scores, grouped by round12 min

Four things are worth understanding before any recipe, because otherwise the sequences look arbitrary. They are spelled out in the recipes above and expanded in Concepts (sidebar lists every concept page):

  • The payload is in api.data, not at the top level
  • Match state needs three fields - status_type, status_id and relation_status. A postponed match still reports status_type: "scheduled" - see season lifecycle
  • The clock is in seconds and resets each period. played_time is the cumulative total - see time, clocks and timezones
  • There is no score field - you select a result by id from results[] (recipe 03)

On the portal, generated tables replace hand-maintained id lists:

WhereContents
Data referencePer-sport statuses, results, statistics, incidents (from GET /v2/sports/{id})
OpenAPI referenceFull REST surface, including OAuth and query parameters