MLB schedule and box scores

Baseball API

MLB data from the MLB Stats API: the schedule for a date, then the game feed, box score, play-by-play, and win probability for one game. Teams, rosters, coaches, players, and free agents have their own calls. Betting odds are not included.

Capabilities

What you can do with the Baseball API

Most calls take one identifier: a date for the schedule, a gamePk for a game, a team id for a club, or a four-digit year for a season. The schedule is where game ids come from.

Seasons and leagues

Seasons take a four-digit seasonId and return the key dates: spring training, the regular season, the All-Star Game, the postseason, and the offseason. Leagues return each league's season dates, game and team counts, and wild-card settings. See examples

Teams

Teams returns each club's name, abbreviation, venue, league, division, and first year of play, or a single club when you pass teamId. History, coaches, affiliates, and the roster are separate calls that take teamIds. See examples

Players and free agents

Pass one personIds value for a player's profile: birth date and place, height, weight, position, bats and throws, and MLB debut. Free agents for a season list each player's original team, new team if signed, position, and the date declared. See examples

The daily schedule

The schedule lists the games on one date with their teams, status, and scores, plus any non-game events that day. Pass date as YYYY-MM-DD, or leave it out for today's schedule. Each game carries its gamePk. See examples

One game

The games call returns the game data from MLB's live feed: teams, players, venue, weather, status, probable pitchers, and officials. The box score gives batting, pitching, and fielding totals with each player's line, and play-by-play lists every play with its pitch-by-pitch events. See examples

Win probability and feed data

Win probability gives the home and away chances after each plate appearance. The matrix call returns the current win probability with the sacrifice-fly probability to each field, timestamps list when MLB's feed for the game was updated, and diffPatch returns the current game data. See examples

How a call is made

The usual call order

Send your key in the Authorization header as a bearer token. A scoreboard or game page usually makes these calls in this order.

Start with a date

Call GET /api/v1/mlb/schedule with date as YYYY-MM-DD to get the games on that day, or leave it out for today's games. See examples

Open a game with its gamePk

Read gamePk from a schedule row. It is required by /api/v1/mlb/games, the box score, the play-by-play, win probability, and the other game feeds. See examples

Load a club's roster

GET /api/v1/mlb/teams lists every club with its id. Pass that id as teamIds to the roster, coaches, affiliates, and history calls. See examples

Shortened examples

Sample responses

Trimmed examples of a club, a finished game from the schedule, a player, one team's box score, and a single play. The dates and scores belong to the example game, not to today's games.

{
    "id": 133,
    "name": "Oakland Athletics",
    "abbreviation": "OAK",
    "season": 2023,
    "league": {
        "name": "American League"
    },
    "division": {
        "name": "American League West"
    },
    "venue": {
        "name": "Oakland Coliseum"
    },
    "active": true
}
{
    "id": 676265,
    "fullName": "Cory Abbott",
    "primaryNumber": "77",
    "birthDate": "1995-09-20",
    "birthCity": "San Diego",
    "height": "6' 2\"",
    "weight": 217,
    "primaryPosition": {
        "abbreviation": "P",
        "name": "Pitcher"
    }
}
{
    "result": {
        "event": "Flyout",
        "description": "Tim Anderson flies out to right fielder Austin Hays.",
        "rbi": 0,
        "awayScore": 0,
        "homeScore": 0,
        "isOut": true
    },
    "about": {
        "inning": 1,
        "halfInning": "top"
    }
}
{
    "gamePk": 633094,
    "season": "2021",
    "officialDate": "2021-07-30",
    "status": {
        "detailedState": "Final"
    },
    "teams": {
        "away": {
            "score": 3,
            "team": {
                "name": "Chicago Cubs"
            }
        },
        "home": {
            "score": 4,
            "team": {
                "name": "Washington Nationals"
            }
        }
    },
    "venue": {
        "name": "Nationals Park"
    }
}
{
    "team": {
        "name": "Chicago White Sox",
        "abbreviation": "CWS"
    },
    "batting": {
        "runs": 7,
        "hits": 8,
        "homeRuns": 3,
        "strikeOuts": 11,
        "baseOnBalls": 5,
        "avg": ".257"
    },
    "pitching": {
        "inningsPitched": "10.0",
        "earnedRuns": 4,
        "strikeOuts": 14,
        "era": "3.58"
    }
}

