MLB API endpoint
Use Crawlora's MLB Bat Tracking API to extract supported public MLB data as structured JSON. This page includes request parameters, cURL examples, response schema, error behavior, credit cost, and a Playground link for testing before integration.
/mlb/statcast-bat-trackingReturns batter, batting-team, pitcher, pitching-team, or league bat-tracking rows with the live page's season, game type, swing threshold, date, side, contact, attack zone, team, pitch, count, and grouping filters. Use mlb_discovery for the same complete value sets. Multi-value filters are passed as repeated query parameters. Developers commonly use this endpoint for data enrichment, monitoring, research dashboards, internal automation, and agent-native workflows that need repeatable structured public web data. Authentication uses the documented Crawlora headers, and usage is metered with the credit cost shown on this page.
Request parameters are generated from the active endpoint catalog. Required values must be sent before Crawlora can call the upstream public web data source.
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| type | string | No | Table row type Allowed values: batter, batting-team, pitcher, pitching-team, league | ||
| season_start | string | No | First season Allowed values: 2023, 2024, 2025, 2026 | ||
| season_end | string | No | Last season; must be >= season_start Allowed values: 2023, 2024, 2025, 2026 | ||
| game_type | string | No | Game type Allowed values: Any, Playoff, Regular | ||
| min_swings | string | No | Minimum swing qualifier Allowed values: q, 1, 5, 10, 25, 50, 100, 200, 500, 1000 | ||
| min_group_swings | string | No | Minimum swings per grouped row Allowed values: 1, 5, 10, 25, 50, 100, 200, 500, 1000 | ||
| date_start | string | No | Optional date range start in YYYY-MM-DD | ||
| date_end | string | No | Optional date range end in YYYY-MM-DD | ||
| bat_side | string | No | Batter side Allowed values: L, R | ||
| contact_type | string | No | Contact type Allowed values: 2, 4, 9 | ||
| is_hard_hit | string | No | Hard-hit filter Allowed values: 1, 0 | ||
| attack_zone | string | No | Attack zone Allowed values: 0, 1, 1.1, 2, 3 | ||
| pitch_hand | string | No | Pitcher hand Allowed values: L, R | ||
| teams | array | No | One or more MLB team ids | ||
| pitch_types | array | No | One or more pitch types | ||
| counts | array | No | One or more ball-strike counts | ||
| group_by | array | No | Up to four grouping columns | ||
| sort | string | No | Local row sort field Allowed values: avg_batter_x_position, avg_batter_y_position, avg_intercept_x_vs_batter, avg_intercept_y_vs_batter, avg_foot_sep0, avg_foot_angle0, attack_direction_pullopp, rate_ideal_attack_angle, attack_angle, avg_plane_vertical_angle, avg_sweetspot_speed_mph, avg_sweetspot_speed_mph_qualified, avg_is_sweetspot_speed_high, avg_is_sweetspot_speed_high_qualified, squared_up, squared_up_qualified, squared_up_per_bat_contact, squared_up_per_swing, squared_up_with_speed, squared_up_with_speed_qualified, squared_up_with_speed_per_bat_contact, squared_up_with_speed_per_swing, swing_length_qualified, swords, swings_qualified, percent_qualified, hit_into_play_qualified, bat_contact, bat_contact_qualified, count, delta_run_exp, hit_into_play_per_swing, pitcher_delta_run_exp, strikes_swinging_qualified, sweetspot_speed_high_qualified, strike_swinging_per_swing, id, name, batter_name, b_name_display_first_last, savant_batter_id, team_id, team_name, side, n_sides, n_teams, bat_side_formatted | ||
| sort_dir | string | No | Sort direction Allowed values: asc, desc | ||
| limit | integer | No | Rows per page (1-500) Minimum: 1. Maximum: 500. | ||
| offset | integer | No | Zero-based row offset Minimum: 0. Maximum: 5000. | ||
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/mlb/statcast-bat-tracking?type=batter&season_start=2023&season_end=2023&game_type=Any&min_swings=q&min_group_swings=1&bat_side=L&contact_type=2&is_hard_hit=1&attack_zone=0&pitch_hand=L&sort=avg_batter_x_position&sort_dir=asc&limit=10" \ -H "x-api-key: $CRAWLORA_API_KEY"
Send your scraping API key in the x-api-key header. Use the console API Keys page to rotate or select the active key.
Endpoint usage is metered in credits. The plan prices, included credits, limits, and overage rates below match the active backend billing configuration.
| Plan | Price | Included credits | Daily cap | Rate limit | Overage |
|---|---|---|---|---|---|
| Free | $0/mo | 2,000 | 500 daily credits | 5/min | No overage |
| Starter | $9/mo | 20,000 | 5,000 daily credits | 15/min | $0.75/1,000 overage credits when enabled |
| Growth | $29/mo | 100,000 | 25,000 daily credits | 45/min | $0.45/1,000 overage credits when enabled |
| Pro | $79/mo | 400,000 | No daily cap | 120/min | $0.30/1,000 overage credits |
| Business | $199/mo | 1,200,000 | No daily cap | 300/min | $0.20/1,000 overage credits |
| Enterprise | $499/mo | 5,000,000 | No daily cap | 1,000/min | $0.12/1,000 overage credits |
This endpoint is executed through Crawlora's managed scraping infrastructure.
Example response: ```json { "code": 200, "msg": "OK", "data": { "board": "bat_tracking", "type": "batter", "season_start": "2026", "season_end": "2026", "game_type": "Regular", "min_swings": "q", "min_group_swings": "1", "total": 203, "sort": "avg_sweetspot_speed_mph_qualified", "sort_dir": "desc", "offset": 0, "limit": 100, "rows": [{"id": 691406, "name": "Caminero, Junior", "team_id": 139, "team_name": "Rays", "avg_sweetspot_speed_mph_qualified": "79.448458618"}] } } ```
Crawlora does not silently return bad data when the upstream page cannot be used.
| Status | Common failure case |
|---|---|
| 400 | Invalid input or missing required parameter |
| 429 | Plan or endpoint rate limit exceeded |
| 500 | Internal execution error |
| 502 | Upstream platform failed, returned unusable HTML, or served a challenge page that could not be resolved |
When possible, Crawlora returns structured error context so your integration can retry, back off, or inspect the request.
| Status | Description | Schema |
|---|---|---|
| 400 | Bad Request | #/definitions/app.Response |
| 404 | Not Found | #/definitions/app.Response |
| 503 | Service Unavailable | #/definitions/app.Response |
{
"code": 200,
"msg": "OK",
"data": {
"board": "bat_tracking",
"type": "batter",
"season_start": "2026",
"season_end": "2026",
"game_type": "Regular",
"min_swings": "q",
"min_group_swings": "1",
"total": 203,
"sort": "avg_sweetspot_speed_mph_qualified",
"sort_dir": "desc",
"offset": 0,
"limit": 100,
"rows": [
{
"id": 691406,
"name": "Caminero, Junior",
"team_id": 139,
"team_name": "Rays",
"avg_sweetspot_speed_mph_qualified": "79.448458618"
}
]
}
}Request schema
No body schema
Response schema
#/definitions/mlb.statcastBatTrackingResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| board | string | No | ||||
| date_end | string | No | ||||
| date_start | string | No | ||||
| fetched_at | string | No | ||||
| game_type | string | No | ||||
| limit | integer | No | ||||
| min_group_swings | string | No | ||||
| min_swings | string | No | ||||
| offset | integer | No | ||||
| rows | array | No | ||||
| season_end | string | No | ||||
| season_start | string | No | ||||
| sort | string | No | ||||
| sort_dir | string | No | ||||
| source_url | string | No | ||||
| total | integer | No | ||||
| type | string | No |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/mlb/statcast-bat-tracking?type=batter&season_start=2023&season_end=2023&game_type=Any&min_swings=q&min_group_swings=1&bat_side=L&contact_type=2&is_hard_hit=1&attack_zone=0&pitch_hand=L&sort=avg_batter_x_position&sort_dir=asc&limit=10" \
-H "x-api-key: $CRAWLORA_API_KEY"Crawlora is designed for responsible structured public web data workflows. Customers are responsible for using Crawlora in compliance with applicable laws, third-party rights, target-platform rules, and Crawlora terms.
Read Crawlora terms