Skip to content

get_pitches

10 creditsMulti-tablePOST /v1/get_pitches

Pitch-by-pitch: count, type, velocity, location, result

Use it when you need every pitch: a game in order, or a pitcher's season with type, velocity, location and count.

Parameters

game_idstringoptional
pitcher_idstringoptional
batter_idstringoptional
seasonnumber | stringoptional
Season (a year; default: the latest; ignored with game_id).
pitch_typestringoptional
ESPN abbreviation, e.g. FF, SL, CH, CU, SI, FC.
limitintegeroptional
Max pitches (default 500).
offsetintegeroptional

Notes

  • Over MCP, ask for it in plain English and the client calls get_pitches 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_pitches \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "game_id": "401569531",
  "limit": 3
}'

Response

json
{
  "pitches": [
    {
      "game_id": "401569531",
      "at_bat_id": "4015695310001",
      "pitch_number": 1,
      "inning": 1,
      "half": "top",
      "pitcher_id": "41196",
      "batter_id": "33712",
      "balls": 0,
      "strikes": 0,
      "pitch_type": "FF",
      "pitch_type_name": "Four-seam FB",
      "velocity": 96,
      "px": 152,
      "py": 178,
      "result": "strike-looking",
      "in_play": false
    },
    {
      "game_id": "401569531",
      "at_bat_id": "4015695310001",
      "pitch_number": 2,
      "inning": 1,
      "half": "top",
      "pitcher_id": "41196",
      "batter_id": "33712",
      "balls": 0,
      "strikes": 1,
      "pitch_type": "FF",
      "pitch_type_name": "Four-seam FB",
      "velocity": 97,
      "px": 101,
      "py": 181,
      "result": "ground-out",
      "in_play": true
    },
    {
      "game_id": "401569531",
      "at_bat_id": "4015695310002",
      "pitch_number": 1,
      "inning": 1,
      "half": "top",
      "pitcher_id": "41196",
      "batter_id": "31187",
      "balls": 0,
      "strikes": 0,
      "pitch_type": "FF",
      "pitch_type_name": "Four-seam FB",
      "velocity": 97,
      "px": 139,
      "py": 180,
      "result": "fly-out",
      "in_play": true
    }
  ],
  "count": 3,
  "next_offset": 3,
  "note": "Velocity in mph; type and velocity are on 96% or more of each season's pitches and 99.8% or more from 2020. px/py are ESPN's pitch-location frame (pixels), as sent. Automatic balls and strikes (intentional walks, pitch-timer violations) are not pitches."
}

Response fields

pitches[]array
List of objects
pitches[].game_idstring
pitches[].at_bat_idstring
pitches[].pitch_numbernumber
pitches[].inningnumber
pitches[].halfstring
pitches[].pitcher_idstring
pitches[].batter_idstring
pitches[].ballsnumber
pitches[].strikesnumber
pitches[].pitch_typestring
pitches[].pitch_type_namestring
pitches[].velocitynumber
pitches[].pxnumber
pitches[].pynumber
pitches[].resultstring
pitches[].in_playboolean
countnumber
next_offsetnumber
notestring

Related endpoints

Try it

500 credits free on signup: 50 calls to get_pitches, and no card.