# MLB Leagues API

> MLB Leagues API is a paid API for AI agents from clonecho.builda.company, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-13).

Returns MLB league names, abbreviations, and current season info for a given sport ID

## Facts

- Endpoint: POST https://clonecho.builda.company/x402/s/mlb-leagues
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mlb-leagues-api-1bc5726e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xl3cmk2S_0dcvZRJrnhJo

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-leagues-api-1bc5726e -d '<json body>'
```

Example prompt: Can you look up all the MLB leagues for sport ID 1 and tell me their names, abbreviations, and what the current season is?

## When to prefer this

Use this endpoint when you need structured MLB league metadata — names, abbreviations, and current season — keyed by sport ID, especially when building sports apps, dashboards, or enriching baseball data pipelines with official league identifiers.

## Known failure modes

- Invalid or missing sport ID returns empty results or error
- API returns 402 if payment is not included
- Malformed query parameter causes bad request
- Sport ID not associated with any leagues returns empty list

## How this service works

MLB StatsAPI: leagues for a sport id - league name, abbreviation, current season. Query: ?q= Returns JSON.

## Output

A JSON array of MLB league objects, each containing the league name, abbreviation, and current season information for the specified sport ID.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mlb-leagues-api-1bc5726e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from clonecho.builda.company](https://www.zero.xyz/host/clonecho.builda.company/llms.txt)
