get_spray_chart
Read-only
Use for where a batter or team hits the ball: balls in play by trajectory (ground ball, line drive, fly ball, pop-up) and by field (left, center, right), with hit rates; include_balls adds each ball's location for drawing. Costs 10 credits.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| team | No | ||
| season | No | Season (a year; default: the latest; ignored with game_id). | |
| batter_id | No | ||
| include_balls | No | Add each ball in play's x/y (up to 3,000). |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| balls | No | ||
| season | Yes | ||
| by_field | Yes | ||
| balls_note | No | ||
| balls_in_play | Yes | ||
| by_trajectory | Yes |