Skip to content

get_plate_appearances

10 creditsMulti-tablePOST /v1/get_plate_appearances

Plate-appearance play-by-play with base-out state, batted ball, win probability, RE24

Use it when you need plate-appearance play-by-play: a game in order, or a hitter's season with base-out state, batted ball and run value.

Parameters

game_idstringoptional
batter_idstringoptional
pitcher_idstringoptional
teamstringoptional
Batting team (id or abbreviation).
seasonnumber | stringoptional
Season (a year; default: the latest; ignored with game_id).
season_typeenum: regular | postseasonoptional
resultstringoptional
e.g. home-run, strikeout, walk, single, double, ground-out.
inningintegeroptional
rispbooleanoptional
Runners in scoring position only.
limitintegeroptional
Max rows (default 200).
offsetintegeroptional

Notes

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

Response

json
{
  "plate_appearances": [
    {
      "game_id": "401569531",
      "inning": 1,
      "half": "top",
      "batting_team": "PHI",
      "batter": {
        "id": "33712",
        "name": "Kyle Schwarber",
        "bats": "L"
      },
      "pitcher": {
        "id": "41196",
        "name": "Grayson Rodriguez"
      },
      "before": {
        "outs": 0,
        "on_first": false,
        "on_second": false,
        "on_third": false
      },
      "result": "ground-out",
      "description": "Schwarber grounded out to first.",
      "pitches": 2,
      "final_count": "0-1",
      "batted_ball": {
        "trajectory": "G",
        "x": 164,
        "y": 161
      },
      "runs_scored": 0,
      "outs_after": 1,
      "score_after": {
        "home": 0,
        "away": 0
      },
      "home_win_prob": 0.635,
      "run_value": -0.225
    },
    {
      "game_id": "401569531",
      "inning": 1,
      "half": "top",
      "batting_team": "PHI",
      "batter": {
        "id": "31187",
        "name": "Nick Castellanos",
        "bats": "R"
      },
      "pitcher": {
        "id": "41196",
        "name": "Grayson Rodriguez"
      },
      "before": {
        "outs": 1,
        "on_first": false,
        "on_second": false,
        "on_third": false
      },
      "result": "fly-out",
      "description": "Castellanos flied out to center.",
      "pitches": 1,
      "final_count": "0-0",
      "batted_ball": {
        "trajectory": "F",
        "x": 144,
        "y": 56
      },
      "runs_scored": 0,
      "outs_after": 2,
      "score_after": {
        "home": 0,
        "away": 0
      },
      "home_win_prob": 0.649,
      "run_value": -0.167
    },
    {
      "game_id": "401569531",
      "inning": 1,
      "half": "top",
      "batting_team": "PHI",
      "batter": {
        "id": "30951",
        "name": "Bryce Harper",
        "bats": "L"
      },
      "pitcher": {
        "id": "41196",
        "name": "Grayson Rodriguez"
      },
      "before": {
        "outs": 2,
        "on_first": false,
        "on_second": false,
        "on_third": false
      },
      "result": "single",
      "description": "Harper singled to right.",
      "pitches": 3,
      "final_count": "1-1",
      "batted_ball": {
        "trajectory": "L",
        "x": 190,
        "y": 104
      },
      "runs_scored": 0,
      "outs_after": 2,
      "score_after": {
        "home": 0,
        "away": 0
      },
      "home_win_prob": 0.638,
      "run_value": 0.135
    }
  ],
  "count": 3,
  "next_offset": 3
}

Response fields

plate_appearances[]array
List of objects
plate_appearances[].game_idstring
plate_appearances[].inningnumber
plate_appearances[].halfstring
plate_appearances[].batting_teamstring
plate_appearances[].batterobject
plate_appearances[].batter.idstring
plate_appearances[].batter.namestring
plate_appearances[].batter.batsstring
plate_appearances[].pitcherobject
plate_appearances[].pitcher.idstring
plate_appearances[].pitcher.namestring
plate_appearances[].beforeobject
plate_appearances[].before.outsnumber
plate_appearances[].before.on_firstboolean
plate_appearances[].before.on_secondboolean
plate_appearances[].before.on_thirdboolean
plate_appearances[].resultstring
plate_appearances[].descriptionstring
plate_appearances[].pitchesnumber
plate_appearances[].final_countstring
plate_appearances[].batted_ballobject
plate_appearances[].batted_ball.trajectorystring
plate_appearances[].batted_ball.xnumber
plate_appearances[].batted_ball.ynumber
plate_appearances[].runs_scorednumber
plate_appearances[].outs_afternumber
plate_appearances[].score_afterobject
plate_appearances[].score_after.homenumber
plate_appearances[].score_after.awaynumber
plate_appearances[].home_win_probnumber
plate_appearances[].run_valuenumber
countnumber
next_offsetnumber

Related endpoints

Try it

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