
Statsapi.game_scoring_play_data() - returns a python dict of scoring play data for a given gameĮxample Use Print the number of games won by the Oakland Athletics in 2018

Statsapi.game_scoring_plays() - generate a formatted list of scoring plays 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_pace() - generate a formatted list of pace of game information for a given season (back to 1999) Statsapi.game_highlight_data() - returns a python list of highlight data, including video links, for a given game Statsapi.game_highlights() - generate a formatted list of highlights with video links for a given game Statsapi.next_game() - get the game id for the given team's next game

Statsapi.last_game() - get the game id for the given team's most recent game ayer_stat_data() - returns a python dict of a player's career or season stats, along with some biographical information ayer_stats() - generate a formatted list of a player's career or season stats Statsapi.league_leader_data() - returns python list of stat leader data for current or specified season Statsapi.league_leaders() - generate a formatted list of stat leaders for current or specified season Statsapi.team_leader_data() - returns a python list of a team's leader data for a given stat Statsapi.team_leaders() - generate a formatted list of a team's leaders for a given stat Statsapi.standings_data() - returns a python list of standings data for a given league/date Statsapi.standings() - generate a formatted list of standings for a given league/date Statsapi.roster() - generate a formatted list of players on a team's roster Statsapi.linescore() - generate a formatted linescore for a given game Statsapi.boxscore_data() - generate a dict containing boxscore data for a given game Statsapi.boxscore() - generate a formatted boxscore for a given game Statsapi.schedule() - retrieve a list of games on a given date/range and/or team/opponent Statsapi.lookup_team() - get a list of teams' info based on the team name, city, abbreviation, or file code
2018 mlb schedule data full#
Statsapi.lookup_player() - get a list of player data based on first, last, or full name, jersey number, current team Id, position, etc. Statsapi.notes() - retrieve notes for a given endpoint, including a list of required parameters, as well as hints for some endpoints ta() - retrieve available values from StatsAPI for use in other queries, or look up descriptions for values found in API results

Statsapi.get() - make calls directly to MLB StatsAPI endpoints supports the most flexibility in request parameters, and returns raw json data
2018 mlb schedule data install#
Pip install MLB-StatsAPI Available Functions If you install manually, be sure to also install requests. MLB-StatsAPI is listed on the Python Package Index,Īnd the preferred installation method is pip for all platforms.