Before you integrate

Common questions

Answers to the questions that usually decide whether this API fits a project.

JSON from the MLB Stats API, one part of the sport per call: seasons, leagues, venues, teams and their rosters, players, free agents, the schedule for a date, or a single game. A schedule row is a summary; the box score and play-by-play are separate calls that take the game's gamePk.

No. The win probability feed shows each team's chance of winning after every plate appearance, but this API has no sportsbook lines or prices.

No. They are trimmed examples that show the shape of each response. The dates, scores, and players in a sample belong to that example.

Call the schedule for the date and read gamePk from the game you want. Pass it to /api/v1/mlb/games-boxscore, or to /api/v1/mlb/games and /api/v1/mlb/games-playbyplay for the game feed and every play.

Seasons need seasonId as a four-digit year, and every game call needs gamePk. Team history, coaches, affiliates, and roster need teamIds. The schedule date, teamId on teams, and personIds on players can be left out, which returns today's schedule, every team, or every player.

Documentation

The baseball docs cover all 18 MLB endpoints, grouped into general, teams, and games, with the identifier each one takes, the date and year formats, and a sample response for each.

Code samples

Every endpoint in the documentation includes a sample request in Shell, JavaScript, PHP, and Python.

ShellShellJavaScriptJavaScriptPHPPHPPythonPython

View documentation

Related APIs

Also on your SteadyAPI key

Your key works on these APIs too, if a project also needs hockey, soccer, or market data.

Hockey

NHL schedules, standings as of a date, scores that include games in progress, and each team's roster, games, and stats. Hockey API

Football

Live and upcoming soccer matches with lineups, events, stats, and head-to-head records, plus team and player stats. One endpoint returns a bookmaker's odds for a match. Football API

Markets

Stock quotes, price history, option chains, technical indicators, and the earnings and dividend calendars. Stock and Options API

Pricing

One plan covers every API

Your plan's monthly requests work on this API and every other SteadyAPI API. Plan details, overage rates, and the Free plan's daily cap are on the pricing page. Need more volume than the largest plan? Email [email protected].

Free
$0.00
$9.99
per month
Starter
$14.99
$19.99
per month
Developer
$39.99
$59.99
per month
Business Popular
$89.99
$99.99
per month
Enterprise
$299.99
$499.99
per month
SubscribeSubscribeSubscribeSubscribeSubscribe
Requests per month50010,00050,0002,500,000
Stock Market API
Options Data API
Crypto Data API
AliExpress API
Reddit API
Booking.com API
Real Estate API
Baseball (MLB) API
Hockey API
Football API
Amazon API
eBay API
Walmart API
Instagram API
Twitter / X API
TikTok API
YouTube API
AutoHub API
ScrapeFlow
Commercial Use
Optional overage rate*$1.50 per 1,000 requests$1.05 per 1,000 requests$0.09 per 1,000 requests
Overage capup to 50,000 extraup to 250,000 extraup to 12,500,000 extra
Free
$0.00
$94.99
per year
Starter
$11.96
$14.35
per month$143.52 billed yearly
Developer
$32.50
$40.00
per month$389.99 billed yearly
Business Popular
$72.50
$90.00
per month$869.99 billed yearly
Enterprise
$320.83
$400.00
per month$3,849.99 billed yearly
SubscribeSubscribeSubscribeSubscribeSubscribe
Requests per month50010,00050,0002,500,000
Stock Market API
Options Data API
Crypto Data API
AliExpress API
Reddit API
Booking.com API
Real Estate API
Baseball (MLB) API
Hockey API
Football API
Amazon API
eBay API
Walmart API
Instagram API
Twitter / X API
TikTok API
YouTube API
AutoHub API
ScrapeFlow
Commercial Use
Optional overage rate*$1.50 per 1,000 requests$1.05 per 1,000 requests$0.09 per 1,000 requests
Overage capup to 50,000 extraup to 250,000 extraup to 12,500,000 extra

