{"openapi":"3.1.0","info":{"title":"MLB API (Bowmark)","version":"e833508f87ff","description":"MLB.com (Major League Baseball): schedules, scores, box scores, play-by-play, standings, teams, rosters, player stats and leaders, transactions, the draft, awards, prospects, news, Film Room video search, and the signed-in account's favourites and newsletters.\n\nEvery function Bowmark has for MLB (mlb.com) as one HTTP call. Each runs on Bowmark's infrastructure with the same billing, rules and response envelope as `POST /v1/run`. The whole API: https://api.bowmark.ai/openapi.json. Guide: https://bowmark.ai/docs/api.","contact":{"email":"support@bowmark.ai","url":"https://bowmark.ai/docs/api"}},"servers":[{"url":"https://api.bowmark.ai"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/v1/sites/mlb/listTeams":{"post":{"operationId":"listTeams","summary":"The 30 MLB teams (or a minor league's, via sportId) with id, name, abbreviation, league, division and home ballpark.","description":"The 30 MLB teams (or a minor league's, via sportId) with id, name, abbreviation, league, division and home ballpark. The door for every team id, e.g. listTeams().\n\nCalls `bowmark.providers.mlb.listTeams`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbTeam[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbListTeamsArgs","description":"TypeScript: `MlbListTeamsArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/searchPlayers":{"post":{"operationId":"searchPlayers","summary":"Finds players by name, current or retired: id, position, number, birth date, handedness and current team.","description":"Finds players by name, current or retired: id, position, number, birth date, handedness and current team. The door for every player id, e.g. searchPlayers(\"Aaron Judge\").\n\nCalls `bowmark.providers.mlb.searchPlayers`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbPlayerHit[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"anyOf":[{"$ref":"#/components/schemas/MlbSearchPlayersArgs"},{"type":"string"}],"description":"TypeScript: `MlbSearchPlayersArgs | string`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getSchedule":{"post":{"operationId":"getSchedule","summary":"MLB games for a date or date range, optionally one team's: matchup, start time, venue, status, score and probable pitchers.","description":"MLB games for a date or date range, optionally one team's: matchup, start time, venue, status, score and probable pitchers. The door for every gamePk, e.g. getSchedule({ date: \"2026-09-20\" }).\n\nCalls `bowmark.providers.mlb.getSchedule`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbScheduledGame[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetScheduleArgs","description":"TypeScript: `MlbGetScheduleArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getStandings":{"post":{"operationId":"getStandings","summary":"Regular-season standings by division: wins, losses, games back, wild card, run differential, streak, last ten, home and away.","description":"Regular-season standings by division: wins, losses, games back, wild card, run differential, streak, last ten, home and away. e.g. getStandings({ season: 2025 }).\n\nCalls `bowmark.providers.mlb.getStandings`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbStandingsDivision[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetStandingsArgs","description":"TypeScript: `MlbGetStandingsArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getGame":{"post":{"operationId":"getGame","summary":"One game's summary: status, inning, line score by inning, runs/hits/errors, winning, losing and save pitchers, venue, weather, attendance.","description":"One game's summary: status, inning, line score by inning, runs/hits/errors, winning, losing and save pitchers, venue, weather, attendance. Takes a gamePk from getSchedule.\n\nCalls `bowmark.providers.mlb.getGame`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbGameSummary>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGamePkArgs","description":"TypeScript: `MlbGamePkArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getBoxScore":{"post":{"operationId":"getBoxScore","summary":"A game's box score: every batter's and pitcher's line for both teams, team totals, game notes and umpires.","description":"A game's box score: every batter's and pitcher's line for both teams, team totals, game notes and umpires. Takes a gamePk from getSchedule.\n\nCalls `bowmark.providers.mlb.getBoxScore`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbBoxScore>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGamePkArgs","description":"TypeScript: `MlbGamePkArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getPlayByPlay":{"post":{"operationId":"getPlayByPlay","summary":"Every plate appearance of a game: inning, batter, pitcher, event, description, runs batted in and score; filter by inning or scoringOnly.","description":"Every plate appearance of a game: inning, batter, pitcher, event, description, runs batted in and score; filter by inning or scoringOnly. Takes a gamePk from getSchedule.\n\nCalls `bowmark.providers.mlb.getPlayByPlay`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbPlay[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetPlayByPlayArgs","description":"TypeScript: `MlbGetPlayByPlayArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getPlayer":{"post":{"operationId":"getPlayer","summary":"One player's profile: bio, position, bats/throws, team, debut and page URL, with career and season hitting and pitching lines.","description":"One player's profile: bio, position, bats/throws, team, debut and page URL, with career and season hitting and pitching lines. Takes a playerId from searchPlayers.\n\nCalls `bowmark.providers.mlb.getPlayer`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbPlayerProfile>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetPlayerArgs","description":"TypeScript: `MlbGetPlayerArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getPlayerStats":{"post":{"operationId":"getPlayerStats","summary":"A player's stats by group (hitting, pitching, fielding) and type: season, career, year-by-year, home/away, by month, game log or vs-left/right splits.","description":"A player's stats by group (hitting, pitching, fielding) and type: season, career, year-by-year, home/away, by month, game log or vs-left/right splits. e.g. getPlayerStats({ playerId: 660271, type: \"yearByYear\" }).\n\nCalls `bowmark.providers.mlb.getPlayerStats`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbStatGroup>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetPlayerStatsArgs","description":"TypeScript: `MlbGetPlayerStatsArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getStatLeaders":{"post":{"operationId":"getStatLeaders","summary":"League leaders in one stat category for a season, MLB-wide or per league, e.g.","description":"League leaders in one stat category for a season, MLB-wide or per league, e.g. getStatLeaders({ category: \"homeRuns\", season: 2025 }).\n\nCalls `bowmark.providers.mlb.getStatLeaders`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbLeaderBoard>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetStatLeadersArgs","description":"TypeScript: `MlbGetStatLeadersArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getRoster":{"post":{"operationId":"getRoster","summary":"A team's roster (active, 40-man, full season, depth chart, coaches) with each player's number, position and status.","description":"A team's roster (active, 40-man, full season, depth chart, coaches) with each player's number, position and status. Takes a teamId from listTeams.\n\nCalls `bowmark.providers.mlb.getRoster`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbRosterEntry[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbGetRosterArgs","description":"TypeScript: `MlbGetRosterArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/listNews":{"post":{"operationId":"listNews","summary":"The latest MLB.com news stories, league-wide or one team's: headline, link, author, time and image.","description":"The latest MLB.com news stories, league-wide or one team's: headline, link, author, time and image. e.g. listNews({ team: \"yankees\", limit: 10 }).\n\nCalls `bowmark.providers.mlb.listNews`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbNewsItem[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbListNewsArgs","description":"TypeScript: `MlbListNewsArgs`"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/getArticle":{"post":{"operationId":"getArticle","summary":"One MLB.com article: headline, author, dates, description, image, the body as paragraphs and the player ids it links.","description":"One MLB.com article: headline, author, dates, description, image, the body as paragraphs and the player ids it links. Takes a url from listNews or searchContent.\n\nCalls `bowmark.providers.mlb.getArticle`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbArticle>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"$ref":"#/components/schemas/MlbArticleArgs","description":"TypeScript: `MlbArticleArgs`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/searchContent":{"post":{"operationId":"searchContent","summary":"Searches MLB.com's articles and videos by keyword, as the site search does: title, link, type, blurb, date, players and teams.","description":"Searches MLB.com's articles and videos by keyword, as the site search does: title, link, type, blurb, date, players and teams. e.g. searchContent(\"Aaron Judge\").\n\nCalls `bowmark.providers.mlb.searchContent`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbContentHit[]>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"anyOf":[{"$ref":"#/components/schemas/MlbSearchContentArgs"},{"type":"string"}],"description":"TypeScript: `MlbSearchContentArgs | string`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}},"/v1/sites/mlb/searchVideos":{"post":{"operationId":"searchVideos","summary":"Searches MLB Film Room video (highlights, every play) by free text: title, description, date, length and page URL, with the total match count.","description":"Searches MLB Film Room video (highlights, every play) by free text: title, description, date, length and page URL, with the total match count. e.g. searchVideos(\"aaron judge home run\").\n\nCalls `bowmark.providers.mlb.searchVideos`. The body is the function's arguments, keyed by parameter name. `result` in the response is what it returns: `Promise<MlbVideoSearch>`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"args":{"anyOf":[{"$ref":"#/components/schemas/MlbSearchVideosArgs"},{"type":"string"}],"description":"TypeScript: `MlbSearchVideosArgs | string`"}},"required":["args"],"additionalProperties":false}}}},"responses":{"200":{"description":"The call ran. That includes a call that failed (`status: error`) or paused for a sign-in (`status: needs_user`), so branch on `status`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/RunEnvelope"},{"type":"object","properties":{"result":{}}}]}}}},"400":{"description":"The body was malformed. `error` says what to send.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"401":{"description":"No API key, or a key that was refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"402":{"description":"The account is out of free usage, at its spend cap, or its card was declined. Fix billing at https://bowmark.ai/dashboard/billing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"description":"Too many runs in flight on this account. Nothing was started or charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}},"headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait."}}},"503":{"description":"A failure on Bowmark's side. Retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Your Bowmark API key."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Bowmark-Key"}},"responses":{"NotFound":{"description":"No such site or function.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEnvelope"}}}}},"schemas":{"RunEnvelope":{"type":"object","description":"What a run returns. `status` says whether the SCRIPT succeeded. A script that threw or paused for a login is still HTTP 200. Branch on `status`, not on the HTTP code.","required":["ok","status","result","logs","error","ms"],"properties":{"runId":{"type":"string","description":"Stable id for this run. Quote it in a support or `report` message."},"ok":{"type":"boolean","description":"False only when the run produced nothing usable."},"status":{"type":"string","enum":["ok","error","partial","needs_user"],"description":"`partial`: the result is real but some calls failed (see `incomplete`); `ok` stays true. `needs_user`: a person must sign in to a site first. Relay `meta.handoff.url` to them, then run again."},"egress":{"type":"string","enum":["default","link"],"description":"The egress the run was given, present only when the request asked for one. `link`: every request went through the caller's own Chrome (Bowmark Buddy)."},"result":{"description":"Whatever the script `return`ed. Any JSON value."},"logs":{"type":"array","items":{"type":"string"},"description":"Lines the script wrote with `log(...)`."},"error":{"type":["string","null"],"description":"Why the run failed, in plain words. Null on success."},"ms":{"type":"integer","description":"How long the script itself ran, in milliseconds."},"queuedMs":{"type":"integer","description":"How long the run waited for a worker before starting. Present only when it was a second or more."},"needs":{"type":"array","description":"The sign-ins this script is waiting on. Present when `status` is `needs_user`.","items":{"type":"object","required":["capability","provider","providerTitle","kind"],"properties":{"capability":{"type":"string"},"provider":{"type":"string"},"providerTitle":{"type":"string","description":"The site's name, to show a person."},"kind":{"type":"string"}}}},"incomplete":{"type":"object","description":"Present only when `status` is `partial`: which calls did not answer.","properties":{"summary":{"type":"string"},"totalCalls":{"type":"integer"}},"additionalProperties":true},"emptyHanded":{"type":"object","description":"Present when the script returned nothing while its calls returned rows, usually a filter that matched none of the site's own labels. Lists the label values the calls actually returned.","additionalProperties":true},"notes":{"type":"array","description":"Caveats a call attached to a complete answer. Never changes `status`.","items":{"type":"object","properties":{"path":{"type":"string"},"notes":{"type":"array","items":{"type":"string"}}}}},"meta":{"type":"object","properties":{"handoff":{"type":"object","description":"A single-use sign-in link for a person to open. Expires at `expiresAt`.","properties":{"ref":{"type":"string"},"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"concurrency":{"type":"object","description":"On a 429: how many runs are in flight and when to retry.","properties":{"limit":{"type":"integer"},"inFlight":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}}}},"additionalProperties":true},"notice":{"type":"object","description":"Set when the account owner has not accepted the current Terms. Relay it to them.","additionalProperties":true}}},"MlbArticleArgs":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":true},"MlbGamePkArgs":{"type":"object","properties":{"gamePk":{"type":"number"}},"required":["gamePk"],"additionalProperties":true},"MlbGetPlayByPlayArgs":{"type":"object","properties":{"gamePk":{"type":"number"},"inning":{"type":"number"},"scoringOnly":{"type":"boolean"}},"required":["gamePk"],"additionalProperties":true},"MlbGetPlayerArgs":{"type":"object","properties":{"playerId":{"type":"number"},"season":{"type":"number"}},"required":["playerId"],"additionalProperties":true},"MlbGetPlayerStatsArgs":{"type":"object","properties":{"playerId":{"type":"number"},"group":{"anyOf":[{"const":"hitting"},{"const":"pitching"},{"const":"fielding"}]},"type":{"anyOf":[{"const":"season"},{"const":"career"},{"const":"yearByYear"},{"const":"statSplits"},{"const":"homeAndAway"},{"const":"byMonth"},{"const":"winLoss"},{"const":"lastXGames"},{"const":"gameLog"}]},"season":{"type":"number"},"sitCodes":{"type":"string"}},"required":["playerId"],"additionalProperties":true},"MlbGetRosterArgs":{"type":"object","properties":{"teamId":{"type":"number"},"rosterType":{"anyOf":[{"const":"active"},{"const":"40Man"},{"const":"fullSeason"},{"const":"fullRoster"},{"const":"depthChart"},{"const":"nonRosterInvitees"},{"const":"allTime"},{"const":"coach"}]},"season":{"type":"number"}},"required":["teamId"],"additionalProperties":true},"MlbGetScheduleArgs":{"type":"object","properties":{"date":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"teamId":{"type":"number"},"sportId":{"type":"number"}},"additionalProperties":true},"MlbGetStandingsArgs":{"type":"object","properties":{"season":{"type":"number"},"leagueId":{"anyOf":[{"const":103},{"const":104}]}},"additionalProperties":true},"MlbGetStatLeadersArgs":{"type":"object","properties":{"category":{"type":"string"},"season":{"type":"number"},"leagueId":{"type":"number"},"statGroup":{"anyOf":[{"const":"hitting"},{"const":"pitching"},{"const":"fielding"}]},"limit":{"type":"number"}},"required":["category"],"additionalProperties":true},"MlbListNewsArgs":{"type":"object","properties":{"team":{"type":"string"},"limit":{"type":"number"}},"additionalProperties":true},"MlbListTeamsArgs":{"type":"object","properties":{"season":{"type":"number"},"sportId":{"type":"number"}},"additionalProperties":true},"MlbSearchContentArgs":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"number"},"language":{"anyOf":[{"const":"en"},{"const":"es"}]}},"required":["query"],"additionalProperties":true},"MlbSearchPlayersArgs":{"type":"object","properties":{"query":{"type":"string"},"activeOnly":{"type":"boolean"}},"required":["query"],"additionalProperties":true},"MlbSearchVideosArgs":{"type":"object","properties":{"query":{"type":"string"},"limit":{"type":"number"},"page":{"type":"number"}},"required":["query"],"additionalProperties":true}}}}