DEVELOPERS

Hoopsalytics Data APIs

Pull team stats, play-by-play event logs and box scores for your program's games as JSON.

Overview

AUTHENTICATION
All requests require an API key, passed as the apikey parameter.
FORMAT
Data is returned in JSON format.
PERCENTAGES
Percent values with a zero denominator are returned as None.

Obtaining an API Key

All API requests use a unique API key tied to each program account.

  1. Log into the account as an Admin.
  2. Go to Account → Settings and locate the API key at the bottom of the page.

Keep your key private. Anyone with the key can read your program's game data. An Admin can refresh the key from the Settings page at any time.

Endpoints

Game Summaries (Team Stats)

GET

Returns TEAM stats for a specific game (the same numbers shown on the Game Summary page).

REQUEST
/dataapi/get-summary.php?game_id=GAME_ID&apikey=APIKEY
PARAMETERS
NAMEDESCRIPTION
game_idThe Hoopsalytics game ID.
apikeyYour program's API key.
EXAMPLE

Play by Play

GET

Returns an event log (play-by-play) for a specific game.

REQUEST
/dataapi/play-by-play.php?game_id=GAME_ID&apikey=APIKEY
PARAMETERS
NAMEDESCRIPTION
game_idThe Hoopsalytics game ID.
apikeyYour program's API key.
NOTES
  • (x, y) coordinates for location events are in inches. (0, 0) is the top left corner of the court.
  • video_time and clock_time (estimated) are in 1/10ths of seconds.
EXAMPLE

Box Score

GET

Returns totals for one or more games, for a specific team. No per-game or per-32 / per-40 calculations are performed.

REQUEST
/dataapi/show.php?team_id=TEAM_ID&games_list=GAMES&apikey=APIKEY
PARAMETERS
NAMEDESCRIPTION
team_idThe Hoopsalytics team ID.
games_listOne or more game IDs, comma separated.
apikeyYour program's API key.
NOTES
  • Time data is in 1/10ths of seconds.
  • JSON is keyed team_idplayer_id → box score data.
  • In V1, some player IDs may not belong to that team (i.e. the opponent), but you can loop through the player data and get player names and their team IDs.
EXAMPLE

Need a different data feed, or have questions about the API?

Contact us