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.
https://api.sportquanta.com/v1/kbo/players/{id}/stat-splitsReference context: KBO.
Overview · Response conventions
Authorizations
AuthorizationstringheaderrequiredSend a workspace API token in the Authorization: Bearer <token> header.
Path Parameters
idstringrequiredQuery Parameters
seasonintegerrequiredRequired season start year (1920–2100). Availability of historical data is separate from accepted query values.
Required range: 1920 <= x, x <= 2100
groupenum<string>requiredStat group — a batter's splits (hitting) or a pitcher's splits against batters (pitching).
Available options: hitting, pitching
codesstringOptional 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/jsonSituational splits payload.
Query validation failed. Depending on the handler, invalid_query_parameter is returned with HTTP 400 or 422. Pre-read validation is non-billable.
Missing or invalid bearer API token.
Access is forbidden: the token lacks api.read scope, the plan lacks an endpoint/bookmaker capability, or configured billing access is inactive. Inspect error.code and details.feature when present.
The id is well-formed but no document has been ingested for it yet.
Query validation failed. Depending on the handler, invalid_query_parameter is returned with HTTP 400 or 422. Pre-read validation is non-billable.
Hourly rate ceiling or monthly quota exceeded. The error code disambiguates
which limit was hit. X-RateLimit-* and X-Requests-*-Month response headers
carry the current state of both counters.
Token validation or an internal handler failed. Token-store failures use api_token_lookup_failed; unsupported internal sport dispatch can use data_layer_unavailable.
The data layer (Mongo / ClickHouse / Redis cache) is temporarily unreachable. The server attempted the lookup; it failed. Retry with backoff. Per the spec's order of evaluation, this DOES consume monthly quota — the request reached step 6.
The configured billing provider could not verify API access. The request is refused before the data handler and does not consume monthly quota.
dataobjectrequiredOne 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.playerIdstringrequireddata.seasonintegerrequireddata.groupenum<string>requiredAvailable options: hitting, pitching
data.sourcestringrequiredstatsapi for MLB (a fetched official table); derive:stat-splits for KBO (folded from the relay plays).
data.constantsobject | nullrequiredNull until derive:season-constants has run for the season (MLB) or before any club season pitching line is stored (KBO).
data.constants.seasonintegerrequireddata.constants.fipConstantnumber | nullrequireddata.constants.leagueHrPerFbnumber | nullrequiredNull when no fly balls are tagged for the season (xFIP cannot be derived).
data.constants.wobaWeightsobject | nullrequireddata.constants.wobaWeights.bbnumberrequireddata.constants.wobaWeights.hbpnumberrequireddata.constants.wobaWeights.singlenumberrequireddata.constants.wobaWeights.doublenumberrequireddata.constants.wobaWeights.triplenumberrequireddata.constants.wobaWeights.homerunnumberrequireddata.splitsobject[]requiredStored situations in StatsAPI's own sort order; empty when nothing is stored for the player yet.
data.splits.codestringrequiredStatsAPI situation code (vl, vr, h, a, risp, preas, i01, sp …).
data.splits.descriptionstringrequireddata.splits.sortOrderinteger | nullrequireddata.splits.teamIdstring | nullrequiredCanonical team the split was recorded for; null when StatsAPI's team is not in the directory.
data.splits.fetchedAtstring | nullrequireddata.splits.statobjectrequired_metaobjectResponse 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_secondsintegerResponse cache TTL; independent of source freshness. Omitted when zero.
errorobjectrequirederror.codestringrequiredStable machine-readable error code.
error.messagestringrequiredUser-facing error summary.
error.detailsanyOptional error details.