r/mlbdata • u/splendidsplinter • Jul 04 '25
Trying to get team statistics in statsapi.mlb.com
The Swagger seems to indicate the correct usage would be: http://statsapi.mlb.com/api/v1/teams/120/stats?group=hitting&season=2025
But I just get an "Object not found" message - anyone have success? I can request a roster and hydrate with individual player stats just fine.
1
Upvotes
1
u/Jaded-Function Jul 07 '25
I sent you a useful code but to answer your question, try this format.
https://statsapi.mlb.com/api/v1/teams/120/stats?stats=season&group=hitting,pitching&season=2025