Skip to content

get_spray_chart

10 creditsMulti-tablePOST /v1/get_spray_chart

Data refreshed · changelog

Where a batter or team hits the ball, by trajectory and field

Use it when you want where a hitter or team puts the ball in play, by field and trajectory, or every ball's location to draw a chart.

Parameters

batter_idstringoptional
teamstringoptional
seasonnumber | stringoptional
Season (a year; default: the latest; ignored with game_id).
include_ballsbooleanoptional
Add each ball in play's x/y (up to 3,000).
season_typeenum: regular | postseason | alloptional
regular, postseason, or all (default): which games' balls in play to count.

Notes

  • Over MCP, ask for it in plain English and the client calls get_spray_chart itself. Point any MCP client at https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY.
  • Each call costs 10 credits, taken before it runs and refunded if the server errors.
  • Not the call you need? Find the right call by what you are trying to answer.

Request

curl -X POST https://mcp.fastballapi.com/v1/get_spray_chart \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "batter_id": "30951",
  "season": 2025
}'

Response

json
{
  "season": 2025,
  "balls_in_play": 395,
  "by_trajectory": [
    {
      "trajectory": "G",
      "balls": 171,
      "hits": 40,
      "hr": 0,
      "hit_rate": 0.234
    },
    {
      "trajectory": "F",
      "balls": 111,
      "hits": 34,
      "hr": 25,
      "hit_rate": 0.306
    },
    {
      "trajectory": "L",
      "balls": 101,
      "hits": 58,
      "hr": 2,
      "hit_rate": 0.574
    }
  ],
  "by_field": [
    {
      "field": "right",
      "balls": 179,
      "hits": 69,
      "hr": 17,
      "hit_rate": 0.385
    },
    {
      "field": "left",
      "balls": 118,
      "hits": 41,
      "hr": 6,
      "hit_rate": 0.347
    },
    {
      "field": "center",
      "balls": 98,
      "hits": 24,
      "hr": 4,
      "hit_rate": 0.245
    }
  ]
}

Response fields

seasonnumber
balls_in_playnumber
by_trajectory[]array
List of objects
by_trajectory[].trajectorystring
by_trajectory[].ballsnumber
by_trajectory[].hitsnumber
by_trajectory[].hrnumber
by_trajectory[].hit_ratenumber
by_field[]array
List of objects
by_field[].fieldstring
by_field[].ballsnumber
by_field[].hitsnumber
by_field[].hrnumber
by_field[].hit_ratenumber

Used in

Related endpoints

Try it

500 free credits every month: 50 calls to get_spray_chart, and no card.