Pitches per inning
apelt001 opened this issue · 3 comments
apelt001 commented
Is there an easy way to get pitches per inning for a given gamePk? I can't seem to find out which timecodes correspond to end of innings.
toddrob99 commented
Pitch data is in the game endpoint...
For example, go here: https://statsapi.mlb.com/api/v1.1/game/661722/feed/live and find liveData > plays > allPlays. That is a list of plays in the game, and you'll find the inning in the about dict along with the pitches in the playEvents (list use pitchIndex to know which playEvents are pitches).
apelt001 commented
Wow this is great, thank you. What about if I just want pitch count per inning by pitcher. Would I have to code that up myself?
toddrob99 commented
I think so... It has total pitches for each pitcher, but not broken down by inning as far as I have seen.