mlb_player_stats
Retrieve one MLB player's season or career statistics by player ID and stat group, with optional season, stat type, and date range filters.
Instructions
Get MLB player season statistics. Returns one MLB player's statistics. 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 career, game logs and splits. Use start_date with end_date for date ranges.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Numeric MLB player id | |
| group | Yes | Stat group | |
| season | No | Four-digit season; defaults to current year | |
| 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 |