mlb_stats
Query MLB season stats for hitting, pitching, or fielding, with career or date-range options. Sort and limit results to build top-N leaderboards.
Instructions
Season stats query across players — by group (hitting/pitching/fielding) and type (season, career, byDateRange, ...). Sort + limit for top-N tables.
Returns: {stats:[{type, group, splits:[{season, player, team, stat:{...}}]}]}
Auth: none needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| group | No | Stat group: hitting | pitching | fielding. | hitting |
| limit | No | Max rows. | |
| stats | No | Stat type: season | career | yearByYear | byDateRange | statSplits | ... | season |
| season | No | Season year. | |
| teamId | No | Filter to one team. | |
| sportId | No | Sport id (1 = MLB). | |
| sortStat | No | Stat to sort by (e.g. 'homeRuns'). | |
| playerPool | No | all | qualified | rookies | etc. |