# MLB schedule and scores for a date or range API

Get MLB Schedule & Scores data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Apish, pass parameters such as date, output, raw, and retrieve structured data including MLB game identifier, abstract state, away team score, and home team score to build team fixture calendars, and track postseason and minor-league slates.

Documentation: https://openany.si/mlb-stats/mlb-stats-mlb-schedule-and-scores-for-a-date-or-range-api/258c5164-fb41-4fba-bc39-abcb3999d071/
API ID: 258c5164-fb41-4fba-bc39-abcb3999d071
Provider: apish
Contract revision: 3
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/apish/mlb/v1/schedule
Page update time: 2026-12-03T02:44:10.091Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.002 / billing credit
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:44:08.679Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "rules",
  "parameters": [],
  "policy_version": 2,
  "sale": {
    "addons": [],
    "base_price_micro_usd": "0",
    "max_cost_micro_usd": "2000",
    "quantities": [
      {
        "id": "upstream_credits",
        "label": "Actual API.SH credits consumed",
        "max_quantity": "1",
        "measure": "value",
        "pointer": "/credits_used",
        "price_micro_usd": "2000",
        "quantity_scale": 0,
        "source": "response",
        "unit": "credit",
        "unit_quantity": "1"
      }
    ],
    "rounding": "ceil",
    "variants": []
  }
}
```

## Usage and limits
## MLB Schedule & Scores API

Query games by date (YYYY-MM-DD, default today) or start\_date and end\_date (at most 31 days apart), with optional team\_id, game\_type (R, S, P, F, D, L, W, A, E) and sport\_id (1 MLB default, or minor-league levels). Returned games\[\] include gamePk IDs, scores, records, probable pitchers, decisions and linescore summaries.

## What You Can Build

- **Discover gamePk IDs for deep stats**: Pull games\[\].id for a date and pass it to the MLB Game Box Score API or MLB Game Play-by-Play API.
- **Build team fixture calendars**: Combine team\_id with start\_date and end\_date to render upcoming series and probable pitchers.
- **Track postseason and minor-league slates**: Filter by game\_type=P or sport\_id=11 (Triple-A) to monitor playoff series or affiliate schedules.

## Returned Data

| Field | Meaning |
| --- | --- |
| `count` | Number of games returned in the payload |
| `total_games` | Total scheduled games matching the query |
| `games[].id` | MLB game identifier (gamePk) |
| `games[].date` | Scheduled game date and time |
| `games[].abstract_state` | High-level game state such as Final or Live |
| `games[].game_type` | Game type code such as R or W |
| `games[].away.score` | Away team score |
| `games[].home.score` | Home team score |
| `games[].linescore.current_inning` | Current or final inning number |
| `games[].decisions.winner` | Winning pitcher record when decided |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "MLB schedule and scores for a date or range API request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "description": "Date (YYYY-MM-DD); default today."
        },
        "start_date": {
          "type": "string",
          "description": "Range start (YYYY-MM-DD), with end_date."
        },
        "end_date": {
          "type": "string",
          "description": "Range end (YYYY-MM-DD), at most 31 days after start_date."
        },
        "team_id": {
          "type": "string",
          "description": "Team id (147) or abbreviation (nyy, lad, bos ...)."
        },
        "game_type": {
          "type": "string",
          "description": "Comma-separated: R regular season, S spring training, P postseason (all rounds), F wild card, D division series, L league championship, W World Series, A All-Star, E exhibition."
        },
        "sport_id": {
          "type": "string",
          "description": "Level: 1 MLB (default), 11 Triple-A, 12 Double-A, 13 High-A, 14 Single-A, 16 Rookie, 17 winter leagues, 51 international.",
          "enum": [
            "1",
            "11",
            "12",
            "13",
            "14",
            "16",
            "17",
            "21",
            "22",
            "23",
            "51",
            "586"
          ]
        },
        "raw": {
          "type": "string",
          "description": "0 leaves out the bulky `raw` source blocks (often 10-30x smaller).",
          "enum": [
            "0",
            "1"
          ]
        },
        "fields": {
          "type": "string",
          "description": "Comma-separated fields to return, e.g. `posts.id,posts.title`. Call metadata is always included."
        },
        "fresh": {
          "type": "string",
          "description": "1 skips the 24-hour cache and fetches live.",
          "enum": [
            "1"
          ]
        },
        "output": {
          "type": "string",
          "description": "JSON only for this OpenAny product. Omit output or use json; CSV and NDJSON are not supported.",
          "enum": [
            "json"
          ]
        },
        "records": {
          "type": "string",
          "description": "With output=csv|ndjson: the top-level list to turn into rows (e.g. `reviews`), or `.` for the whole object as one row."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "applied_filters": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string"
        },
        "end_date": {
          "type": "null"
        },
        "game_type": {
          "type": "null"
        },
        "sport_id": {
          "type": "integer"
        },
        "start_date": {
          "type": "null"
        },
        "team_id": {
          "type": "null"
        }
      }
    },
    "cached": {
      "type": "boolean"
    },
    "count": {
      "type": "integer"
    },
    "credits_used": {
      "type": "integer"
    },
    "fetched_at": {
      "type": "string"
    },
    "games": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "abstract_state": {
            "type": "string"
          },
          "away": {
            "type": "object",
            "properties": {
              "is_winner": {
                "type": "boolean"
              },
              "probable_pitcher": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "record": {
                "type": "object",
                "properties": {
                  "losses": {
                    "type": "integer"
                  },
                  "pct": {
                    "type": "string"
                  },
                  "wins": {
                    "type": "integer"
                  }
                }
              },
              "score": {
                "type": "integer"
              },
              "series_number": {
                "type": "integer"
              },
              "team": {
                "type": "object",
                "properties": {
                  "abbreviation": {
                    "type": "string"
                  },
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "date": {
            "type": "string"
          },
          "day_night": {
            "type": "string"
          },
          "decisions": {
            "type": "object",
            "properties": {
              "loser": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "save": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "winner": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "double_header": {
            "type": "string"
          },
          "game_number": {
            "type": "integer"
          },
          "game_type": {
            "type": "string"
          },
          "games_in_series": {
            "type": "integer"
          },
          "home": {
            "type": "object",
            "properties": {
              "is_winner": {
                "type": "boolean"
              },
              "probable_pitcher": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              },
              "record": {
                "type": "object",
                "properties": {
                  "losses": {
                    "type": "integer"
                  },
                  "pct": {
                    "type": "string"
                  },
                  "wins": {
                    "type": "integer"
                  }
                }
              },
              "score": {
                "type": "integer"
              },
              "series_number": {
                "type": "integer"
              },
              "team": {
                "type": "object",
                "properties": {
                  "abbreviation": {
                    "type": "string"
                  },
                  "id": {
                    "type": "integer"
                  },
                  "name": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "id": {
            "type": "integer"
          },
          "linescore": {
            "type": "object",
            "properties": {
              "away": {
                "type": "object",
                "properties": {
                  "errors": {
                    "type": "integer"
                  },
                  "hits": {
                    "type": "integer"
                  },
                  "runs": {
                    "type": "integer"
                  }
                }
              },
              "current_inning": {
                "type": "integer"
              },
              "home": {
                "type": "object",
                "properties": {
                  "errors": {
                    "type": "integer"
                  },
                  "hits": {
                    "type": "integer"
                  },
                  "runs": {
                    "type": "integer"
                  }
                }
              },
              "inning_state": {
                "type": "string"
              },
              "innings": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "away": {
                      "type": "integer"
                    },
                    "home": {
                      "anyOf": [
                        {
                          "type": "integer"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "num": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "scheduled_innings": {
            "type": "integer"
          },
          "season": {
            "type": "string"
          },
          "series": {
            "type": "string"
          },
          "series_game_number": {
            "type": "integer"
          },
          "start_time": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "status_code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "venue": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer"
              },
              "name": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "total_games": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Official example · Live API.SH response · Minimal request
```bash
curl \
  'https://api.openany.si/v1/agent-apis/apish/mlb/v1/schedule?date=2026-10-24&output=json&raw=0' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Documented HTTP 200
