MLB API endpoint
Returns ranked MLB stat splits across both leagues. `group` is required (`hitting`, `pitching`, `fielding`, `catching`, `running`, `game`, `team` or `streak`). `season` defaults to the current year and `stat_type` to `season`. Narrow with `league_id`, `team_id`, `position`, `player_pool`, and page with `limit` (1 to 100) and `offset` (0 to 10000).
/mlb/league-statsgroup is required. Group values: hitting, pitching, fielding, catching, running, game, team, streak. season defaults to the current year. stat_type defaults to season and accepts every value below. game_type is optional and accepts: S, R, F, D, L, W, C, P, A, I, E. league_id is optional and accepts 103 (American League) or 104 (National League). team_id accepts a positive MLB team id from /mlb/teams. player_pool accepts QUALIFIED or ALL. position is available with group=hitting and accepts C, 1B, 2B, 3B, SS, LF, CF, RF, DH, OF, or IF. limit is 1–100; offset is 0–10000.
Stat type values:
start_date and end_date are paired filters for byDateRange and byDateRangeAdvanced. opponent_team_id is required for vsTeam variants; opponent_player_id is required for vsPlayer variants. Both use positive MLB ids.
The stats table controls map to team, hitting position, qualified/all player pool, season/stat period, league, and pagination. The stats payload carries the standard and expanded stat fields returned by the Stats API; consumers can select the columns they need. sort_stat is not exposed: sort returned rows locally, or use /mlb/league-leaders for the validated MLB leader-category rankings.
stat_type: projected, projectedRos, yearByYear, yearByYearAdvanced, yearByYearPlayoffs, season, standard, advanced, career, careerRegularSeason, careerAdvanced, seasonAdvanced, careerStatSplits, careerPlayoffs, gameLog, playLog, pitchLog, pitchArsenal, outsAboveAverage, expectedStatistics, sabermetrics, sprayChart, tracking, vsPlayer, vsPlayerTotal, vsPlayer5Y, vsTeam, vsTeam5Y, vsTeamTotal, lastXGames, byDateRange, byDateRangeAdvanced, byMonth, byMonthPlayoffs, byDayOfWeek, byDayOfWeekPlayoffs, homeAndAway, homeAndAwayPlayoffs, winLoss, winLossPlayoffs, rankings, rankingsByYear, statsSingleSeason, statsSingleSeasonAdvanced, hotColdZones, availableStats, opponentsFaced, gameTypeStats, firstYearStats, lastYearStats, statSplits, statSplitsAdvanced, atGameStart, vsOpponents, sabermetricsMultiTeam, projected_Zips, projected_ZipsRos, projected_Zips2YR, projected_Zips3YR
| Field | Filled in, of 40 checked | Values in the sample |
|---|---|---|
| rank | 40 | 1 to 40, median 20 |
| season | 40 | 2,026 |
| player | 40 | |
| team | 40 | |
| league | 40 | |
| position | 40 | Outfielder (17), First Base (6), Catcher (4) and 4 more |
| stats | 40 |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| season | integer | No | current year | Four-digit season; defaults to current year | 2026 |
| group | string | Yes | Stat group Allowed values: hitting, pitching, fielding, catching, running, game, team, streak. | hitting | |
| stat_type | string | No | season | Stats API stat type; defaults to season Allowed values: projected, projectedRos, yearByYear, yearByYearAdvanced, yearByYearPlayoffs, season, standard, advanced, career, careerRegularSeason, careerAdvanced, seasonAdvanced, careerStatSplits, careerPlayoffs, gameLog, playLog, pitchLog, pitchArsenal, outsAboveAverage, expectedStatistics, sabermetrics, sprayChart, tracking, vsPlayer, vsPlayerTotal, vsPlayer5Y, vsTeam, vsTeam5Y, vsTeamTotal, lastXGames, byDateRange, byDateRangeAdvanced, byMonth, byMonthPlayoffs, byDayOfWeek, byDayOfWeekPlayoffs, homeAndAway, homeAndAwayPlayoffs, winLoss, winLossPlayoffs, rankings, rankingsByYear, statsSingleSeason, statsSingleSeasonAdvanced, hotColdZones, availableStats, opponentsFaced, gameTypeStats, firstYearStats, lastYearStats, statSplits, statSplitsAdvanced, atGameStart, vsOpponents, sabermetricsMultiTeam, projected_Zips, projected_ZipsRos, projected_Zips2YR, projected_Zips3YR. | |
| game_type | string | No | MLB game type Allowed values: S, R, F, D, L, W, C, P, A, I, E. | ||
| start_date | string | No | Start date for byDateRange stat types; requires end_date | ||
| end_date | string | No | End date for byDateRange stat types; requires start_date | ||
| opponent_team_id | string | No | Required by vsTeam stat types | ||
| opponent_player_id | string | No | Required by vsPlayer stat types | ||
| league_id | string | No | MLB league id Allowed values: 103, 104. | ||
| team_id | string | No | Optional MLB team id; discover current team ids with mlb_teams | ||
| position | string | No | Hitter position; use only with group=hitting Allowed values: C, 1B, 2B, 3B, SS, LF, CF, RF, DH, OF, IF. | ||
| player_pool | string | No | Qualified-player pool Allowed values: QUALIFIED, ALL. | ||
| limit | integer | No | Results to return (1-100) Minimum: 1. Maximum: 100. | ||
| offset | integer | No | Zero-based result offset (0-10000) Minimum: 0. Maximum: 10000. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/mlb/league-stats?group=hitting&stat_type=projected&game_type=S&league_id=103&position=C&player_pool=QUALIFIED&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"season": 2026,
"group": "hitting",
"type": "season",
"total": 10,
"limit": 10,
"offset": 0,
"splits": [
{
"rank": 1,
"player": {
"id": 592450,
"name": "Aaron Judge"
},
"stats": {
"homeRuns": 58
}
}
]
}
}Request schema
No body schema
Response schema
#/definitions/mlb.statsResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | mlb.StatsResponse | No | ||||
| data.fetched_at | string | No | Time the data was fetched, in UTC (RFC 3339). | |||
| data.group | string | No | Stat group that was returned, for example `hitting` or `pitching`. | |||
| data.limit | integer | No | Maximum number of rows requested. Omitted when no limit applies. | |||
| data.offset | integer | No | Number of rows skipped before this page. Omitted when zero. | |||
| data.player_id | integer | No | MLB player id the stats are for. Omitted for team and league-wide tables. | |||
| data.season | integer | No | Season the stats cover, as a year. | |||
| data.source_url | string | No | URL the data was read from. | |||
| data.splits | array | No | Rows of statistics, one item per player, team or period. | |||
| data.splits[].league | object | No | League the row belongs to. Omitted when MLB gives none. | |||
| data.splits[].league.id | integer | No | MLB id of the player or league. | |||
| data.splits[].league.name | string | No | Name of the player or league. | |||
| data.splits[].player | object | No | Player the row belongs to. Omitted when MLB gives none. | |||
| data.splits[].player.id | integer | No | MLB id of the player or league. | |||
| data.splits[].player.name | string | No | Name of the player or league. | |||
| data.splits[].position | string | No | Position name as MLB lists it. Omitted when MLB gives none. | |||
| data.splits[].rank | integer | No | Position of the row in the ranking. Omitted when the table is not ranked. | |||
| data.splits[].season | string | No | Season the row covers, as a year. Omitted for rows that are not tied to one season. | |||
| data.splits[].stats | object | No | Statistics for the row, as named values such as `homeRuns`. The set of stats depends on `group` and `type`. | |||
| data.splits[].team | object | No | Team the row belongs to. Omitted when MLB gives none. | |||
| data.splits[].team.abbreviation | string | No | Short team abbreviation, for example `NYY`. Omitted when not available. | |||
| data.splits[].team.id | integer | No | MLB team id. | |||
| data.splits[].team.name | string | No | Full team name. | |||
| data.team_id | integer | No | MLB team id the stats are limited to. Omitted when not limited to a team. | |||
| data.total | integer | No | Total number of rows available. | |||
| data.type | string | No | Stats type label. Always `season`. | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 429 | Too Many Requests | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/mlb/league-stats?group=hitting&stat_type=projected&game_type=S&league_id=103&position=C&player_pool=QUALIFIED&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"