Skip to content

Teams, Players & Rosters

The situational splits

KBO-only route, in the shape of GET /v1/mlb/players/{id}/stat-splits. Returns the player's situational splits for a season and stat group from player_stat_splits, folded from the season's finished regular-season relay plays by derive:stat-splits (source derive:stat-splits) in the MLB Stats API situation codes and stat field names: vl/vr (the pitcher's arm for a batter; the side the batter hit from for a pitcher), h/a, d/n (17:00 KST cutoff), 3–10 months, preas/posas around the season's all-star game, r0/r1…r123/risp runners and o0–o2 outs when the batter's result came in, lo, lc, i01–i09/ix, and for pitchers sp.

Counts only, never zero-filled: a field the feed cannot supply is absent. Runs and earned runs (and a batter's stolen bases) come from the box lines and appear only on whole-game splits (sp, h/a, d/n, months, halves) when every game in the split carries them; rbi is absent where a play's RBI is only a lower bound; runner / outs / late-and-close splits are absent for a player with plays ingested before the relay state was recorded; the halves are absent without an all-star game in the schedule. constants.fipConstant is the league constant from the clubs' season pitching lines (null before any are stored); KBO publishes no batted-ball types or wOBA weights, so leagueHrPerFb and wobaWeights are always null.

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

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

Get the KBO situational splits for a player season

KBO-only route, in the shape of GET /v1/mlb/players/{id}/stat-splits. Returns the player's situational splits for a season and stat group from player_stat_splits, folded from the season's finished regular-season relay plays by derive:stat-splits (source derive:stat-splits) in the MLB Stats API situation codes and stat field names: vl/vr (the pitcher's arm for a batter; the side the batter hit from for a pitcher), h/a, d/n (17:00 KST cutoff), 3–10 months, preas/posas around the season's all-star game, r0/r1…r123/risp runners and o0–o2 outs when the batter's result came in, lo, lc, i01–i09/ix, and for pitchers sp.

Counts only, never zero-filled: a field the feed cannot supply is absent. Runs and earned runs (and a batter's stolen bases) come from the box lines and appear only on whole-game splits (sp, h/a, d/n, months, halves) when every game in the split carries them; rbi is absent where a play's RBI is only a lower bound; runner / outs / late-and-close splits are absent for a player with plays ingested before the relay state was recorded; the halves are absent without an all-star game in the schedule. constants.fipConstant is the league constant from the clubs' season pitching lines (null before any are stored); KBO publishes no batted-ball types or wOBA weights, so leagueHrPerFb and wobaWeights are always null.

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

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

Reference context: KBO.

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 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.