Skip to content

get_team_stats

5 creditsStats + aggregationPOST /v1/get_team_stats

Data refreshed · changelog

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
leagueenum: mlb | ncaabaseoptional
League. Defaults to mlb. One of: mlb, ncaabase.

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": 2025,
  "team": "PHI"
}'

Response

json
{
  "season": 2025,
  "teams": [
    {
      "team_id": "22",
      "abbrev": "PHI",
      "team": "Philadelphia Phillies",
      "games": 162,
      "runs_per_game": 4.8,
      "runs_allowed_per_game": 4,
      "run_differential": 130,
      "batting": {
        "pa": 6167,
        "hr": 212,
        "avg": 0.258,
        "obp": 0.327,
        "slg": 0.431,
        "ops": 0.758,
        "k_pct": 0.217,
        "bb_pct": 0.085
      },
      "pitching_against": {
        "pa": 6029,
        "hr": 177,
        "avg": 0.244,
        "obp": 0.304,
        "slg": 0.392,
        "ops": 0.697,
        "k_pct": 0.244,
        "bb_pct": 0.072
      }
    }
  ],
  "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 free credits every month: 100 calls to get_team_stats, and no card.