mlb_team_history: *MLB Teams History*

View source: R/mlb_team_history.R

mlb_team_historyR Documentation

MLB Teams History

Description

MLB Teams History

Usage

mlb_team_history(team_ids = NULL, start_season = NULL, end_season = NULL)

Arguments

team_ids

The team_id(s) to return historical data for.

start_season

The start_season to return historical data for from the given year to present.

end_season

The end_season to return historical data for from the the creation to the given year.

Value

Returns a tibble with the following columns

col_name types description
all_star_status character All-star status flag.
team_id integer Team MLBAM ID.
team_full_name character Full team name.
link character API link to the team.
season integer Season year for the historical record.
team_code character Internal team code.
file_code character File code abbreviation.
team_abbreviation character Team abbreviation.
team_name character Short team name.
location_name character Team location (city).
first_year_of_play character First year the franchise played.
short_name character Short display name.
franchise_name character Franchise name.
club_name character Club name.
active logical Whether the team is active.
venue_id integer Home venue MLBAM ID for that season.
venue_name character Home venue name for that season.
venue_link character API link to the venue.
spring_venue_id integer Spring training venue MLBAM ID.
spring_venue_link character API link to the spring venue.
league_id integer League MLBAM ID.
league_name character League name.
league_link character API link to the league.
sport_id integer Sport MLBAM ID.
sport_link character API link to the sport.
sport_name character Sport name (e.g., Major League Baseball).

Examples


  try(mlb_team_history(team_ids = 147))


baseballr documentation built on Aug. 27, 2026, 1:07 a.m.