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.
https://api.sportquanta.com/v1/mlb/players/{id}/stat-splitsReference context: MLB.
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 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/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.