# SportWizzard > The sports betting data API — sportsbook and DFS odds, players, teams, box-score stats, historical prices, and game context in one canonical schema. Build your own models on it. **Billing status:** Free API signup is open. Usage is not currently metered, and paid subscriptions are paused. Any credit costs and plan limits described below are planned and are not currently enforced. ## Instructions for coding agents - Base URL: `https://api.sportwizzard.com` — all endpoints under `/api/v1`, JSON envelope `{success, data, nextCursor, meta}`. - Auth: `X-Api-Key: ` header, or `Authorization: Bearer ` — both accepted. Free API signup is open; create a key at https://sportwizzard.com/account → API Keys tab. - Pricing status: usage is not currently metered, and paid signup is paused. Credit costs and limits described in the full docs are planned, not enforced. - Bulk pulls: use `GET /api/v1/snapshot` (the entire live board, gzip) instead of paging `/odds` — then stay in sync with `GET /api/v1/odds/updated?since=` or ETag + `If-None-Match`. - Don't poll `/api/v1/edges` or `/api/v1/arbitrage` faster than every 20s — the board doesn't refresh faster than that. - Reference endpoints (`/competitions`, `/seasons`, `/sportsbooks`, `/competitors`, `/players`, `/markets`, `/status`) provide catalog and status data. Call `GET /api/v1/competitions` first — leagues are seasonal, and an out-of-season league returns a valid empty `data: []`. - Machine-readable docs: [openapi.json](https://sportwizzard.com/openapi.json) · [llms-full.txt](https://sportwizzard.com/llms-full.txt) · [docs.md](https://sportwizzard.com/docs.md). Hosted MCP: `https://mcp.sportwizzard.com/mcp` (Streamable HTTP, `Authorization: Bearer `). SportWizzard is a REST API for sports betting data. It ingests odds from supported sportsbooks and DFS platforms (including PrizePicks, Underdog, FanDuel, DraftKings, BetMGM, and Pinnacle) and normalizes them into one schema: events, odds, players, teams, box-score stats, historical prices, and per-game context. Pull the live snapshot in a gzip request, or query data to train and run your own models. DFS edges and cross-book arbitrage are derived signals. Base URL: `https://api.sportwizzard.com`. All endpoints live under `/api/v1` and return JSON in a consistent envelope (`{success, data, nextCursor, meta}`). Send an `X-Api-Key` header with API requests. Lists use opaque cursor pagination via `nextCursor` → `?cursor=`. ## Docs - [Getting Started](https://sportwizzard.com/developers): Base URL, authentication, response envelope, pagination, and freshness/caching. - [Agent quickstart](https://sportwizzard.com/developers/agents): Copy-paste curl + MCP setup for Claude Code, Codex, and other AI agents. - [Interactive API Reference](https://sportwizzard.com/developers/reference): Explore the v1 endpoints. - [Full documentation (markdown)](https://sportwizzard.com/llms-full.txt): Every endpoint with example requests and responses. - [Single-file API doc (markdown)](https://sportwizzard.com/docs.md): Quickstart curl, endpoint index, credit costs, rate-limit etiquette, and MCP setup in one agent-consumable page. - [OpenAPI specification](https://sportwizzard.com/openapi.json): Machine-readable OpenAPI 3 spec — the source of truth for the API. - [AGENTS.md](https://sportwizzard.com/AGENTS.md): Agent-facing project guide (the cross-tool standard Codex and other agents read). - [Hosted MCP server](https://mcp.sportwizzard.com/mcp): Streamable HTTP, bearer-key auth, no install — `claude mcp add --transport http sportwizzard https://mcp.sportwizzard.com/mcp --header "Authorization: Bearer sw_live_..."`. Also available as an [open-source stdio server](https://github.com/sportwizzard/sportwizzard-mcp) (20 tools, mock mode) — install with `npx -y sportwizzard-mcp` ([npm](https://www.npmjs.com/package/sportwizzard-mcp)). ## Authentication - Send your API key in the `X-Api-Key` request header. Example: `curl "https://api.sportwizzard.com/api/v1/events?competition=mlb" -H "X-Api-Key: sw_live_..."`. `Authorization: Bearer ` is also accepted (MCP-client convention). - Keys are created and managed at [your account](https://sportwizzard.com/account) under the API Keys tab. - Send an API key with requests. Free API signup is open; usage is not currently metered and paid signup is paused. - Signed-out callers, website sessions and Free-plan keys get names and sides. An API key on a paid plan also gets `competitorId`/`playerId` on event participants, `playerId` on odds, edge and arbitrage rows, and source references. These routes send `Vary: Authorization, X-Api-Key`; paid-plan responses are `Cache-Control: private`. ## Leagues rotate — check before you assume "no data" - Leagues are seasonal. `GET /api/v1/competitions` returns only leagues with an in-progress season right now — call it first. A league not in that list (e.g. `nba`/`nfl` outside their season) returns a **valid, empty** `data: []`, not an error — that means "out of season," not "broken." When that happens on `/odds`, `/events`, or `/edges`, the response's `meta.note` explains it automatically, e.g. `"No league in [nba] currently has an in-progress season... Active leagues right now: mlb, wnba, ..."` — no extra call needed to diagnose an empty result. ## Endpoints - Events: `/api/v1/events` (filter by competition/competitor_id/player_id/status/time; each event lists `participants` — side 1/2, `sideLabel` home/away for team sports, position, name), `/api/v1/events/{id}` (enriched detail — each side's score, the latest live `state` {status, period, clock, side1Score, side2Score, source, observedAt}, venue, and `context` with weather, lineups, probable pitchers), `/api/v1/events/{id}/stats` (full box score — team + per-player stat blobs), `/api/v1/events/{id}/odds`, `/api/v1/events/active` - Odds: `/api/v1/odds` (scope by competition/sportsbook/market/event_id/player_id/competitor_id, plus `scope=event|season|tournament` — see "Futures" below; rows carry the canonical `outcomeCode` (OVER, UNDER, YES, NO, WIN, DRAW, NEITHER, WIN_OR_DRAW, EITHER, ODD, EVEN, SCORE, RANGE, OTHER, LABEL — a moneyline leg is WIN with its side), `side` 1/2 or absent for the event side the outcome is about, `outcomeParticipants` [{kind: competitor|player, name}] as the source sent them, and `side1Score`/`side2Score` on exact-score outcomes), `/api/v1/odds/updated?since=` (delta feed), `/api/v1/players/{id}/odds`, `/api/v1/competitors/{id}/odds` - **Market vocabulary (read before filtering player props):** on `/odds`, the `market` filter matches the broad **family** — `PLAYER_TOTAL`, `PLAYER_MILESTONE`, `PLAYER_YES_NO`, `MONEYLINE`, `SPREAD`, `TOTAL`, … — while the specific stat lives in each row's `marketSubtype` (`PLAYER_TOTAL_POINTS`, `PLAYER_TOTAL_TOTAL_BASES`, `PLAYER_TOTAL_RBIS`, …). So to get player props, filter `?market=PLAYER_TOTAL` and narrow on `marketSubtype` client-side — **`?market=PLAYER_TOTAL_TOTAL_BASES` returns empty** because that string is a *subtype*, not a family. (The derived `/edges` feed differs: it puts the subtype directly in `market` plus a lowercase `statType`.) Enumerate live subtypes via `GET /api/v1/markets/active`. See docs.md → "Market vocabulary" for a full example. - Stats: `/api/v1/players/{id}/stats`, `/api/v1/competitors/{id}/stats`, `/api/v1/stats/players` (bulk player box stats, filter by event_id/competitor_id/player_id, cursor-paginated) - Snapshot: `/api/v1/snapshot` (the live board as one gzip blob, ETag + `If-None-Match` 304 support). Add `?include_history=true` (paid-plan keys only) to populate every selection's `selectionPrice` rows, oldest first, `{observedAt, lastObservedAt, priceAmerican, priceDecimal, dfsMultiplier, suspended (only when true), liquidityTier (exchanges only)}` — identical schema either way (`selectionPrice` is null when not requested), so the same client code reads both. Credit costs below are planned; usage is not currently metered. - Reference (free): `/api/v1/competitions`, `/api/v1/seasons?year=`, `/api/v1/sportsbooks`, `/api/v1/competitors`, `/api/v1/players`, `/api/v1/markets`, `/api/v1/markets/active`, `/api/v1/status` - Historical: `/api/v1/historical/odds`, `/api/v1/historical/arbitrage` - Edges & Arbitrage (derived signals): `/api/v1/edges`, `/api/v1/arbitrage` - Account: `/api/v1/account/usage` (account plan and API usage details) ## Futures — season-long markets (`marketScope`, `segment`, `?scope=`) - Season-long futures (division/conference/championship winners, awards, season leaders, team win totals, season-long player props) ride the same `/api/v1/odds` feed as game markets. Split them out with **`?scope=season`** — or `?scope=event` for game markets only, `?scope=tournament` for tournament outrights (golf). Matching is **exact**: `season` does not include `TOURNAMENT`. Omitting `scope` returns all scopes (unchanged default). An unrecognized value returns `400 invalid_parameter` naming the valid values, so a typo can never masquerade as "no futures exist". Only `/odds` accepts `scope`; the other odds feeds ignore it. - **Three orthogonal axes — don't collapse them.** `marketScope` = what the market is about (`SEASON` or `TOURNAMENT`; **omitted entirely on ordinary game rows**, so absent means event scope). `period` = the window *within* that season (`REG_SEASON` settles at the end of the regular season — division winner, win totals; `FULL` settles through the playoffs — Super Bowl/World Series winner). `segment` = which slice of the competition (`AFC_EAST`, `NFC`, `AL`, `NL_WEST`, `EAST`, `SEC`, `BIG_TEN`, …), present only when the market is segment-scoped. Both new fields appear on every odds-row feed; only the *query param* is `/odds`-only. - **`segment` is load-bearing — read it or you will misread the board.** All 32 NFL `DIVISION_WINNER` selections share **one** `seasonId` (their `eventId` is null). Group by `(seasonId, marketSubtype, segment)`, never by `eventId`, or eight 4-team division races collapse into what looks like a single 32-team race. - **Filter by family, not subtype:** winner/award futures live in the `CATEGORICAL` family — use `?market=CATEGORICAL` and narrow on `marketSubtype` client-side. `?market=DIVISION_WINNER` returns **empty** (same family-vs-subtype rule as player props). Season futures also appear under `TEAM_TOTAL` (win totals), `YES_NO` (e.g. `TO_MAKE_PLAYOFFS`), and `PLAYER_TOTAL` — a `PLAYER_TOTAL_PASS_YARDS` row with `marketScope: "SEASON"` is a **full-season** line (e.g. `line: 3750.5`), not a game line. - **`eventStartTime` on a futures row is not a kickoff.** It is the season's end date — server-normalized, always present, and **identical for every book on that season** (so it is safe to group on, but never render it as a game time). - **Futures are deliberately excluded from `/api/v1/edges` and `/api/v1/arbitrage`** — season- and tournament-scope markets never enter the no-vig/edge math. That is a fail-closed product decision, not a coverage gap. Structurally most futures are one-sided anyway: `CATEGORICAL` winner/award markets carry one `WIN` selection per competitor, naming the team in `outcomeParticipants`, with no `side` and no opposing `NO` side on most books. - Cross-book, every book's futures for one competition carry the **same** `seasonId` (and `eventId: null`) — so a single `seasonId` spans all books' Super Bowl prices. ## Pricing - [Pricing](https://sportwizzard.com/pricing): Free signup is open; paid signup is paused. The page lists planned tiers, prices, credit costs, and limits. Usage is not currently metered.