# Fanfare MLB Player Season Stats

> Fanfare MLB Player Season Stats is a paid API for AI agents from fanfare.run, paid per call via x402, $0.001000/call, status unknown (last checked 2026-09-15).

Returns full season hitting, pitching, and fielding statistics for an MLB player by their MLB player ID.

## Facts

- Endpoint: GET https://fanfare.run/mlb/player/:player_id
- Price: $0.001000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fanfare-run-5ba8d66a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GUloImwEkQAleA8w0ES7W

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fanfare-run-5ba8d66a
```

Example prompt: What are Shohei Ohtani's full season stats this year — hitting, pitching, and fielding? His MLB player ID is 660271.

## When to prefer this

Use this endpoint when you need comprehensive season-level stats (hitting, pitching, AND fielding) for a specific MLB player identified by their numeric MLB player ID. Prefer this over generic sports APIs when you need all three stat categories in one call, or when you already have the MLB player ID.

## Known failure modes

- Invalid or unknown player_id returns a 404 or empty response
- Player ID exists but player has no stats for the current season (e.g. injured, minor league)
- Service unavailable or upstream MLB data feed outage returns 5xx error
- Malformed player_id (non-numeric or wrong format) may return a validation error

## How this service works

Full season hitting, pitching, and fielding stats for an MLB player by ID. Example: 660271 = Shohei Ohtani.

## Output

A structured response containing the player's complete season statistics across hitting (e.g. batting average, home runs, RBIs, OBP, SLG), pitching (e.g. ERA, strikeouts, WHIP, wins/losses), and fielding (e.g. fielding percentage, errors, putouts) for the current or most recent MLB season.

## Example request

```json
{
 "player_id": 660271
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "player_id"
     ],
     "properties": {
      "player_id": {
       "type": "string",
       "description": "MLB player ID"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fanfare-run-5ba8d66a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fanfare.run](https://www.zero.xyz/host/fanfare.run/llms.txt)
