Skip to content
//MLB Stats Scraper example\\

Player box score lines for one game

Every batter's and pitcher's line from one game, by game id.

Updated November 22, 2026

What this example returns

This example returns up to 40 results.

The dataset’s “Box scores” view shows 16 columns: officialDate, gamePk, team, opponent, side, fullName, battingSummary, pitchingSummary, runs, hits, homeRuns, rbi, errors, inningsPitched, strikeOutsPitching, and url. See every output field.

What each setting does

The input this example runs MLB Stats Scraper with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

What to scrape mode

Box scores: per team or per player

Which data to pull. Standings: division tables. Schedule: games, scores, probable and winning pitchers. Player stats: season hitting, pitching or fielding lines. Box scores: team totals or every player's line per game. Players: rosters with bios. Leaders: league leaderboards. Teams: all 30 clubs.

Default: Standings: division tables → this example uses Box scores: per team or per player

Game ids or URLs gamePks

823431

Schedule and box score modes: only these games, by gamePk (823431) or mlb.com gameday URL. Empty means every game of the date, date range or season.

Maximum results maxItems

40

Maximum number of rows to save (and pay for). 0 means no limit. A full regular season is about 2,430 games.

Default: 30 → this example uses 40

Box score detail boxScoreLevel

Every player's line

Box scores mode: two team-total rows per game, or one row per player who batted or pitched.

Default: Team totals (2 rows per game) → this example uses Every player's line

.json
{
  "mode": "gameDetails",
  "gamePks": [
    "823431"
  ],
  "boxScoreLevel": "players",
  "maxItems": 40
}

What it costs

You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.

  • Resultfrom $0.0012One row saved to the dataset: a team, player, game, standings row, season stat line, box-score line or leaderboard entry.
  • Actor startfrom $0.0015Charged once per run.

Full pricing

When to use this example

From the MLB Stats Scraper readme:

How many results can I get?

As many as the source has: a full season of games is about 2,430 rows, and seasons go back to 1876. Set Maximum results to 0 for no limit.

Other ways to run MLB Stats Scraper

All examples of MLB Stats Scraper

About MLB Stats Scraper

Scrape MLB standings, schedules and scores, season player stats, box scores, rosters with bios, league leaders and teams from the official MLB Stats API. Multi-season, back to 1876. No login needed.

Price:
From $1.20 / 1,000 results
Developer:
Querystone
Categories:
Sports, Developer tools

MLB Stats Scraper pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.