team_season_batting_stats
Retrieve comprehensive batting statistics for an entire MLB team's roster during a specific season, including individual player data like plate appearances, home runs, averages, and WAR.
Instructions
Full-season actual batting stats for one MLB team (entire roster).
Uses FanGraphs when available; if that fails or returns no rows, falls back to scraping Baseball Reference's team page (same numbers as the site: PA, HR, AVG/OBP/SLG, OPS+, WAR, etc.).
Args:
team: 3-letter team abbreviation — same as Baseball Reference
(e.g. PHI, NYY, LAD, ARI).
season: Calendar year of the season (e.g. 2025).
min_plate_appearances: Minimum PA to include on the FanGraphs pull (default 1).
Ignored for the BRef fallback, which lists everyone who appeared.
player_name: Optional. Restrict to one player (e.g. Bryce Harper).
Use this for “Phillies lineup stats”, “Yankees 2024 hitters”, etc. For league
leaderboards without a team filter, use season_batting_stats instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team | Yes | ||
| season | Yes | ||
| min_plate_appearances | No | ||
| player_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |