Get Play-By-Play NBA SportVU Data
Update 06/14/16: It appears stats.nba.com has taken down the SportVU logs. However, neilmj has posted logs from the 2015-16 season on github, for games through January 23.
SportVU is a video system made by STATS Inc, used by teams to track movement of players and the ball on the court. I looked, but couldn't find anywhere describing how to get play-by-play data, so did some investgating myself. The great stats.nba.com has every game here. Clicking on any of the linked values in the table brings up a popup with an option 'Movement':
Inspecting the network request that goes out when clicking on Movement shows
us that fires off an AJAX request to http://stats.nba.com/stats/locations_getmoments/?eventid=2&gameid=0021500003
We can infer that eventid=2
refers to field goal attempts, and gameid=0021500003
likely refers to the third game in 2015. Indeed, changing the gameid
to 0021400003
returns data for a game dated October 28, 2014, between the Rockets and Lakers.
Once you get the eventid of the type you want, you could theoretically enumerate all the games in a season this way, or across multiple seasons. The response comes in JSON format, and Savvas Tjortjoglou nicely detailed that in this post. Happy number crunching!