# Baseball Savant Statcast Scraper: MLB Exit Velo & xStats (`scrapers_lat/baseball-savant-statcast-scraper`) Actor

Scrape MLB Statcast leaderboards: exit velocity, launch angle, barrels, hard-hit rate, sweet-spot %, and expected stats (xBA, xSLG, xwOBA). Filter by season, team, batter or pitcher. Optional AI scouting insight. Export to JSON, CSV or Excel.

- **URL**: https://apify.com/scrapers\_lat/baseball-savant-statcast-scraper.md
- **Developed by:** [Scrapers Lat](https://apify.com/scrapers_lat) (community)
- **Categories:** Developer tools, Automation, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $8.32 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

[![Baseball Savant Statcast Scraper: MLB Exit Velo & xStats](https://scrapers.lat/banners/baseball-savant-statcast-scraper.png)](https://apify.com/scrapers_lat/baseball-savant-statcast-scraper)

## Baseball Savant Statcast Scraper

Pull MLB Statcast advanced-metric leaderboards from Baseball Savant as clean, structured rows: exit velocity, launch angle, barrels, hard-hit rate, sweet-spot percent, batted-ball distances and expected stats (xBA, xSLG, xwOBA). One row per player, filterable by season, team, batter or pitcher, with optional expected-stats enrichment and an optional AI scouting summary.

Here is one real result from the statcast batter leaderboard, with the core fields the actor returns:

```json
{
  "playerId": 650333,
  "firstName": "Luis",
  "lastName": "Arraez",
  "playerName": "Luis Arraez",
  "playerType": "batter",
  "year": 2025,
  "attempts": 618,
  "avg_hit_angle": 12.2,
  "anglesweetspotpercent": 36.9,
  "max_hit_speed": 107.8,
  "avg_hit_speed": 86.1,
  "ev50": 93.6,
  "fbld": 87.6,
  "gb": 85.1,
  "max_distance": 402,
  "avg_distance": 152,
  "avg_hr_distance": 370,
  "ev95plus": 103,
  "ev95percent": 16.7,
  "barrels": 7,
  "brl_percent": 1.1,
  "brl_pa": 1,
  "hardHitPct": 16.7,
  "xBA": null,
  "xSLG": null,
  "xwOBA": null,
  "aiPowerProfile": null,
  "aiContactQuality": null,
  "aiLuckIndicator": null,
  "aiSummary": null,
  "source": "Baseball Savant",
  "observedAt": "2026-08-17T00:38:04.078Z"
}
```

Turn on the expected-stats add-on to fill in `xBA`, `xSLG`, `xwOBA` and their gap versus actual results. Turn on the AI add-on to fill in `aiPowerProfile`, `aiContactQuality`, `aiLuckIndicator` and `aiSummary`.

### What you get

- Every qualified player from the chosen leaderboard, one clean row each.
- Full Statcast batted-ball profile: average and max exit velocity, median exit velocity, launch angle, sweet-spot percent, barrels, barrel percent, barrels per plate appearance, hard-hit percent and batted-ball distances.
- Expected statistics on the expected\_statistics board (or merged as an add-on): xBA, xSLG, xwOBA and the difference versus actual BA, SLG and wOBA.
- Batters or pitchers, any season from 2015 onward, optional team and player-name filters.
- Optional AI scouting summary per player: power profile, contact quality, luck indicator and a one-line insight.
- Export to JSON, CSV or Excel.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `leaderboard` | select | `statcast` (batted-ball metrics) or `expected_statistics` (xBA/xSLG/xwOBA). |
| `playerType` | select | `batter` or `pitcher`. |
| `year` | integer | MLB season, for example 2025 (2015 onward). |
| `team` | string | Optional three-letter team code, for example NYY, LAD, BOS. |
| `minBattedBallEvents` | string | Qualifier: `q` for qualified players, or a minimum count. |
| `playerName` | string | Optional case-insensitive name filter. |
| `includeExpectedStats` | boolean | Paid add-on: merge expected stats onto statcast rows. |
| `withAiSummary` | boolean | Paid add-on: add an AI scouting summary per player. |
| `maxResults` | integer | Max players to collect (free plans capped at 10). |
| `leaderboardPath` | string | Advanced: raw leaderboard path override. |
| `extraQuery` | string | Advanced: extra URL query parameters. |

### Output

| Field | Description |
| --- | --- |
| `playerId`, `playerName`, `firstName`, `lastName` | Player identity. |
| `playerType`, `year` | Batter/pitcher and season. |
| `attempts` | Batted-ball events. |
| `avg_hit_speed`, `max_hit_speed`, `ev50` | Average, maximum and median exit velocity (mph). |
| `ev95plus`, `ev95percent` | Batted balls 95+ mph and their percent. |
| `avg_hit_angle`, `anglesweetspotpercent` | Launch angle and sweet-spot percent. |
| `fbld`, `gb` | Exit velocity on fly balls/line drives and ground balls. |
| `max_distance`, `avg_distance`, `avg_hr_distance` | Batted-ball distances (feet). |
| `barrels`, `brl_percent`, `brl_pa` | Barrels, barrel percent and barrels per plate appearance. |
| `hardHitPct` | Derived hard-hit percent. |
| `pa`, `bip`, `ba`, `slg`, `woba` | Expected\_statistics board fields. |
| `xBA`, `xSLG`, `xwOBA` | Expected stats (add-on or expected\_statistics board). |
| `baMinusXbaDiff`, `slgMinusXslgDiff`, `wobaMinusXwobaDiff` | Actual minus expected. |
| `aiPowerProfile`, `aiContactQuality`, `aiLuckIndicator`, `aiSummary` | AI add-on fields. |
| `source`, `observedAt` | Provenance and scrape timestamp. |

### Use cases

- MLB analytics and sabermetrics: build exit-velocity, barrel and hard-hit leaderboards for any season.
- Fantasy baseball: find hitters whose Statcast quality of contact outpaces their surface stats.
- Sports betting and modeling: feed expected stats (xBA, xSLG, xwOBA) and batted-ball data into player-prop and projection models.
- Scouting and player development: compare batted-ball profiles across players, teams and seasons.
- Content and research: power articles, dashboards and newsletters with current Statcast numbers.

### Billing

This actor is priced pay per event.

| Event | When it fires | Price (USD) |
| --- | --- | --- |
| `result` | Each player row returned. | $0.008 |
| `expected_stats` | Once per run when expected stats are merged onto players (add-on). | $0.008 |
| `ai_summary` | Once per player when a usable AI scouting summary is produced (add-on). | $0.012 |

The add-ons are opt-in and off by default, and both are disabled for free Apify plans. You are never charged when a run fails or returns no data.

# Actor input Schema

## `leaderboard` (type: `string`):

Which Baseball Savant leaderboard to pull. 'statcast' = advanced batted-ball metrics (exit velocity, launch angle, barrels, hard-hit %). 'expected\_statistics' = expected stats (xBA, xSLG, xwOBA vs actual).

## `playerType` (type: `string`):

Pull the batter or the pitcher version of the leaderboard.

## `year` (type: `integer`):

MLB season to pull, for example 2025. Statcast data is available from 2015 onward.

## `team` (type: `string`):

Optional. Three-letter team abbreviation to filter by, for example NYY, LAD or BOS. Leave empty for all teams.

## `minBattedBallEvents` (type: `string`):

Minimum threshold to qualify. Use 'q' for the qualified players only (default), or a number for a minimum count of batted-ball events / plate appearances.

## `playerName` (type: `string`):

Optional. Keep only players whose name contains this text (case-insensitive), for example 'judge' or 'ohtani'.

## `includeExpectedStats` (type: `boolean`):

Opt-in paid add-on (statcast leaderboard only). Merges each player's expected stats (xBA, xSLG, xwOBA and their gap vs actual) onto the row. Billed once per run when merged. Disabled for free Apify plans.

## `withAiSummary` (type: `boolean`):

Opt-in paid AI add-on. For each player, writes a scouting insight (power profile, contact quality, over/underperformance vs expected stats and a short summary). Billed per player only when a usable summary is produced. Disabled for free Apify plans.

## `maxResults` (type: `integer`):

Maximum number of players to collect. Free Apify plans are capped at 10 per run.

## `leaderboardPath` (type: `string`):

Power users: a raw Baseball Savant leaderboard path such as 'statcast' or 'expected\_statistics'. Overrides the leaderboard selector above when set.

## `extraQuery` (type: `string`):

Power users: extra URL query parameters appended to the leaderboard request, for example 'position=OF\&batSide=R'. Do not include the csv parameter.

## Actor input object example

```json
{
  "leaderboard": "statcast",
  "playerType": "batter",
  "year": 2025,
  "minBattedBallEvents": "q",
  "includeExpectedStats": false,
  "withAiSummary": false,
  "maxResults": 100
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "year": 2025,
    "maxResults": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers_lat/baseball-savant-statcast-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "year": 2025,
    "maxResults": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers_lat/baseball-savant-statcast-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "year": 2025,
  "maxResults": 100
}' |
apify call scrapers_lat/baseball-savant-statcast-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers_lat/baseball-savant-statcast-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/yxLE5dG6P5lFBWXNB/builds/iLkDJgg5fw928vKcC/openapi.json
