Skip to content
//MLB Stats Scraper example\\

Yankees 40-man roster with bios

Jersey, position, birth date, birthplace, height, weight, bats and throws.

Updated November 22, 2026

What this example returns

This example returns up to 20 results.

The dataset’s “Overview” view shows 16 columns: recordType, season, team, fullName, gamePk, officialDate, awayTeam, awayScore, homeTeam, homeScore, wins, losses, category, rank, value, 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

Players: rosters with bios

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 Players: rosters with bios

Seasons seasons

2026

One or more seasons, e.g. 2026, or a range such as 2020-2026. Empty means the current season. Data goes back to 1876. Schedule and box scores use a date or date range below instead, when one is set.

Teams teamIds

Yankees

Optional. Limit the run to these teams: MLB team ids (147, 119), abbreviations (NYY, LAD) or names (Yankees, Red Sox). Empty means every team.

Maximum results maxItems

20

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 20

Roster rosterType

40-man roster

Players mode: the active 26-man roster, the 40-man roster, everyone who played for the team that season, or the full organisation roster.

Default: Active roster → this example uses 40-man roster

.json
{
  "mode": "players",
  "seasons": [
    "2026"
  ],
  "teamIds": [
    "Yankees"
  ],
  "rosterType": "40Man",
  "maxItems": 20
}

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.