ShotTracker Broadcast Game Day Service
Base URL: https://api.shottracker.com/broadcast/v1
Authentication (Broadcast API)
An API key is required on all Broadcast API endpoints. Pass it as a query parameter or HTTP header.
Games
Schedule and active game data (schedule, active game colors).
- GET/broadcast/v1/games/schedule— Schedule
Requests the ShotTracker game schedule. If from and to are not provided the endpoint will return all games from the time of the request to 1 day into the future. If from and to are provided the endpoint will return only the games during the timeframe. The intention of a from/to search would be in the future as the broadcast service is live and upcoming scheduled games.
- GET/broadcast/v1/games/active/{schedule_id}/colors— Active Game Colors
Returns the team colors for the active game. This endpoint only works with games in an ACTIVE status. It is possible to subscribe to a game before it is active which means once a game marker message is received this endpoint could be called to get the current colors set by ShotTracker game success group. The base team color (color_rgb) is returned under the teams endpoint and can be used to represent the team color however this endpoint represents the exact jersey color each team is wearing at the time of the active game.
Teams
Teams, rosters, officials, conference CSV report, and team/player images.
- GET/broadcast/v1/games/teams— List Teams
Returns all ShotTracker teams.
- GET/broadcast/v1/games/teams/{team_id}— Team Roster
The current active players on the team. The endpoint also returns the players current assigned sensor which can change during a game. The game_event_id parameter can be used to look up all of the players on the team at the time of a game. With this query parameter an additional field is return 'sensor_assignments_history' which indicates the sensor assignments during the game. This field is the same response from the Event API
Players who are no longer on the team will have an 'is_active' false. The special_services field returns items for specific special events; possible type values are MIC, VIDEO.
Basketball Player Positions
Abbreviation Description G GUARD F FORWARD C CENTER - GET/broadcast/v1/games/teams/csv/{conference_name}— Team/Player ID CSV Conference Report
Returns a CSV file containing each team and player ids in the given conference name.
- GET/broadcast/v1/games/officials/teams— Officials Teams
Returns all officials teams.
- GET/broadcast/v1/games/officials/teams/{team_id}— Officials Team Roster
The special_services field returns items for specific special events; possible type values are MIC, VIDEO.
- GET/broadcast/v1/games/teams/{team_id}/images— Team And Player Images
Returns the team and player image links.
Stats
Game stats (test pattern, live SSE, snapshot), and player season stats.
- GET/broadcast/v1/stats/testpattern— Test Pattern Game Stats
This endpoint returns the a zero'ed out stats file for any scheduled, live or ended game. As a test pattern in broadcast, this file is intended to be used as a calibration test of the stats file. Actual stats for live or ended games are not available on this endpoint; the Full Game Stats or Full Game Stats SSE endpoints should be used.
- GET/broadcast/v1/stats/event-stream— Live Game Stats SSE
Opens a Server Sent Events (SSE) connection that will remain open as long as the connection persists. This endpoint will push updated live game stats to the consumer as they occur. The schedule_id from the Schedule endpoint is required. If the connection drops during the game, after reconnecting, the latest game stats file will be pushed. See the Full Game Stats JSON Format for a complete description of each field.
See Code examples (JavaScript and Go) for connecting to this SSE endpoint.
- GET/broadcast/v1/stats— Game Stats
This endpoint returns the latest updated stats for an active or completed game. To receive realtime stats, as they happen, consumers should use the Full Game Stats SSE. See the Full Game Stats JSON Format for a complete description of each field.
- GET/broadcast/v1/seasons/{season}/stats/teams/{team_id}/players— Player Season Stats
Returns the completed games season stats for all players for the given team id.
Locomotion
Locomotion metrics and live metric stream.
- GET/broadcast/v1/locomotion— Metrics
This endpoint returns player locomotion metrics for the game and the given team id.
-
Parameters
-
schedule_id (string) - ID of the scheduled game
-
team_id (number) - ID of the team
-
apikey (string) - The authentication key
-
Response 200 (application/json)
{"metrics": [{"pid": "1","tid": "461","gid": "860e825e-38c2-11ea-9d3b-02422f8cbade","metrics": {"DIST_TOTAL": 167.5,"DIST_SPRINT": 56.9,"DIST_JOG": 80.4,"DIST_WALK": 30.2,"DIST_SPRINT_COUNT": 3.0,"DIST_JOG_COUNT": 5.0,"DIST_WALK_COUNT": 8.0,"ACCEL_HIGH_COUNT": 3.0,"ACCEL_MED_COUNT": 2.0,"ACCEL_LOW_COUNT": 1.0,"DECEL_HIGH_COUNT": 3.0,"DECEL_MED_COUNT": 2.0,"DECEL_LOW_COUNT": 1.0,"VELOCITY_CURR_AVG": 10.2,"VELOCITY_TOP": 12.6 } }]}
-
- GET/broadcast/v1/locomotion/metric-stream— Live Locomotion Metrics SSE
Opens a Server Sent Events (SSE) connection that will remain open as long as the connection persists. This endpoint will push updated live locomotion metrics to the consumer as they occur. The schedule_id is required. If the connection drops during the game, after reconnecting, the latest locomotion metrics file will be pushed.
See Code examples (JavaScript and Go) for connecting to this SSE endpoint.
Fan Experience
Live fan experience item stream.
- GET/broadcast/v1/fan-experience/item-stream— Live Fan Experience SSE
Opens a Server Sent Events (SSE) connection that will remain open as long as the connection persists. This endpoint will push live fan experience items onsumer as they occur. The schedule_id is required. If the connection drops during the game, after reconnecting, only the next live items will be received.
See Code examples (JavaScript and Go) for connecting to this SSE endpoint.
Utilities
Graphics and other utility endpoints (e.g. graphic metrics).
- POST/broadcast/v1/graphics/metrics— Graphic metrics
This endpoint accepts the graphic metrics in usage statistics purposes.