Skip to content

Teams, Players & Rosters

The official situational splits

MLB-only route. Returns the player's official situational splits for a season and stat group from player_stat_splits — the MLB Stats API stats=statSplits table (the same rows Baseball Savant's player splits page renders), written by the statsapi:stat-splits adapter: one entry per situation code (vl/vr hand, h/a venue, d/n, 3–10 months, preas/posas halves, r0/r1…r123/risp runners, o0–o2 outs, i01–i09/ix innings, lo, lc, and for pitchers sp — the As-Starter line).

Counts only: each stat is StatsAPI's stat object with its quoted rates coerced to numbers (inningsPitched stays the official "44.1" string; read outs). constants carries the season's FIP constant, league HR/FB and the published wOBA linear weights so a reader derives wOBA / FIP / BABIP / K% from the counts exactly as the derived season line does; it is null until derive:season-constants has run for the season. Leverage, times-through-the-order and venue × hand cross-tabs are FanGraphs-only and are not served.

Requires the stats entitlement (a paid plan). See Responses & Errors for the success envelope and availability rules.

GEThttps://api.sportquanta.com/v1/mlb/players/{id}/stat-splits
GETGet the MLB official situational splits for a player season
GET/v1/mlb/players/{id}/stat-splits

Get the MLB official situational splits for a player season

MLB-only route. Returns the player's official situational splits for a season and stat group from player_stat_splits — the MLB Stats API stats=statSplits table (the same rows Baseball Savant's player splits page renders), written by the statsapi:stat-splits adapter: one entry per situation code (vl/vr hand, h/a venue, d/n, 3–10 months, preas/posas halves, r0/r1…r123/risp runners, o0–o2 outs, i01–i09/ix innings, lo, lc, and for pitchers sp — the As-Starter line).

Counts only: each stat is StatsAPI's stat object with its quoted rates coerced to numbers (inningsPitched stays the official "44.1" string; read outs). constants carries the season's FIP constant, league HR/FB and the published wOBA linear weights so a reader derives wOBA / FIP / BABIP / K% from the counts exactly as the derived season line does; it is null until derive:season-constants has run for the season. Leverage, times-through-the-order and venue × hand cross-tabs are FanGraphs-only and are not served.

Requires the stats entitlement (a paid plan). See Responses & Errors for the success envelope and availability rules.

Authorization
Path
Query
Get the MLB official situational splits for a player seasoncURL
200Example

Reference context: MLB.

Overview · Response conventions

Authorizations

Authorizationstringheaderrequired

Send a workspace API token in the Authorization: Bearer <token> header.

Path Parameters

idstringrequired

Query Parameters

seasonintegerrequired

Required season start year (1920–2100). Availability of historical data is separate from accepted query values.

Required range: 1920 <= x, x <= 2100

groupenum<string>required

Stat group — a batter's splits (hitting) or a pitcher's splits against batters (pitching).

Available options: hitting, pitching

codesstring

Optional comma-separated StatsAPI situation codes (e.g. vl,vr,risp,preas). Absent returns every stored situation. Codes are lower-case alphanumerics; anything else is a 422.

Response

application/json

Situational splits payload.

dataobjectrequired

One player's situational splits for a season and stat group — MLB's official MLB Stats API statSplits, or KBO's folded from the relay plays in the same codes and field names — with the season constants a reader needs to derive wOBA and FIP from the counts.

data.playerIdstringrequired
data.seasonintegerrequired
data.groupenum<string>required

Available options: hitting, pitching

data.sourcestringrequired

statsapi for MLB (a fetched official table); derive:stat-splits for KBO (folded from the relay plays).

data.constantsobject | nullrequired

Null until derive:season-constants has run for the season (MLB) or before any club season pitching line is stored (KBO).

data.constants.seasonintegerrequired
data.constants.fipConstantnumber | nullrequired
data.constants.leagueHrPerFbnumber | nullrequired

Null when no fly balls are tagged for the season (xFIP cannot be derived).

data.constants.wobaWeightsobject | nullrequired
data.constants.wobaWeights.bbnumberrequired
data.constants.wobaWeights.hbpnumberrequired
data.constants.wobaWeights.singlenumberrequired
data.constants.wobaWeights.doublenumberrequired
data.constants.wobaWeights.triplenumberrequired
data.constants.wobaWeights.homerunnumberrequired
data.splitsobject[]required

Stored situations in StatsAPI's own sort order; empty when nothing is stored for the player yet.

data.splits.codestringrequired

StatsAPI situation code (vl, vr, h, a, risp, preas, i01, sp …).

data.splits.descriptionstringrequired
data.splits.sortOrderinteger | nullrequired
data.splits.teamIdstring | nullrequired

Canonical team the split was recorded for; null when StatsAPI's team is not in the directory.

data.splits.fetchedAtstring | nullrequired
data.splits.statobjectrequired
_metaobject

Response request/cache metadata. Optional evidence fields are specific to this handler; cache TTL does not measure source-data freshness.

_meta.request_idstring
_meta.served_fromenum<string>

Available options: live, cache

_meta.cache_ttl_secondsinteger

Response cache TTL; independent of source freshness. Omitted when zero.