Introduction
Statpad serves live sports data two ways that share one data model:
- REST for schedules, games, play-by-play, drives, box scores, game rosters, teams, players and NFL injuries. Endpoints for depth charts, transactions and leaders are in place but not filled yet; Coverage by league lists what each league has.
- A WebSocket stream that pushes every change to those entities as it happens, in order, with nothing missed.
Every entity has the same JSON in both. A stream message carries an entity’s full current state, so a client keeps a map keyed by entity type and id and replaces entries as changes arrive.
Going live
- Read the game over REST. The response includes
seq, the stream position it reflects. - Open the stream and subscribe to
game:<id>with that seq as the resume point. - Apply each change in seq order. After a disconnect, reconnect and resume from the last seq you applied.
Authenticate both with your API key as Authorization: Bearer <key>.