Examples
Worked, copy-pasteable walkthroughs that assemble real datasets from the API — one set per sport.
NFL
A box score is one game plus the per-player stat lines for both teams. Find a game, fetch its player stats, and join them back to the players and teams.
season_player_stats holds one row per player per season. Page through the whole season with the keyset cursor, then sort client-side to build any leaderboard.
NBA
A box score is one game plus the per-player stat lines for both teams. Find a game, fetch its player stats, and join them back to the players and teams.
season_player_stats holds one row per player per season. Page through the whole season with the keyset cursor, then sort client-side to build any leaderboard.
MLB
A box score is one game plus the per-player stat lines for both teams. Find a game, fetch its player stats, and join them back to the players and teams.
season_player_stats holds one row per player per season. Page through the whole season with the keyset cursor, then sort client-side to build any leaderboard.
NHL (coming soon)
A box score is one game plus the per-player stat lines for both teams. Find a game, fetch its player stats, and join them back to the players and teams.
season_player_stats holds one row per player per season. Page through the whole season with the keyset cursor, then sort client-side to build any leaderboard.
PGA
The leaderboards table has one row per player per tournament: rank, total score, earnings, FedEx Cup points, and strokes-gained splits. Filter to a golfer to read their season of finishes.
A scorecard is one round broken into 18 holes. List a golfer's rounds, then pull the holes for the round you want.
General
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: