Official MLB Team, Schedule & Stat Line Scraper
Get baseball data from MLB's own public Stats API: season hitting, pitching, and fielding lines, team rosters, game schedules and scores, or live division standings. No authentication required.
Open in Apify Store$0.99 / 1K on Free
Short answer
Official MLB Team, Schedule & Stat Line Scraper is an Apify Store Actor for MLB.com data that returns 12 published output fields, including playerName, teamName, gamePk, officialDate. It lists $0.99 per 1,000 results on the Free plan (pay per event), $0.49 on the Business plan. It takes 18 input settings; one is required (mode). It covers 2 of the 6 core MLB.com fields this site tracks. Last updated Oct 25, 2026.
From the public Store listing and published build schema, synced 2026-11-12.What it returns
12 fields from the published dataset schema. Export as JSON, CSV or Excel, or read the dataset through the Apify API.
recordTypeplayerNameteamNamegamePkofficialDatestatGroupleaderCategoryrankvaluehomeRunsbattingAverageera
Not in the schema among the core MLB.com fields: game, home, away, stat. The field matrix shows which other tools return them.
How it differs from the other MLB.com Actors
Among the 2 catalogue Actors for MLB.com with a published schema, only this one returns gamePk, officialDate, statGroup, leaderCategory, value, homeRuns, battingAverage, era.
Pick another Actor if you need
| Actor | Fields it adds | Price / 1K |
|---|---|---|
| MLB Teams, Player Search & Season Schedule Lookup | eventName, homeTeam, awayTeam, matchDate | $0.99 |
Input
| Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| mode | string | Yes | getPlayerStats | What to fetch. Nine modes cover teams, players/rosters, player stats, game logs, schedules, standings, box scores, leaders, and reference data. |
| seasons | array | No | [] | Season years, e.g. 2024 or 2025. Leave empty for the current season. Stats cover 1876 onward; schedules cover 1901 onward. Multiple seasons can be fetched in one run (mode=getTeams, getPlayers, getPlayerStats, getSchedule, getStandings, getLeaders, getReference). |
| teamIds | array | No | [] | Filter by MLB team IDs (147 = Yankees), team names (Yankees), abbreviations (NYY), or team URLs (https://www.mlb.com/yankees). Leave empty for all teams. Used by teams, players, player stats, schedule, standings, box score, and leaders modes. |
| playerIds | array | No | [] | MLB player IDs, e.g. 660271 for Shohei Ohtani. Used by players, player stats, and game log modes. Use Search query to find a player ID by name. |
| gamePks | array | No | [] | MLB game IDs (gamePk), e.g. 822974. Used by mode=getBoxscore. Leave empty to derive games from seasons, dates, or teams. |
| startDate | string | No | – | Start date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange). A single date can be set in either date field. |
| endDate | string | No | – | End date in YYYY-MM-DD format. Used by schedule, box score, and player stats (statType=byDateRange). |
| statGroup | string | No | hitting | Which stat category to return for players, player stats, game logs, box scores, and leaders. |
| statType | string | No | season | Scope for mode=getPlayerStats. Season, career, and date-range stats work for the whole player pool; season-by-season, month, day-of-week, and home/away splits require playerIds or teamIds. |
| rosterType | string | No | active | Which roster to return for mode=getPlayers when teamIds is set. |
Show the other 8 settings
| Setting | Type | Required | Default | What it does |
|---|---|---|---|---|
| searchQuery | string | No | – | Find players by name for mode=getPlayers, e.g. Ohtani or Aaron Judge. Returns up to 50 matching players. |
| leagueId | string | No | both | Filter standings and leaders to the American League, National League, or both. |
| gameType | string | No | R | Filter games and stats by game type. Regular season is R; other codes include spring training (S), wild card (F), division series (D), league championship (L), World Series (W), and All-Star (A). |
| leaderCategory | string | No | homeRuns | Stat category for mode=getLeaders. Choose a category that belongs to the selected stat group, e.g. homeRuns, battingAverage, or runsBattedIn for hitting; earnedRunAverage, strikeouts, or saves for pitching; fieldingPercentage or errors for fielding. |
| referenceType | string | No | venues | Which reference dataset to return for mode=getReference. |
| includeStats | boolean | No | false | For mode=getPlayers, attach each player's season stats for the selected stat group. |
| includeTeamTotals | boolean | No | false | For mode=getBoxscore, add one team-total record per side per game, including the inning-by-inning line score. |
| maxItems | integer | No | 50 | Hard cap on the number of records returned (1–10,000). |
Example input
Built from the input form's published example values and defaults.
{
"mode": "getPlayers",
"seasons": [],
"teamIds": [],
"playerIds": [],
"gamePks": [],
"statGroup": "hitting",
"statType": "season",
"rosterType": "active",
"leagueId": "both",
"gameType": "R",
"leaderCategory": "homeRuns",
"referenceType": "venues",
"includeStats": false,
"includeTeamTotals": false,
"maxItems": 3
} Run it from code or an AI agent
The same run through the Apify API, with the example input. You need an Apify API token; the run is billed to your account at the Store price.
Python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run_input = {
"mode": "getPlayers",
"seasons": [],
"teamIds": [],
"playerIds": [],
"gamePks": [],
"statGroup": "hitting",
"statType": "season",
"rosterType": "active",
"leagueId": "both",
"gameType": "R",
"leaderCategory": "homeRuns",
"referenceType": "venues",
"includeStats": False,
"includeTeamTotals": False,
"maxItems": 3
}
run = client.actor("dataspryva/official-mlb-team-schedule-and-stat-line-scraper").call(run_input=run_input)
if run is None:
raise RuntimeError("The Actor run was not found.")
for item in client.dataset(run.default_dataset_id).iterate_items():
print(item) pip install apify-client
JavaScript
import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "<YOUR_APIFY_TOKEN>" });
const input = {
"mode": "getPlayers",
"seasons": [],
"teamIds": [],
"playerIds": [],
"gamePks": [],
"statGroup": "hitting",
"statType": "season",
"rosterType": "active",
"leagueId": "both",
"gameType": "R",
"leaderCategory": "homeRuns",
"referenceType": "venues",
"includeStats": false,
"includeTeamTotals": false,
"maxItems": 3
};
const run = await client.actor("dataspryva/official-mlb-team-schedule-and-stat-line-scraper").call(input);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items); npm install apify-client
cURL
curl -X POST "https://api.apify.com/v2/actors/dataspryva~official-mlb-team-schedule-and-stat-line-scraper/run-sync-get-dataset-items" -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" -d '{"mode":"getPlayers","seasons":[],"teamIds":[],"playerIds":[],"gamePks":[],"statGroup":"hitting","statType":"season","rosterType":"active","leagueId":"both","gameType":"R","leaderCategory":"homeRuns","referenceType":"venues","includeStats":false,"includeTeamTotals":false,"maxItems":3}' Waits for the run and returns the dataset items (runs over 300 seconds return HTTP 408; start an async run instead).
MCP (AI agents)
{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=dataspryva/official-mlb-team-schedule-and-stat-line-scraper",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
} Adds this Actor as a tool in an MCP client that takes a remote server URL (Cursor, VS Code, Claude Code) through Apify's hosted MCP server. OAuth sign-in also works without the header. Clients that only start local servers can wrap the URL with npx mcp-remote.
What a run costs
The result rate falls on higher Apify plans. Each figure is the published per-result rate times the number of results.
| Apify plan | Per 1,000 | 10,000 results | 100,000 results |
|---|---|---|---|
| Free plan | $0.99 | $9.90 | $99 |
| Starter plan | $0.82 | $8.20 | $82 |
| Scale plan | $0.66 | $6.60 | $66 |
| Business plan | $0.49 | $4.90 | $49 |
- Every run also has a start event, charged per GB of memory (minimum one): $0.10 on Free, $0.03 on Business. At its default memory of 4 GB a run starts at $0.40 on Free. Fewer, larger runs keep this small.
- The Free plan includes $5 of monthly usage (Apify pricing, checked 2026-11-11); at the Free rate that covers at most about 5,050 results, less start events and platform usage.
- Worked example: 10,000 results in one run on the Free plan cost $10.30 ($9.90 for results + $0.40 start), plus Apify platform usage (compute), billed separately by Apify.
- Pay per event. Platform usage (compute) is billed by Apify on top of the event prices. Compare other tools in the cost estimator.
Where it fits among MLB.com routes
It ranks 2 of 2 catalogue Actors for MLB.com on the published formula (fields, price, reliability, freshness). Its line is highlighted on the map.
- 1 MLB Teams, Player Search & Season Schedule Lookup 6 output fields, pay per event 2 of 6 core fields
$0.99 / 1K - 2 Official MLB Team, Schedule & Stat Line Scraper 12 output fields, pay per event 2 of 6 core fields
$0.99 / 1K - + 7 other Store tools, combined Reference only 6 of 6 core fields
from $1.00 / 1K - API MLB Stats API (statsapi.mlb.com) Limited access fields not compared
Stops are fields. A ring means the field is in that route's published output schema; no ring means the line passes without it. Bold labels are the core fields for this website, the rest are fields that differ between routes. A white capsule means every data line stops there. The red line is the official API; its field coverage is not compared. A crossed red line means there is no open official API.
Official route: MLB Stats API (statsapi.mlb.com)
Limited access. MLB's own Stats API at statsapi.mlb.com answers without a key but is not published as a developer product. Every response links to an MLB Advanced Media notice that permits only individual, non-commercial, non-bulk use.
No public self-serve price is published; other uses need written authorization from MLB Advanced Media.
Other Store tools for MLB.com
Reference only, from their public listings.
| Tool | Fields | Price / 1K |
|---|---|---|
| MLB Scraper | 51 | $1.00 |
| MLB Stats Scraper | 84 | $2.00 |
| MLB Stats Scraper: Player Stats, Scores, Standings & Box Score | 120 | $8.00 |
| MLB Stats Scraper | – | $4.00 |
| MLB Stats Scraper | 120 | $3.99 |
What people use it for
- schedule tracking
- team research
- player statistics
Other catalogue Actors for MLB.com
MLB Teams, Player Search & Season Schedule Lookup
Look up every current MLB team, search for a player by name, or pull a full season's schedule and scores, with stadium, roster, and matchup…
Similar Actors
ESPN Live Scores, Schedules & Game Odds Scraper
Get live scores, final results and upcoming fixtures for 16 leagues across basketball, football, baseball, hockey and soccer, with optional…
ESPN Scores, Standings, Teams & News by League
Pull live and recent scores, league standings, team rosters, news headlines, and full game boxscores for NFL, NBA, MLB, NHL, MLS, Premier League,…
Multi-League Season Results & Team Lookup
Get final scores for a season across 10 major soccer, football, basketball, baseball, and hockey leagues, or look up every team's roster details…
SofaScore Live Scores, Standings & Team Search Data
Get SofaScore live scores, scheduled fixtures, league standings and team/player/tournament search results across 17 sports including football,…
NCAA Stats & Scores: Leaderboards, Polls & Standings
NCAA stats and scores: team and player leaderboards, polls, standings, school directory, schedules, team seasons, brackets, game details and…
Google Maps Hours, Open-Now Status & Holiday Schedule
Get structured opening hours for all 7 days, live open/closed status, holiday schedules and a next open/close countdown from any Google Maps place…
Questions people ask
How much does Official MLB Team, Schedule & Stat Line Scraper cost?
The published result rate depends on your Apify plan: $0.99 per 1,000 on Free, $0.82 per 1,000 on Starter, $0.66 per 1,000 on Scale, $0.49 per 1,000 on Business. So 10,000 results cost about $9.90 on the Free plan and $4.90 on Business, plus a start fee of $0.10 per run per GB of memory on Free. Platform usage is billed separately.
What data does Official MLB Team, Schedule & Stat Line Scraper return?
Its published output schema lists 12 fields: recordType, playerName, teamName, gamePk, officialDate, statGroup, leaderCategory, rank, value, homeRuns, battingAverage, era. A listed field is not guaranteed to be filled in every row.
What input does Official MLB Team, Schedule & Stat Line Scraper need?
Required: mode. Optional settings include seasons, teamIds, playerIds, gamePks, startDate, endDate.
What are the alternatives to Official MLB Team, Schedule & Stat Line Scraper for MLB.com?
2 catalogue Actors cover MLB.com. Close alternatives: MLB Teams, Player Search & Season Schedule Lookup. The MLB.com page compares all of them field by field.
How do I run Official MLB Team, Schedule & Stat Line Scraper from Python or the API?
Use the Apify API client: in Python, ApifyClient(token).actor("dataspryva/official-mlb-team-schedule-and-stat-line-scraper").call(run_input=...), then read the run's default dataset (run.default_dataset_id); in JavaScript the same call is client.actor("dataspryva/official-mlb-team-schedule-and-stat-line-scraper").call(input). Without a client, POST the input JSON to https://api.apify.com/v2/actors/dataspryva~official-mlb-team-schedule-and-stat-line-scraper/run-sync-get-dataset-items with your API token. Ready-to-paste code with the example input is on this page.
Sources
- Official MLB Team, Schedule & Stat Line Scraper on Apify Store
- Published build with input and output schema (JSON)
- MLB Stats API (statsapi.mlb.com) documentation
Cite this page
Scraper Finder. "Official MLB Team, Schedule & Stat Line Scraper." https://scraperfinder.com/catalogue/official-mlb-team-schedule-and-stat-line-scraper/ (data checked 2026-11-12).
Run Official MLB Team, Schedule & Stat Line Scraper
$0.99 per 1,000 results. Paste the example input above, set your MLB.com query, then export the dataset. Still choosing? Compare every MLB.com route.