Skip to content

get_team_stats

5 creditsStats + aggregationPOST /v1/get_team_stats

Runs for and against, team batting and opponents' batting

Use it when you want team offence and run prevention: runs for and against and batting and opponents' batting rates.

Parameters

seasonnumber | stringoptional
Season (a year, e.g. 2025; default: the latest).
teamstringoptional

Notes

  • Over MCP, ask for it in plain English and the client calls get_team_stats itself. Point any MCP client at https://mcp.fastballapi.com/mcp?key=YOUR_API_KEY.
  • Each call costs 5 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_team_stats \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
  "season": 2024,
  "team": "PHI"
}'

Response

json
{
  "season": 2024,
  "teams": [
    {
      "team_id": "22",
      "abbrev": "PHI",
      "team": "Philadelphia Phillies",
      "games": 162,
      "runs_per_game": 4.84,
      "runs_allowed_per_game": 4.14,
      "run_differential": 113,
      "batting": {
        "pa": 6170,
        "hr": 198,
        "avg": 0.257,
        "obp": 0.325,
        "slg": 0.424,
        "ops": 0.749,
        "k_pct": 0.222,
        "bb_pct": 0.083
      },
      "pitching_against": {
        "pa": 6053,
        "hr": 181,
        "avg": 0.243,
        "obp": 0.305,
        "slg": 0.397,
        "ops": 0.702,
        "k_pct": 0.237,
        "bb_pct": 0.073
      }
    }
  ],
  "count": 1,
  "method": "Batting and opponents' batting counted from every plate appearance; runs from final scores."
}

Response fields

seasonnumber
teams[]array
List of objects
teams[].team_idstring
teams[].abbrevstring
teams[].teamstring
teams[].gamesnumber
teams[].runs_per_gamenumber
teams[].runs_allowed_per_gamenumber
teams[].run_differentialnumber
teams[].battingobject
teams[].batting.panumber
teams[].batting.hrnumber
teams[].batting.avgnumber
teams[].batting.obpnumber
teams[].batting.slgnumber
teams[].batting.opsnumber
teams[].batting.k_pctnumber
teams[].batting.bb_pctnumber
teams[].pitching_againstobject
teams[].pitching_against.panumber
teams[].pitching_against.hrnumber
teams[].pitching_against.avgnumber
teams[].pitching_against.obpnumber
teams[].pitching_against.slgnumber
teams[].pitching_against.opsnumber
teams[].pitching_against.k_pctnumber
teams[].pitching_against.bb_pctnumber
countnumber
methodstring

Related endpoints

Try it

500 credits free on signup: 100 calls to get_team_stats, and no card.