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_idstringoptionalbatter_idstringoptionalpitcher_idstringoptionalteamstringoptional- Batting team (id or abbreviation).
seasonnumber | stringoptional- Season (a year; default: the latest; ignored with game_id).
season_typeenum: regular | postseasonoptionalresultstringoptional- e.g. home-run, strikeout, walk, single, double, ground-out.
inningintegeroptionalrispbooleanoptional- 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_appearancesitself. Point any MCP client athttps://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_idstringplate_appearances[].inningnumberplate_appearances[].halfstringplate_appearances[].batting_teamstringplate_appearances[].batterobjectplate_appearances[].batter.idstringplate_appearances[].batter.namestringplate_appearances[].batter.batsstringplate_appearances[].pitcherobjectplate_appearances[].pitcher.idstringplate_appearances[].pitcher.namestringplate_appearances[].beforeobjectplate_appearances[].before.outsnumberplate_appearances[].before.on_firstbooleanplate_appearances[].before.on_secondbooleanplate_appearances[].before.on_thirdbooleanplate_appearances[].resultstringplate_appearances[].descriptionstringplate_appearances[].pitchesnumberplate_appearances[].final_countstringplate_appearances[].batted_ballobjectplate_appearances[].batted_ball.trajectorystringplate_appearances[].batted_ball.xnumberplate_appearances[].batted_ball.ynumberplate_appearances[].runs_scorednumberplate_appearances[].outs_afternumberplate_appearances[].score_afterobjectplate_appearances[].score_after.homenumberplate_appearances[].score_after.awaynumberplate_appearances[].home_win_probnumberplate_appearances[].run_valuenumbercountnumbernext_offsetnumber
Related endpoints
get_game5 cr
Takes the game_id this one returns.
One game: every batting and pitching line, each book's line, win probability
get_line_movement10 cr
Takes the game_id this one returns.
Daily snapshots of each sportsbook's line before first pitch
list_teams1 cr
Returns the team this one takes.
Team ids, abbreviations and colours for a season
get_games2 cr
Returns the game_id this one takes.
Games with runs, hits and errors by season, date, range or team
Try it
500 credits free on signup: 50 calls to get_plate_appearances, and no card.