mlb_team_stats
Get MLB team season statistics by team ID and stat group, with optional season, stat type, and date range filters.
Instructions
Get MLB team season statistics. Returns one MLB team's statistics. team_id and group (hitting, pitching, fielding, catching, running, game, team or streak) are required. season defaults to the current year and stat_type to season. Other stat_type values cover splits and logs. Use start_date with end_date for date ranges.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | Yes | Statistics group | |
| season | No | Four-digit season | |
| team_id | Yes | Numeric MLB team id | |
| end_date | No | End date for byDateRange stat types; requires start_date | |
| game_type | No | MLB game type | |
| stat_type | No | Stats API stat type; defaults to season | |
| start_date | No | Start date for byDateRange stat types; requires end_date | |
| opponent_team_id | No | Required by vsTeam stat types | |
| opponent_player_id | No | Required by vsPlayer stat types |