* Overage is optional and stays off until you turn it on in Billing. It is available on paid plans billed by card through Stripe, and not during a trial. Usage is counted in monthly periods that start on your billing day, yearly plans included. Requests past the included limit are charged at the plan's rate for each started block of 1,000, up to the overage cap, on one invoice after the period ends. Amounts under $0.50 carry over to the next invoice. If you change plans during a period, the limit and overage rate of the plan you are on when the period ends apply to the whole period.

The Free plan is also capped at 20 requests per day (New York time). Requests count by endpoint weight, and only responses with HTTP status 200 count.

Commercial use is included only on the plans that list it. If you are not sure whether your project counts as commercial use, email [email protected] before you launch.

Why SteadyAPI

How the feed is organized

Each endpoint returns one part of the game, so a page requests only the parts it shows.

Date first, then the game

The schedule tells you which games were played on a date and gives each one a gamePk. Every deeper read of a game, from the box score to win probability, starts from that number.

Clubs and their rosters

The teams call gives names, leagues, divisions, and venues. Rosters, coaches, affiliates, and team history are separate calls, so a page that lists clubs does not have to load every roster.

A different shape per endpoint

A schedule row, a box score, and a play-by-play are different objects. The docs show the fields each endpoint returns, so you can map them before you write a parser.

Weights to plan around

Most baseball calls count 1 request against your plan. Play-by-play and win probability count 2, and the teams call counts 5, so it pays to cache the team list instead of requesting it on every page view.

Also on the blog

From the blog

These posts come from across SteadyAPI, so the one at the top may be about a different API. The reference for this page is the documentation above.

How to Search Hotels Using SteadyAPISep 25, 2026

How to Search Hotels Using SteadyAPI

Learn how to find hotels by destination using SteadyAPI. Resolve a place name to coordinates, then pull property names, ratings, and prices with the Booking.com hotel search endpoints.

READ MORE
Predicting Property Value Trends: How to Use Real Estate Valuation APIsJul 19, 2026

Predicting Property Value Trends: How to Use Real Estate Valuation APIs

Learn how to build a predictive real estate valuation pipeline using SteadyAPI. This guide shows developers how to combine historical property values, multi-provider forecasts, neighborhood market trends, housing market indicators, and comparable sales data to power automated valuation models (AVMs), investment analytics, and property intelligence platforms with structured real-time API data.

READ MORE
How to Fetch Local School Ratings and Neighborhood Amenities via APIJul 19, 2026

How to Fetch Local School Ratings and Neighborhood Amenities via API

Neighborhood insights are just as important as the property itself. This guide shows developers how to use the SteadyAPI Neighborhood Amenities API to fetch school ratings, walkability and transit scores, and nearby amenities through a single endpoint. You'll learn how to authenticate requests, retrieve structured neighborhood data, filter schools and local businesses, and combine these metrics into a custom neighborhood quality score. Whether you're building a real estate marketplace, property valuation model, or location intelligence dashboard, this tutorial helps you enrich listings with valuable contextual data while reducing the complexity of managing multiple third-party integrations.

READ MORE
The Developer’s Guide to Integrating Real-Time MLS Property DataJul 19, 2026

The Developer’s Guide to Integrating Real-Time MLS Property Data

This guide walks developers through building a modern real estate data pipeline with SteadyAPI. You'll learn how to search MLS property listings, retrieve tax and transaction histories, analyze local housing market trends, and enrich property data with neighborhood and environmental insights. Instead of maintaining fragile web scrapers or navigating complex MLS integrations, SteadyAPI provides structured JSON APIs that simplify property data ingestion and help you build faster, more reliable real estate applications. Whether you're creating an investment platform, property valuation engine, market research tool, or analytics dashboard, this tutorial covers the essential endpoints and architecture needed to get started.

READ MORE