-
-
Notifications
You must be signed in to change notification settings - Fork 101
All Functions
Todd Roberts edited this page Aug 10, 2022
·
3 revisions
- statsapi.get - make calls directly to MLB StatsAPI endpoints; supports the most flexibility in request parameters, and returns raw json data
- statsapi.meta - retrieve available values from StatsAPI for use in other queries, or look up descriptions for values found in API results
- statsapi.notes - retrieve notes for a given endpoint, including a list of required parameters, as well as hints for some endpoints (returns info from MLB-StatsAPI module only, no calls to StatsAPI endpoints)
- statsapi.boxscore - generate a formatted boxscore for a given game
- statsapi.game_highlights - generate a formatted list of highlights with video links for a given game
- statsapi.game_pace - generate a formatted list of pace of game information for a given season (back to 1999)
- statsapi.game_scoring_plays - generate a formatted list of scoring plays for a given game
- statsapi.last_game - get the game id for the given team's most recent game
- statsapi.league_leaders - generate a formatted list of stat leaders for current or specified season
- statsapi.linescore - generate a formatted linescore for a given game
- statsapi.next_game - get the game id for the given team's next game
- statsapi.player_stats - generate a formatted list of a player's career or season stats
- statsapi.roster - generate a formatted list of players on a team's roster
- statsapi.standings - generate a formatted list of standings for a given league/date
- statsapi.team_leaders - generate a formatted list of a team's leaders for a given stat
- statsapi.boxscore_data - generate a dict containing boxscore data for a given game
- statsapi.game_highlight_data - returns a python list of highlight data, including video links, for a given game
- statsapi.game_pace_data - returns a python dict of pace of game information for a given season (back to 1999)
- statsapi.game_scoring_play_data - returns a python dict of scoring play data for a given game
- statsapi.latest_season - returns python dict containing seasonId and dates for the latest season
- statsapi.league_leader_data - returns python list of stat leader data for current or specified season
- statsapi.lookup_player - get a list of player data based on first, last, or full name, jersey number, current team Id, position, etc.
- statsapi.lookup_team - get a list of teams' info based on the team name, city, abbreviation, or file code
- statsapi.player_stat_data - returns a python dict of a player's career or season stats, along with some biographical information
- statsapi.schedule - retrieve a list of games on a given date/range and/or team/opponent
- statsapi.standings_data - returns a python list of standings data for a given league/date
- statsapi.team_leader_data - returns a python list of a team's leader data for a given stat
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.