The Mine Works
← All Scrapers
Apify Actor · Research

MLB Stats API Scraper

MLB box scores, game logs, standings and rosters as flat rows

View on Apify Store →
From $2.50 / 1,000 records
Status
State ● Live
Pricing PPE
Category Research
Overview

What it does

Pulls baseball data from MLB's official Stats API, the JSON service MLB's own sites read, as rows you can open in a spreadsheet. Pick one data type per run: games with the line score by inning, box scores with a row per player per game, player game logs, player season stats, standings or rosters. MLB and five minor league levels are covered, date ranges run to 366 days and a run can return 200,000 rows. Some older box scores list players without their stats, so those games return no rows.

Features

Built in

  • ✓ Six data types, one chosen per run
  • ✓ Box score rows carry 64 to 118 fields
  • ✓ MLB plus Triple-A down to Rookie level
  • ✓ Rate stats as numbers, placeholders left out
  • ✓ 366 day ranges, up to 200,000 rows per run
FAQ

Common questions

What is one row for each data type? +

games gives a game with its line score, pitchers, venue and weather. boxScores gives a player's line in one game. playerGameLogs covers a season game by game. playerSeasonStats gives a season line. standings gives a team. rosters gives a player on a roster.

What do rows cost? +

$0.0025 per row on Gold and above and $0.004 on the Apify free plan. The flat $0.005 start fee applies to every run, including one that returns nothing. Rows are free for dates with no games, games not yet started, postponed and cancelled games, unmatched names and duplicates.

Is an API key needed? +

No key, no login and no browser. It reads statsapi.mlb.com directly. A full day of box scores, 426 player lines from 14 games, took seven seconds from 17 requests in one test, every request answered first time.

How far back does it go? +

Game scores for 1950, standings for 1927 and full box score lines for 1955 all returned in checks. The gap is that some older games list the lineups without stats, which yields no box score rows for that game and no charge.

How are players and teams matched? +

Names are compared without accents or capitals, so Jose Caballero finds José Caballero. A name two players share returns both. Teams accept a full name, nickname, abbreviation or MLB id, and an unmatched name appears free in the summary.

Get Started

Try it on Apify.

Pay only for results delivered. No credit card required to sign up.

Apify Store

Find a ready-made scraper for your job

Apify has over 80,000 scrapers and automations, ours included. Start free with $5 of platform credit every month.