Get MLB lineups

GET/v1/mlb/teams/{team_id}/lineup

Confirmed daily lineups posted 2–4 hours before first pitch with batting order, positions, and probable pitchers.

Code samples

# Get live scores across every league
curl "https://api.sportapi.io/v1/nba/scores/live" \
  -H "Authorization: Bearer $API_KEY"

# Response
{
  "games": [{
    "game_id": "0022500412",
    "status": "in_progress",
    "period": 3, "clock": "07:42",
    "home": { "team": "BOS", "score": 78 },
    "away": { "team": "LAL", "score": 71 },
    "last_play": "J. Tatum makes 3-pt jumper from 25 ft"
  }]
}

Query parameters

ParameterTypeRequiredDescription
team_idstringYesMLB team code (e.g. NYY)
datestringNoYYYY-MM-DD; defaults to next scheduled game

Response

{
  "team": "NYY",
  "game_id": "746521",
  "lineup": [
    { "order": 1, "player": "soto-juan", "position": "RF" },
    { "order": 2, "player": "judge-aaron", "position": "CF" }
  ],
  "probable_pitcher": "cole-gerrit"
}

Error responses

StatusCodeDescription
401unauthorizedMissing or invalid API key
403tier_insufficientYour plan tier doesn't include this resource
429rate_limitedExceeded rate limit; honor Retry-After
500internal_errorServer error; retry with exponential backoff