# MLB Structured Data API (x402)

> MLB Structured Data API (x402) is a paid API for AI agents from x402.186-241-26-229.sslip.io, paid per call via x402, $0.08/call, status unknown (last checked 2026-10-02).

Returns structured MLB data including teams, players, schedules, standings, stats, game details, and leaderboards for specified seasons and date ranges.

## Facts

- Endpoint: POST https://x402.186-241-26-229.sslip.io/v1/mlb?utm_source=zero.xyz
- Price: $0.08/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mlb-structured-data-api-x402-127aeb26
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rrBOKz1Y7Zr6ACHMp8UKm

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 mlb-structured-data-api-x402-127aeb26 -d '<json body>'
```

Example prompt: Pull the current MLB standings for both leagues and also get the hitting leaders for home runs this regular season, limited to the top 50 players.

## When to prefer this

Choose this endpoint when you need structured, multi-modal MLB data (teams, rosters, schedules, standings, player stats, game details, or leaders) in a single pay-per-call API without managing a scraper. Especially useful when you need flexible filtering by team, player, season, date range, and game type. Prefer this over raw HTML scraping or building your own MLB Stats API integration. Best when failed/empty calls should not incur cost.

## Known failure modes

- Invalid date format returns an error or empty result
- Unknown teamId or playerId returns zero items (not charged)
- Unsupported mode or enum value rejected at input validation
- Empty result sets for future dates or off-season periods (not charged)
- Rate limiting or payment failure via x402 protocol

## How this service works

Pay-per-call structured web data. Failed or empty runs are not charged.

## Output

A JSON object with a count field and an items array containing rows of MLB data. Each row may include fields like age, batting average, at-bats, air outs, assists, abbreviation, and other stat columns depending on the requested mode. The product field is always 'mlb'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "date": {
   "type": "string",
   "description": "One schedule or game-details date in YYYY-MM-DD format."
  },
  "mode": {
   "enum": [
    "teams",
    "players",
    "schedule",
    "standings",
    "playerStats",
    "gameDetails",
    "leaders"
   ],
   "type": "string",
   "default": "teams",
   "description": "Choose teams, roster players, games, standings, player season statistics, team game totals, or ranked leaders."
  },
  "gamePk": {
   "type": "integer",
   "description": "One game ID for game details, merged with Game IDs."
  },
  "season": {
   "type": "integer",
   "description": "Optional single season year; merged with Seasons when both are set."
  },
  "teamId": {
   "type": "integer",
   "description": "One club ID, merged with Team IDs when both are set."
  },
  "toDate": {
   "type": "string",
   "description": "Last schedule or game-details date in YYYY-MM-DD format."
  },
  "gamePks": {
   "type": "array",
   "description": "Game details for these game IDs; leave empty to discover games from dates or seasons."
  },
  "seasons": {
   "type": "array",
   "description": "Season years to collect. Leave empty for the current year."
  },
  "teamIds": {
   "type": "array",
   "description": "Optional club IDs to filter teams, rosters, games, standings, stats, or leaders."
  },
  "fromDate": {
   "type": "string",
   "description": "First schedule or game-details date in YYYY-MM-DD format."
  },
  "gameType": {
   "enum": [
    "R",
    "S",
    "P",
    "W",
    "L",
    "A"
   ],
   "type": "string",
   "default": "R",
   "description": "Game classification for schedule, game details, and leaderboards."
  },
  "leagueId": {
   "enum": [
    "both",
    "AL",
    "NL"
   ],
   "type": "string",
   "default": "both",
   "description": "League filter for standings."
  },
  "maxItems": {
   "type": "integer",
   "default": 1000,
   "minimum": 1,
   "description": "Maximum dataset rows to return across all seasons and categories."
  },
  "playerId": {
   "type": "integer",
   "description": "One player ID for player statistics, merged with Player IDs."
  },
  "playerIds": {
   "type": "array",
   "description": "Player statistics for these player IDs; leave empty to use selected club rosters."
  },
  "statGroup": {
   "enum": [
    "hitting",
    "pitching",
    "fielding"
   ],
   "type": "string",
   "default": "hitting",
   "description": "Player stats or leaders for hitting, pitching, or fielding."
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "items": [
   {
    "age": null,
    "avg": null,
    "active": null,
    "atBats": null,
    "airOuts": null,
    "assists": null,
    "abbreviation": null,
    "atBatsPerHomeRun": null
   }
  ],
  "product": "mlb"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mlb-structured-data-api-x402-127aeb26/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.186-241-26-229.sslip.io](https://www.zero.xyz/host/x402.186-241-26-229.sslip.io/llms.txt)
