mlb-data

US Sports Open source · MIT Read-only 24 commands 708 installs

MLB data via ESPN public endpoints and the official MLB Stats API — scores, standings, rosters, schedules, game summaries, injuries, leaders, and news, plus an analytics backend: pitch-level velocity/spin/exit-velocity, career splits by stat group, league leaders, and schedules to 1901. Zero config, no API keys.

View source

Commands 24

get_scoreboard
[--date]

Live/recent MLB scores

get_standings
[--season]

Standings by league and division

get_teams

All 30 MLB teams

get_team_roster
--team_id

Full roster for a team

get_team_schedule
--team_id[--season]

Schedule for a specific team

get_game_summary
--event_id

Detailed box score and scoring plays

get_leaders
[--season]

MLB statistical leaders

get_news
[--team_id]

MLB news articles

get_play_by_play
--event_id

Full play-by-play for a game

get_win_probability
--event_id

Win probability chart data

get_schedule
[--date][--season]

Games on a specific date (no season filter; see get_team_schedule)

get_injuries

Injury reports across all teams

get_transactions
[--limit]

Recent transactions

get_futures
[--limit][--season_year]

Futures/odds markets

get_depth_chart
--team_id

Depth chart for a team

get_team_stats
--team_id[--season_year][--season_type]

Team statistical profile

get_player_stats
--player_id[--season_year][--season_type]

Player statistical profile

find_mlb_player
--name

Search MLB's player registry by name

get_mlbstats_schedule
[--date][--season][--team][--game_type]

Games via the MLB Stats API — history to 1901, carries gamePk ids

get_mlbstats_player_stats
[--player_id][--player][--stat_type][--stat_group][--season][--sort_by][--descending][--limit][--fields]

Season/career/year-by-year splits by stat group via MLB Stats API; stat_type=game_log gives one split per game

get_mlbstats_play_by_play
--game_pk[--sort_by][--descending][--limit][--fields]

Pitch-level PBP — velocity, spin, plate coords, exit velo, launch angle

get_mlbstats_boxscore
--game_pk

Full box score with per-player batting/pitching via MLB Stats API

get_mlbstats_standings
[--season]

Standings by division via MLB Stats API

get_mlbstats_leaders
--category[--season][--stat_group][--limit]

League leaders for any stat category via MLB Stats API

Example Prompts

  • What are today's MLB scores?
  • Show me the AL East standings
  • Who's on the Yankees roster?
  • Show me the full box score for last night's Dodgers game
  • Who's on the IL for the Yankees?

Quick Start

# CLI
sports-skills mlb get_scoreboard
# Python
from sports_skills import mlb
mlb.get_scoreboard()