# stat-api

> stat-api is the most comprehensive sports data API. Play-by-play, weather, betting odds, daily fantasy, and prediction markets across NFL, NBA, MLB, NHL, PGA, plus DFS, Kalshi and Polymarket — normalized, cleaned, connected, and reachable through one API key.

## Pages

- [Home](https://stat-api.com): The most comprehensive sports data API. Play-by-play, weather, odds, daily fantasy, Kalshi & Polymarket — every major league, normalized and connected. One API key.
- [Data](https://stat-api.com/data): Every league, every layer. Browse the full stat-api coverage: NFL, NBA, MLB, NHL, PGA, DFS, Kalshi, and Polymarket — play-by-play, weather, odds, and more.
- [Pricing](https://stat-api.com/pricing): Simple, honest sports-data API pricing. One Sport $99/mo, All Sports $199/mo, or a commercial plan. No row caps, no metered surprises.
- [Privacy Policy — stat-api](https://stat-api.com/privacy): How stat-api collects, uses, and protects your account, billing, and API-usage data — and the privacy rights you have.
- [Terms of Service — stat-api](https://stat-api.com/terms): The terms governing use of the stat-api sports data API and website — accounts, subscriptions, acceptable use, data disclaimers, and liability.
- [API Reference](https://stat-api.com/docs/api): Public read-only API surface (GET-only). 8 leagues + 1 reference group, 184 tables.
Every (league, table) pair declared below is reachable as:
  GET /api/v1/{league}/{table}            (paginated list)
  GET /api/v1/{league}/{table}/{id}       (single row when single-col PK)
Tables not declared here are router-edge 404, regardless of handler presence.

- [NFL API Reference — stat-api](https://stat-api.com/docs/api/nfl): Every scheduled and played NFL game — preseason exhibitions, the 18-week regular season, and the playoffs from Wild Card weekend through the Super Bowl — plus the players, teams, coaching staffs, depth charts, injuries, betting markets, and play-by-play behind them.
- [NBA API Reference — stat-api](https://stat-api.com/docs/api/nba): Every NBA game across the 82-game regular season, the In-Season Tournament, the play-in round, and the four-round playoffs through the Finals — with the players, coaching staffs, depth charts, injuries, betting markets, and possession-level play-by-play behind them.
- [MLB API Reference — stat-api](https://stat-api.com/docs/api/mlb): Every MLB game from spring training through the World Series — the 162-game regular season, the postseason bracket, plus the players, ballparks, umpires, weather, Statcast metrics, and pitch-by-pitch detail.
- [NHL (coming soon) API Reference — stat-api](https://stat-api.com/docs/api/nhl): Every NHL game across the 82-game regular season and the four-round Stanley Cup Playoffs — with the players, forward lines, defensive pairings, goalie depth, scoring plays, penalties, and game-odds behind them. Data coming soon to production.
- [PGA API Reference — stat-api](https://stat-api.com/docs/api/pga): Every professional golf tournament — the four majors, the PGA Tour stops, the FedExCup playoffs — broken down to the round, leaderboard, hole-by-hole and shot-by-shot ShotLink/TrackMan tracking, and the players, courses, season-long stats, and tournament odds behind them.
- [Kalshi API Reference — stat-api](https://stat-api.com/docs/api/kalshi): Kalshi's prediction-market exchange — binary YES/NO contracts on NBA games (winner, spread, and total markets) from the 2025-26 season onward, with event-driven price candles, the public trade tape, and on-exchange settlement results.
- [Polymarket API Reference — stat-api](https://stat-api.com/docs/api/polymarket): Polymarket's on-chain prediction markets — events and the YES/NO outcome tokens that trade against them, with token-level snapshots, OHLC candles, price history, order books, and the full public trade tape.
- [DFS API Reference — stat-api](https://stat-api.com/docs/api/dfs): Daily-fantasy contest data across operators — the slates (operator + league + game pool + scoring rules), their game pools, player pools with salaries and positions, projection sources and projections, and the contests with their entrants, submitted lineups, and per-lineup player rosters.
- [Reference API Reference — stat-api](https://stat-api.com/docs/api/reference): Cross-league reference data — the operators (DFS sites, sportsbooks, data providers) that every operator_id filter on the public API points at. Exactly one table from schema `main` is exposed; everything else in that schema is private.
- [Examples — stat-api docs](https://stat-api.com/docs/examples): Worked examples and per-endpoint recipes for the stat-api REST API.
- [Build an NBA box score — stat-api docs](https://stat-api.com/docs/examples/build-a-box-score): Resolve a game, then pull per-player stats for both teams to assemble a complete box score from the NBA API.
- [Join Kalshi/Polymarket markets to games — stat-api docs](https://stat-api.com/docs/examples/join-markets-to-games): Resolve a prediction-market contract to the underlying sporting event using the polymorphic (league_code, competition_id) pair.
- [Quickstart — stat-api docs](https://stat-api.com/docs/examples/quickstart): Authenticate with a Bearer key, make your first GET request, and page through results with limit + from_id.
- [Data Dictionary — stat-api docs](https://stat-api.com/docs/data-dictionary): Every table, field, type, and relationship across the stat-api data model — the full schema and how it connects.
- [Quickstart — stat-api docs](https://stat-api.com/docs/quickstart): Authenticate, make your first request, and paginate the stat-api REST API.

## API

- [API reference](https://stat-api.com/docs/api): live, runnable docs for every endpoint
- [OpenAPI spec](https://api.stat-api.com/api/openapi-public.json): machine-readable OpenAPI 3.1

## Key facts

- Sports & markets: NFL, NBA, MLB, NHL, PGA (golf), DFS, Kalshi, Polymarket
- Depth: possession-level NBA play-by-play, pitch-by-pitch MLB Statcast, ShotLink/TrackMan golf shots, NFL Next Gen Stats, stadium weather, betting odds
- Auth: API key sent as a Bearer token; shared trial key `trial_demo` for exploring the docs
- Pagination: cursor-based via `limit` + `from_id` (keyset, stable, complete)
- Base URL: https://api.stat-api.com/api/v1/{league}/{table}
- Pricing: One Sport $99/mo (300 req/min), All Sports $199/mo (1,200 req/min; 50% off launch deal), Commercial (contact)
