# MLB Division and League Standings

> MLB Division and League Standings is a paid API for AI agents from mlb-stats-api.fly.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns current MLB standings by division and league, optionally filtered by American League (103) or National League (104).

## Facts

- Endpoint: GET https://mlb-stats-api.fly.dev/mlb/standings
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mlb-stats-api-fly-dev-69c59ec1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zKvSzCmrYIza5HsyIfKlC

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-stats-api-fly-dev-69c59ec1
```

Example prompt: What are the current MLB standings for the American League — show me how each team is doing in their division?

## When to prefer this

Use this endpoint when you need current MLB division or league standings for one or both leagues. Prefer this over generic sports data APIs when you specifically need structured MLB standings with division and conference breakdowns.

## Known failure modes

- Invalid leagueId value returns an error or empty result
- Service unavailability on fly.dev infrastructure returns a 5xx error
- Stale data if MLB stats feed is not updated in real time
- No standings data available during the MLB offseason

## How this service works

Current MLB standings — wins, losses, win percentage, games back, home/away splits, and streak. Filter by leagueId: 103 for American League, 104 for National League.

## Output

A structured list of current MLB standings broken down by division and league, including each team's wins, losses, division rank, and conference rank. Can be filtered to show only the American League (leagueId=103) or National League (leagueId=104).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "leagueId": 103
  }
 }
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "leagueId": {
       "type": "integer",
       "description": "103 for AL, 104 for NL"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data",
  "sport",
  "errors",
  "league",
  "warnings",
  "request_id",
  "retrieved_at"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "team",
     "record",
     "division_rank",
     "wildcard_rank"
    ],
    "properties": {
     "team": {
      "type": "object",
      "required": [
       "id",
       "city",
       "name",
       "full_name",
       "abbreviation",
       "league_division"
      ],
      "properties": {
       "id": {
        "type": "string"
       },
       "city": {
        "type": "string"
       },
       "name": {
        "type": "string"
       },
       "full_name": {
        "type": "string"
       },
       "abbreviation": {
        "type": "string"
       },
       "league_division": {
        "type": "string"
       }
      }
     },
     "record": {
      "type": "object",
      "required": [
       "pct",
       "wins",
       "losses",
       "streak",
       "last_10",
       "games_back",
       "away_record",
       "home_record"
      ],
      "properties": {
       "pct": {
        "type": "number"
       },
       "wins": {
        "type": "number"
       },
       "losses": {
        "type": "number"
       },
       "streak": {
        "type": "string"
       },
       "last_10": {
        "type": "string"
       },
       "games_back": {
        "type": "null"
       },
       "away_record": {
        "type": "string"
       },
       "home_record": {
        "type": "string"
       }
      }
     },
     "division_rank": {
      "type": "number"
     },
     "wildcard_rank": {
      "type": "null"
     }
    }
   }
  },
  "sport": {
   "type": "string"
  },
  "errors": {
   "type": "array",
   "items": {
    "type": "unknown"
   }
  },
  "league": {
   "type": "string"
  },
  "warnings": {
   "type": "array",
   "items": {
    "type": "unknown"
   }
  },
  "request_id": {
   "type": "string"
  },
  "retrieved_at": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mlb-stats-api-fly-dev-69c59ec1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from mlb-stats-api.fly.dev](https://www.zero.xyz/host/mlb-stats-api.fly.dev/llms.txt)