```json
{
  "applied_filters": {
    "date": "2026-10-24",
    "end_date": null,
    "game_type": null,
    "sport_id": 1,
    "start_date": null,
    "team_id": null
  },
  "cached": false,
  "count": 1,
  "credits_used": 1,
  "fetched_at": "2026-11-19T12:22:07.725Z",
  "games": [
    {
      "abstract_state": "Final",
      "away": {
        "is_winner": false,
        "probable_pitcher": {
          "id": 656876,
          "name": "Drew Rasmussen"
        },
        "record": {
          "losses": 2,
          "pct": ".000",
          "wins": 0
        },
        "score": 4,
        "series_number": 1,
        "team": {
          "abbreviation": "TB",
          "id": 139,
          "name": "Tampa Bay Rays"
        }
      },
      "date": "2026-10-24",
      "day_night": "night",
      "decisions": {
        "loser": {
          "id": 669330,
          "name": "Tyler Wells"
        },
        "save": {
          "id": 676879,
          "name": "Aaron Ashby"
        },
        "winner": {
          "id": 682842,
          "name": "Abner Uribe"
        }
      },
      "double_header": "N",
      "game_number": 1,
      "game_type": "W",
      "games_in_series": 7,
      "home": {
        "is_winner": true,
        "probable_pitcher": {
          "id": 701656,
          "name": "Logan Henderson"
        },
        "record": {
          "losses": 0,
          "pct": "1.000",
          "wins": 2
        },
        "score": 5,
        "series_number": 1,
        "team": {
          "abbreviation": "MIL",
          "id": 158,
          "name": "Milwaukee Brewers"
        }
      },
      "id": 849802,
      "linescore": {
        "away": {
          "errors": 1,
          "hits": 7,
          "runs": 4
        },
        "current_inning": 9,
        "home": {
          "errors": 1,
          "hits": 11,
          "runs": 5
        },
        "inning_state": "Top",
        "innings": [
          {
            "away": 4,
            "home": 2,
            "num": 1
          },
          {
            "away": 0,
            "home": 0,
            "num": 2
          },
          {
            "away": 0,
            "home": 0,
            "num": 3
          },
          {
            "away": 0,
            "home": 1,
            "num": 4
          },
          {
            "away": 0,
            "home": 0,
            "num": 5
          },
          {
            "away": 0,
            "home": 1,
            "num": 6
          },
          {
            "away": 0,
            "home": 1,
            "num": 7
          },
          {
            "away": 0,
            "home": 0,
            "num": 8
          },
          {
            "away": 0,
            "home": null,
            "num": 9
          }
        ]
      },
      "scheduled_innings": 9,
      "season": "2026",
      "series": "World Series",
      "series_game_number": 2,
      "start_time": "2026-10-25T00:00:00Z",
      "status": "Final",
      "status_code": "F",
      "url": "https://www.mlb.com/gameday/849802",
      "venue": {
        "id": 32,
        "name": "American Family Field"
      }
    }
  ],
  "total_games": 1
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### What is the maximum date range allowed with start_date and end_date?
A date-range request covers at most 31 days between start_date and end_date.

### What date is queried if I omit date, start_date and end_date?
It defaults to today's MLB schedule.

### Can I filter for postseason or spring training games?
Yes. Pass comma-separated game_type codes such as R (regular season), S (spring), P (postseason) or W (World Series).

### Does the schedule include probable pitchers and winning/saving pitchers?
Yes. Each game exposes away/home probable_pitcher objects and decisions (winner, loser, save) once finalized.

### Are minor-league schedules available on this endpoint?
Yes. Set sport_id to 11 (Triple-A), 12 (Double-A), 13 (High-A), 14 (Single-A), 16 (Rookie), 17 (winter) or 51 (international).

### How do I get live score updates without cached results?
Pass fresh=1 to skip the 24-hour cache and raw=0 to omit bulky raw blocks.

## Available implementations
- apish: https://openany.si/mlb-stats/mlb-stats-mlb-schedule-and-scores-for-a-date-or-range-api/258c5164-fb41-4fba-bc39-abcb3999d071/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
