Examples
Worked, copy-pasteable walkthroughs that assemble real datasets from the API.
Guides
A box score is one game plus the per-player stat lines for both teams. Here we find a game, then fetch its player stats and join them to the players and teams.
Betting and prediction-market rows reference an underlying event through a polymorphic (league_code, competition_id) pair. competition_id points at a team sport's games.id (or golf.tournaments.id). Here's how to connect a Kalshi market to the NBA game it settles on.
Every endpoint is a GET under https://api.stat-api.com/api/v1/{league}/{table}. Authentication is a single API key sent as a Bearer token. You can explore with the shared trial key right away, then swap in your own key for unrestricted access.
Per-endpoint recipes
Every endpoint in the API reference ships runnable curl / JavaScript / TypeScript / Python snippets you can execute against the trial key in the browser. Jump straight to a league: