Public APIs
MLB Records and Stats favicon

MLB Records and Stats

Sports & Fitness

Current and historical MLB statistics.

MLB Records and Stats's website screenshot

About MLB Records and Stats

The MLB Data API provides programmatic access to Major League Baseball data through a JSON-based HTTP endpoint hosted at lookup-service-prod.mlb.com. It covers player data (search, player details, teams played for), statistics (season and career hitting/pitching, league hitting/pitching, projected pitching/hitting), team data (rosters by season, 40-man roster), and game and report data (game info by type, transactions, broadcasts, current injuries, hitting and pitching leaders). Requests are made via GET to named endpoint paths, and responses can be filtered to include or exclude specific fields using col_in and col_ex parameters.

All data returned by the API is stated to be the property of MLB/MLB Advanced Media, and users are directed to review MLB's terms of use before incorporating the data into projects. The documentation targets developers building applications that need structured MLB player, team, statistical, or game data.

Key features

  • Search MLB players by name (active or historic)
  • Retrieve detailed player info: bio, attributes, debut date, status
  • Look up teams a player has played for by season
  • Season and career hitting/pitching stats endpoints
  • League leaders for hitting and pitching
  • Team rosters, transactions, broadcasts, and injury reports

Frequently asked questions

Is this API free to use?

The page does not mention pricing; it documents a public JSON endpoint at lookup-service-prod.mlb.com with no authentication shown.

What data format does it return?

Responses are returned as JSON via endpoints under the /json/named.[endpoint].bam path structure.

Who owns the data and can I use it freely?

All data returned is property of MLB/MLB Advanced Media, and users must refer to MLB's terms of use before using it in projects.

Can I control which fields are returned?

Yes, most endpoints support col_in and col_ex parameters to include or exclude specific fields in the response.

What kind of data can I query?

The API covers player search and details, season/career/league hitting and pitching stats, team rosters, transactions, broadcasts, injuries, and stat leaders.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product