-
-
Notifications
You must be signed in to change notification settings - Fork 109
Function: boxscore_data
Note: To retrieve a formatted text version of the box score, see Function: boxscore.
Note: This function uses the game endpoint instead of game_box, because game_box does not contain the players' names as they should be displayed in the box score (e.g. Last name only or Last, F)
statsapi.boxscore_data(gamePk, timecode=None)
It is possible to get the boxscore as it existed at a specific time by including the timestamp in the timecode parameter.
The timecode should be in the format YYYYMMDD_HHMMSS
, and in the UTC timezone
For example, 4/24/19 10:32:40 EDT (-4) would be: 20190425_012240
A list of timestamps for game events can be found through the game_timestamps endpoint (using the get function):
statsapi.get('game_timestamps',{'gamePk':565997})
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.