-
Notifications
You must be signed in to change notification settings - Fork 11
Data Types: Game
Attributes are expandable and collapsable - Link to Game dataclass
gamepk : int
- id number of this game
link : str
- link to the api address for this game
copyright : str
- MLB AM copyright information
metadata : MetaData
- metaData of this game. Dataclass: MetaData
wait : int
- No idea what this wait signifies
timestamp : str
- The timeStamp
gameevents : List[str]
- Current game events for this game
logicalevents : List[str]
- Current logical events for this game
gamedata : GameData
- gameData of this game. Dataclass: GameData
game : GameDataGame
- game information about this game. Dataclass: GameDataGame
pk : int
- This game's game id
type : str
- This game's game type code
doubleheader : str
- Represents if this game is a double header or not
id : str
- An unknown Id
gamedaytype : str
- This game's gameday type code
tiebreaker : str
- Is this game a tie breaker
gamenumber : int
- The game number for this game. If double header will be 2.
calendareventid : str
- The id for this calendar event
season : str
- This game's season year
seasondisplay : str
- This game's displayed season
datetime : GameDatetime
- Time and dates for this game. Dataclass: GameDatetime
datetime : str
- Date time for this game
originaldate : str
- The original scheduled date for this game
officialdate : str
- The current scheduled date for this game
daynight : str
- The current lighting condition game type
time : str
- The time
ampm : str
- The games am or pm code
status : GameStatus
- information on this game's status. Dataclass: GameStatus
abstractgamestate : str
- The abstract game state
codedgamestate : str
- The coded game state
detailedstate : str
- The detailed game state
statuscode : str
- Status code for this game
starttimetbd : bool
- If the start time is TBD
abstractgamecode : str
- The abstract game code
reason : str
- reason for a state. Usually used for delays or cancellations
teams : GameTeams
- Our two teams for this game, home and away. Dataclass: GameTeams
away : Team
- Away team. Dataclass: Team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
season : str
- The team's current season
venue : Venue
- The team's home venue. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
springvenue : Venue
- The team's spring venue. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
teamcode : str
- team code
filecode : str
- filecode name of the team
abbreviation : str
- The abbreviation of the team name
teamname : str
- The team name
locationname : str
- The location of the team
firstyearofplay : str
- The first year the team began play
league : League
- The league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
division : Division
- The division the team is in. Dataclass: Division
id : int
- id number of the divison
name : str
- name of the division
link : str
- link of the division
sport : Sport
- The sport of the team. Dataclass: Sport
id : int
- id number of the sport
name : str
- name the sport
link : str
- link of the sport
shortname : str
- The shortname of the team
record : TeamRecord
- The record of the team. Dataclass: TeamRecord
gamesplayed : int
- Number of game played by team
wildcardgamesback : str
- Number of game back from wildcard
leaguegamesback : str
- Number of league games back
springleaguegamesback : str
- Number of game back in spring league
sportgamesback : str
- Number of games back in sport
divisiongamesback : str
- Number of games back in division
conferencegamesback : str
- Number of games back in conference
leaguerecord : Dict
- Record in league
records : Dict
- Records
divisionleader : bool
- Is this team a divison leader
wins : int
- Number of wins
losses : int
- Number of losses
winningpercentage : str
- Winning percentage
franchisename : str
- The franchisename of the team
clubname : str
- The clubname of the team
active : str
- Active status of the team
home : Team
- Home team. Dataclass: Team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
season : str
- The team's current season
venue : Venue
- The team's home venue. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
springvenue : Venue
- The team's spring venue. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
teamcode : str
- team code
filecode : str
- filecode name of the team
abbreviation : str
- The abbreviation of the team name
teamname : str
- The team name
locationname : str
- The location of the team
firstyearofplay : str
- The first year the team began play
league : League
- The league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
division : Division
- The division the team is in. Dataclass: Division
id : int
- id number of the divison
name : str
- name of the division
link : str
- link of the division
sport : Sport
- The sport of the team. Dataclass: Sport
id : int
- id number of the sport
name : str
- name the sport
link : str
- link of the sport
shortname : str
- The shortname of the team
record : TeamRecord
- The record of the team. Dataclass: TeamRecord
gamesplayed : int
- Number of game played by team
wildcardgamesback : str
- Number of game back from wildcard
leaguegamesback : str
- Number of league games back
springleaguegamesback : str
- Number of game back in spring league
sportgamesback : str
- Number of games back in sport
divisiongamesback : str
- Number of games back in division
conferencegamesback : str
- Number of games back in conference
leaguerecord : Dict
- Record in league
records : Dict
- Records
divisionleader : bool
- Is this team a divison leader
wins : int
- Number of wins
losses : int
- Number of losses
winningpercentage : str
- Winning percentage
franchisename : str
- The franchisename of the team
clubname : str
- The clubname of the team
active : str
- Active status of the team
players : List[Person]
- A list of all the players for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
primaryposition : str
- PrimaryPosition of the Person
pitchhand : str
- PitchHand of the Person
batside : str
- BatSide of the Person
fullname : str
- full name of the Person
firstname : str
- First name of the Person
lastname : str
- Last name of the Person
primarynumber : str
- Primary number of the Person
birthdate : str
- Birth date of the Person
currentteam : str
- The current Team of the Person
currentage : str
- The current age of the Person
birthcity : str
- The birthcity of the Person
birthstateprovince : str
- The province of the birth state
height : str
- The height of the Person
weight : str
- The weight of the Person
active : str
- The active status of the Person
usename : str
- The use name of the Person
middlename : str
- The middle name of the Person
boxscorename : str
- The box score name of the Person
nickname : str
- The nickname of the Person
draftyear : int
- The draft year of the Person
mlbdebutdate : str
- The MLB debut date of the Person
namefirstlast : str
- The first and last name of the Person
nameslug : str
- The name slug of the Person
firstlastname : str
- The first and last name of the Person
lastfirstname : str
- The last and first name of the Person
lastinitname : str
- The last init name of the Person
initlastname : str
- The init last name of the Person
fullfmlname : str
- The full fml name of the Person
fulllfmname : str
- The full lfm name of the Person
uselastname : str
- The last name of the
birthcountry : str
- The birth country of the Person
pronunciation : str
- The pronuciation of the Person's name
strikezonetop : float
- The strike zone top of the Person
strikezonebottom : float
- The strike zone bottom of the Person
nametitle : str
- The name title of the Person
gender : str
- The gender of the Person
isplayer : bool
- The player status of the Person
isverified : bool
- The verification of the Person
namematrilineal : str
- The name matrilineal of the Person
deathdate : str
- The death date of the Person
deathcity : str
- The death city of the Person
deathcountry : str
- The death country of the Person
lastplayeddate : str
- The last played date of the Person
namesuffix : str
- The namesuffix of the Person
venue : Venue
- Venue information for this game. Dataclass: Venue
id : int
- id for this venue
name : str
- Name for this venue
link : str
- Link to venues endpoint
location : Location
- Location for this venue. Dataclass: Location
address1 : str
- Venues first address line
address2 : str
- Venues second address line
city : str
- City the venue is in
state : str
- The State the venue is in
stateAbbrev : str
- The staes abbreviation
postalCode : str
- Postal code for this venue
defaultCoordinates : VenueDefaultCoordinates
- Long and lat for this venues location. Dataclass: VenueDefaultCoordinates
latitude : float
- The latatude coordinate for this venue
longitude : float
- The longitude coordinate for this venue
country : str
- What country this venue is in
phone : str
- Phone number for this venue
timezone : TimeZone
- Timezone for this venue. Dataclass: VenueTimeZone
id : str
- id string for a venues timezone
offset : int
- The offset for this timezone from
tz : str
- Timezone string
fieldinfo : FieldInfo
- Info on this venue's field. Dataclass: FieldInfo
capacity : int
- Capacity for this venue
turfType : str
- The type of turf in this venue
roofType : str
- What kind of roof for this venue
leftLine : int
- Distance down the left line
left : int
- Distance to left
leftCenter : int
- Distance to left center
center : int
- Distance to center
rightCenter : int
- Distance to right center
right : int
- Distance to right
rightLine : int
- Distance to right line
active : bool
- Is this field currently active
officialvenue : Venue
- The official venue for this game. Dataclass: Venue
id : int
- id for this venue
link : str
- Link to venues endpoint
weather : GameWeather
- The weather for this game. Dataclass: GameWeather
condition : str
- The weather condition
temp : str
- The temperature in F
wind : str
- The wind in MPH and the direction
gameinfo : GameInfo
- information on this game. Dataclass: GameInfo
attendance : int
- The attendance for this game
firstpitch : str
- The time of the first pitch
gamedurationminutes : int
- The duration of the game in minutes
delaydurationminutes : int
- The length of delay for the game in minutes
review : GameReview
- Game review info and team challenges. Dataclass: GameReview
haschallenges : bool
- If their are challenges
away : ReviewInfo
- Away team review info. Dataclass: ReviewInfo
used : int
- How many challenges used
remaining : int
- How many challenges are remaining
home : ReviewInfo
- Home team review info. Dataclass: ReviewInfo
used : int
- How many challenges used
remaining : int
- How many challenges are remaining
flags : GameFlags
- Flag bools for this game. Dataclass: GameFlags
nohitter : bool
- If there is a no hitter in this game
perfectgame : bool
- If there this game is a perfect game
awayteamnohitter : bool
- If the away team has a no hitter
awayteamperfectgame : bool
- If the away team has a perfect game
hometeamnohitter : bool
- If the home team has a no hitter
hometeamperfectgame : bool
- If the home team has a perfect game
alerts : List[]
- Alerts
probablepitchers : GameProbablePitchers
- Home and away probable pitchers for this game. Dataclass: GameProbablePitchers
home : Person
- Home team probable pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
away : Person
- Away team probable pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
officialscorer : Person
- The official scorer for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
primarydatacaster : Person
- The official dataCaster for this game. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
livedata : LiveData
- liveData of this game. Dataclass: LiveData
plays : Plays
- Has the plays for this game. Dataclass: Plays
allplays : List[Play]
- All the plays in this game. Dataclass: Play
result : PlayResult
- Play result. Dataclass: PlayResult
type : str
- Play result type
event : str
- Play event
eventtype : str
- Event type
description : str
- Event description
rbi : int
- Number of RBI's
awayscore : int
- Score for away team
homescore : int
- Score for home team
isout : bool
- If the play was an out
about : PlayAbout
- Information about this play. Dataclass: PlayAbout
atbatindex : int
- Current at bat index
halfinning : str
- What side of the inning
istopinning : bool
- Is this inning the top of the inning
inning : int
- What number of inning we are in
starttime : str
- The start time for this play
endtime : str
- The end time for this play
iscomplete : bool
- Is this play complete
isscoringplay : bool
- is this play a scoring play
hasreview : bool
- Dose this play have a review
hasout : bool
- Does this play have a out
captivatingindex : int
- What is the captivating index for this play
count : PlayCount
- This plays count. Dataclass: PlayCount
balls : int
- Number of balls
strikes : int
- Strike count
outs : int
- Number of outs
matchup : PlayMatchup
- This plays matchup. Dataclass: PlayMatchup
batter : Person
- Matchup batter. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
batside : CodeDesc
- batters batside. CodeDesc
code : str
- Code to reference batside
description : str
- Description of the batside
pitcher : Person
- Matchup pitcher. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
pitchhand : PlayMatchupSide
- Pitchers side. CodeDesc
code : str
- Code to reference pitchside
description : str
- Description of the pitchside
batterhotcoldzones : List
- Batter hot and cold zones
pitcherhotcoldzones : List
- Pitcher hot and cold zones
splits : PlayMatchupSplits
- PlayMatchupSplits. Dataclass: PlayMatchupSplits
batter : str
- Batter play split
pitcher : str
- Pitcher play split
menonbase : str
- Menonbase play split
postonfirst : Person
- Runner on first if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
postonsecond : Person
- Runner on second if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
postonthird : Person
- Runner on third if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
pitchindex : List[int]
- Pitch index for this play, indexing playEvents
actionindex : List[int]
- Action index for this play, indexing playEvents
runnerindex : List[int]
- Runner index for this play, indexing runners
runners : List[PlayRunner]
- Runners. Dataclass: PlayRunner
movement: RunnerMovement
- Runner movements. Dataclass: RunnerMovement
isout: bool
- Was the running movement an out
outnumber: int
- What is the outnumber
originbase: str
- Original base
start: str
- What base the runner started from
end: str
- What base the runner ended at
outbase: str
- Base runner was made out
details: RunnerDetails
- Runner details. Dataclass: RunnerDetails
event: str
- Runner event
eventtype: str
- Runner event type
runner: Person
- Who the runner is. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
isscoringevent: bool
- Was this a scoring events
rbi: bool
- Was this a rbi
earned: bool
- Was it earned
teamunearned: bool
- Was it unearned
playindex: int
- Play index
movementreason: str
- Reason for the movement
responsiblepitcher: Person
- Who was the responsible pitcher. Dataclass: Person
id : int
- id number of the person
link : str
- Link to person
credits: List[RunnerCredits]
- Runner credits. Dataclass: RunnerCredits
player: Person
- The player. Dataclass: Person
id : int
- id number of the person
link : str
- Link to person
position: RunnerCreditsPosition
- The position. Dataclass: RunnerCreditsPosition
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
credit: str
- The credit
playevents : List[PlayEvent]
- Play events. Dataclass: PlayEvent
details : PlayDetails
- Event details. Dataclass: PlayDetails
call : CodeDesc
- play call code and description. Dataclass: CodeDesc
code : str
- the code in reference to the call
description : str
- the description of the call
description : str
- description of the play
event : str
- type of event
eventtype : str
- type of event
isinplay : bool
- is the ball in play true or false
isstrike : bool
- is the ball a strike true or false
isball : bool
- is it a ball true or false
isbasehit : bool
- is the event a base hit true or false
isatbat : bool
- is the event at bat true or false
isplateappearance : bool
- is the event a at play appears true or false
type : CodeDesc
- type of pitch code and description. Dataclass: CodeDesc
code : str
- the code in reference to the type
description : str
- the description of the type
batside : CodeDesc
- bat side code and description. Dataclass: CodeDesc
code : str
- the code in reference to the batside
description : str
- the description of the batside
pitchhand : CodeDesc
- pitch hand code and description. Dataclass: CodeDesc
code : str
- the code in reference to the pitchhand
description : str
- the description of the pitchhand
fromcatcher : bool
- From catcher
index : int
- Event index
starttime : str
- Event start time
endtime : str
- Event end time
ispitch : bool
- Is this event a pitch
type : str
- Type
playid : str
- Unique play id ?
pitchnumber : int
- Pitch number
actionplayid : str
- Unique action play id ?
isbaserunningplay : bool
- Is there base running this play
issubstitution : bool
- Is this a substitution
battingorder : str
- A weird batting order string that only has appeared once
count : PlayCount
- Count. Dataclass: Count
balls : int
- number of balls
strikes : int
- strike count
outs : int
- number of outs
pitchdata : PitchData
- Pitch data. Dataclass: PitchData
startspeed : float
- The starting speed of the pitch.
endspeed : float
- The ending speed of the pitch.
strikezonetop : float
- The top of the strike zone.
strikezonebottom : float
- The bottom of the strike zone.
coordinates : PitchCoordinates
- The coordinates of the pitch. Dataclass: PitchCoordinates
ay : float
- Ball acceleration on the y axis
az : float
- Ball acceleration on the z axis
pfxx : float
- horizontal movement of the ball in inches
pfxz : float
- Vertical movement of the ball in inches
px : float
- Horizontal position in feet of the ball as it crosses the front axis of home plate
pz : float
- Vertical position in feet of the ball as it crosses the front axis of home plate
vx0 : float
- Velocity of the ball from the x-axis
vy0 : float
- Velocity of the ball from the y axis, this is negative becuase 0,0,0 is behind the batter and the ball travels from pitcher mound towards 0,0,0
vz0 : float
- Velocity of the ball from the z axis
x0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the x axis (time=0)
y0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the y axis (time=0)
z0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the z axis (time=0)
ax : float
- Ball acceleration on the x axis
x : float
- X coordinate where pitch crossed front of home plate
y : float
- Y coordinate where pitch crossed front of home plate
breaks : PitchBreak
- The break data of the pitch. Dataclass: PitchBreak
breakangle : float
- Degrees clockwise (batter's view) that the plane of the pitch deviates from the vertical
breaklength : float
- Max distance that the pitch separates from the straight line between pitch start and pitch end
breaky : int
- Distance from home plate where the break is greatest
spinrate : int
- Pitch spinRate
spindirection : int
- Pitch spinDirection
zone : float
- The zone in which the pitch was thrown.
typeconfidence : float
- The confidence in the type of pitch thrown.
platetime : float
- The amount of time the pitch was in the air.
extension : float
- The extension of the pitch.
strikezonewidth : float
- The width of the strikezone.
strikezonedepth : float
- The depth of the strikezone.
hitdata : HitData
- Hit data. Dataclass: HitData
launchspeed : float
- Hit launch speed
launchangle : int
- Hit launch angle
totaldistance : int
- Hits total distance
trajectory : str
- Hit trajectory
hardness : str
- Hit hardness
location : str
- Hit location
coordinates : HitCoordinate
- Hit coordinates. Dataclass: HitCoordinate
coordx : int
- X coordinate for hit.
- Can also get this value with coordinates.x instead of coordinates.coordx
coordy : int
- Y coordinate for hit.
- Can also get this value with coordinates.y instead of coordinates.coordy
player : Person
- Player. Dataclass: Person
cid : int
- id number of the person
clink : str
- Link to person
position : Position
- Position. Dataclass: PrimaryPosition
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
replacedplayer : Person
- Replaced player. Dataclass Person
cid : int
- id number of the person
clink : str
- Link to person
playendtime : str
- Time this play ends
atbatindex : int
- The play index number
reviewdetails : PlayReviewDetails
- Information on reviews if present. Dataclass: PlayReviewDetails
isoverturned : bool
Was it overturned
inprogress : bool
Is it in progress
reviewtype : str
What type of review
challengeteamid : int
The team issuing the challenge review
currentplay : Play
- The current play in this game. Dataclass: Play
result : PlayResult
- Play result. Dataclass: PlayResult
type : str
- Play result type
event : str
- Play event
eventtype : str
- Event type
description : str
- Event description
rbi : int
- Number of RBI's
awayscore : int
- Score for away team
homescore : int
- Score for home team
isout : bool
- If the play was an out
about : PlayAbout
- Information about this play. Dataclass: PlayAbout
atbatindex : int
- Current at bat index
halfinning : str
- What side of the inning
istopinning : bool
- Is this inning the top of the inning
inning : int
- What number of inning we are in
starttime : str
- The start time for this play
endtime : str
- The end time for this play
iscomplete : bool
- Is this play complete
isscoringplay : bool
- is this play a scoring play
hasreview : bool
- Dose this play have a review
hasout : bool
- Does this play have a out
captivatingindex : int
- What is the captivating index for this play
count : PlayCount
- This plays count. Dataclass: PlayCount
balls : int
- Number of balls
strikes : int
- Strike count
outs : int
- Number of outs
matchup : PlayMatchup
- This plays matchup. Dataclass: PlayMatchup
batter : Person
- Matchup batter. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
batside : CodeDesc
- batters batside. CodeDesc
code : str
- Code to reference batside
description : str
- Description of the batside
pitcher : Person
- Matchup pitcher. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
pitchhand : PlayMatchupSide
- Pitchers side. CodeDesc
code : str
- Code to reference pitchside
description : str
- Description of the pitchside
batterhotcoldzones : List
- Batter hot and cold zones
pitcherhotcoldzones : List
- Pitcher hot and cold zones
splits : PlayMatchupSplits
- PlayMatchupSplits. Dataclass: PlayMatchupSplits
batter : str
- Batter play split
pitcher : str
- Pitcher play split
menonbase : str
- Menonbase play split
postonfirst : Person
- Runner on first if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
postonsecond : Person
- Runner on second if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
postonthird : Person
- Runner on third if on base. Dataclass: Person
id : int
- Id number of the person
full_name : str
- Full_name of the person
link: str
- Persons link
pitchindex : List[int]
- Pitch index for this play, indexing playEvents
actionindex : List[int]
- Action index for this play, indexing playEvents
runnerindex : List[int]
- Runner index for this play, indexing runners
runners : List[PlayRunner]
- Runners. Dataclass: PlayRunner
movement: RunnerMovement
- Runner movements. Dataclass: RunnerMovement
isout: bool
- Was the running movement an out
outnumber: int
- What is the outnumber
originbase: str
- Original base
start: str
- What base the runner started from
end: str
- What base the runner ended at
outbase: str
- Base runner was made out
details: RunnerDetails
- Runner details. Dataclass: RunnerDetails
event: str
- Runner event
eventtype: str
- Runner event type
runner: Person
- Who the runner is. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Link to person
isscoringevent: bool
- Was this a scoring events
rbi: bool
- Was this a rbi
earned: bool
- Was it earned
teamunearned: bool
- Was it unearned
playindex: int
- Play index
movementreason: str
- Reason for the movement
responsiblepitcher: Person
- Who was the responsible pitcher. Dataclass: Person
id : int
- id number of the person
link : str
- Link to person
credits: List[RunnerCredits]
- Runner credits. Dataclass: RunnerCredits
player: Person
- The player. Dataclass: Person
id : int
- id number of the person
link : str
- Link to person
position: RunnerCreditsPosition
- The position. Dataclass: RunnerCreditsPosition
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
credit: str
- The credit
playevents : List[PlayEvent]
- Play events. Dataclass: PlayEvent
details : PlayDetails
- Event details. Dataclass: PlayDetails
call : CodeDesc
- play call code and description. Dataclass: CodeDesc
code : str
- the code in reference to the call
description : str
- the description of the call
description : str
- description of the play
event : str
- type of event
eventtype : str
- type of event
isinplay : bool
- is the ball in play true or false
isstrike : bool
- is the ball a strike true or false
isball : bool
- is it a ball true or false
isbasehit : bool
- is the event a base hit true or false
isatbat : bool
- is the event at bat true or false
isplateappearance : bool
- is the event a at play appears true or false
type : CodeDesc
- type of pitch code and description. Dataclass: CodeDesc
code : str
- the code in reference to the type
description : str
- the description of the type
batside : CodeDesc
- bat side code and description. Dataclass: CodeDesc
code : str
- the code in reference to the batside
description : str
- the description of the batside
pitchhand : CodeDesc
- pitch hand code and description. Dataclass: CodeDesc
code : str
- the code in reference to the pitchhand
description : str
- the description of the pitchhand
fromcatcher : bool
- From catcher
index : int
- Event index
starttime : str
- Event start time
endtime : str
- Event end time
ispitch : bool
- Is this event a pitch
type : str
- Type
playid : str
- Unique play id ?
pitchnumber : int
- Pitch number
actionplayid : str
- Unique action play id ?
isbaserunningplay : bool
- Is there base running this play
issubstitution : bool
- Is this a substitution
battingorder : str
- A weird batting order string that only has appeared once
count : PlayCount
- Count. Dataclass: Count
balls : int
- number of balls
strikes : int
- strike count
outs : int
- number of outs
pitchdata : PitchData
- Pitch data. Dataclass: PitchData
startspeed : float
- The starting speed of the pitch.
endspeed : float
- The ending speed of the pitch.
strikezonetop : float
- The top of the strike zone.
strikezonebottom : float
- The bottom of the strike zone.
coordinates : PitchCoordinates
- The coordinates of the pitch. Dataclass: PitchCoordinates
ay : float
- Ball acceleration on the y axis
az : float
- Ball acceleration on the z axis
pfxx : float
- horizontal movement of the ball in inches
pfxz : float
- Vertical movement of the ball in inches
px : float
- Horizontal position in feet of the ball as it crosses the front axis of home plate
pz : float
- Vertical position in feet of the ball as it crosses the front axis of home plate
vx0 : float
- Velocity of the ball from the x-axis
vy0 : float
- Velocity of the ball from the y axis, this is negative becuase 0,0,0 is behind the batter and the ball travels from pitcher mound towards 0,0,0
vz0 : float
- Velocity of the ball from the z axis
x0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the x axis (time=0)
y0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the y axis (time=0)
z0 : float
- Coordinate location of the ball at the point it was reeased from pitchers hand on the z axis (time=0)
ax : float
- Ball acceleration on the x axis
x : float
- X coordinate where pitch crossed front of home plate
y : float
- Y coordinate where pitch crossed front of home plate
breaks : PitchBreak
- The break data of the pitch. Dataclass: PitchBreak
breakangle : float
- Degrees clockwise (batter's view) that the plane of the pitch deviates from the vertical
breaklength : float
- Max distance that the pitch separates from the straight line between pitch start and pitch end
breaky : int
- Distance from home plate where the break is greatest
spinrate : int
- Pitch spinRate
spindirection : int
- Pitch spinDirection
zone : float
- The zone in which the pitch was thrown.
typeconfidence : float
- The confidence in the type of pitch thrown.
platetime : float
- The amount of time the pitch was in the air.
extension : float
- The extension of the pitch.
strikezonewidth : float
- The width of the strikezone.
strikezonedepth : float
- The depth of the strikezone.
hitdata : HitData
- Hit data. Dataclass: HitData
launchspeed : float
- Hit launch speed
launchangle : int
- Hit launch angle
totaldistance : int
- Hits total distance
trajectory : str
- Hit trajectory
hardness : str
- Hit hardness
location : str
- Hit location
coordinates : HitCoordinate
- Hit coordinates. Dataclass: HitCoordinate
coordx : int
- X coordinate for hit.
- Can also get this value with coordinates.x instead of coordinates.coordx
coordy : int
- Y coordinate for hit.
- Can also get this value with coordinates.y instead of coordinates.coordy
player : Person
- Player. Dataclass: Person
cid : int
- id number of the person
clink : str
- Link to person
position : Position
- Position. Dataclass: PrimaryPosition
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
replacedplayer : Person
- Replaced player. Dataclass Person
cid : int
- id number of the person
clink : str
- Link to person
playendtime : str
- Time this play ends
atbatindex : int
- The play index number
reviewdetails : PlayReviewDetails
- Information on reviews if present. Dataclass: PlayReviewDetails
isoverturned : bool
Was it overturned
inprogress : bool
Is it in progress
reviewtype : str
What type of review
challengeteamid : int
The team issuing the challenge review
scoringplays : List[int]
- Which plays are scoring plays, indexed with allPlays
playsbyinning : List[PlayByInning]
- Plays by inning. Dataclass: PlayByInning
startindex : int
- Starting play index number, indexed with Plays.allPlays
endindex : int
- End play index number, indexed with Plays.allPlays
top : List[int]
- Play indexes for top of the inning
bottom : List[int]
- play indexes for bottom of the inning
hits : PlayByInningHits
- Hits for the inning by home and away. Dataclass: PlayByInningHits
home : List[HitsByTeam]
- Home team hits. Dataclass: HitsByTeam
team : Team
- This team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
inning : int
- This inning number
pitcher : Person
- The pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
batter : Person
- The batter. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
coordinates : HitsByTeamHitCoordinates
- Hit coordinates. Dataclass: HitCoordinates
x : float
- X coordinate for hit
y : float
- Y coordinate for hit
type : str
- Type
description : str
- description
away : List[HitsByTeam]
- Away team hits. Dataclass: HitsByTeam
team : Team
- This team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
inning : int
- This inning number
pitcher : Person
- The pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
batter : Person
- The batter. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
coordinates : HitsByTeamHitCoordinates
- Hit coordinates. Dataclass: HitCoordinates
x : float
- X coordinate for hit
y : float
- Y coordinate for hit
type : str
- Type
description : str
- description
linescore : Linescore
- This games linescore. Dataclass: Linescore
currentinning : int
- The games current inning
currentinningordinal : str
- This innings ordinal
inningstate : str
- What state this inning is in
inninghalf : str
- WHich half of the inning are we in
istopinning : bool
- Is this the top of the inning
scheduledinnings : int
- How many innings are scheduled for this game
innings : List[LinescoreInning]
- Data on each inning. Dataclass: LinescoreInning
num : int
- Inning number
ordinalnum : str
- Inning ordinal
home : LinescoreTeamScoreing
- Home team inning info. Dataclass: LinescoreTeamScoreing
hits : int
- Team hits for this inning
errors : int
- Team errors for this inning
leftonbase : int
- Player left on base for this inning
runs : int
- Team runs for this inning
iswinner : bool
- If team is winner
away : LinescoreTeamScoreing
- Away team inning info. Dataclass: LinescoreTeamScoreing
hits : int
- Team hits for this inning
errors : int
- Team errors for this inning
leftonbase : int
- Player left on base for this inning
runs : int
- Team runs for this inning
iswinner : bool
- If team is winner
teams : LinescoreTeams
- Line score data on our teams. Dataclas: LinescoreTeams
home : LinescoreTeamScoreing
- Home team current inning info
hits : int
- Team hits for this inning
errors : int
- Team errors for this inning
leftonbase : int
- Player left on base for this inning
runs : int
- Team runs for this inning
iswinner : bool
- If team is winner
away : LinescoreTeamScoreing
- Away team current inning info
hits : int
- Team hits for this inning
errors : int
- Team errors for this inning
leftonbase : int
- Player left on base for this inning
runs : int
- Team runs for this inning
iswinner : bool
- If team is winner
defense : LinescoreDefense
- Current defense. Dataclass: LinescoreDefense
pitcher : Person
- Current pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
catcher : Person
- Current catcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
first : Person
- Current first. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
second : Person
- Current second. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
third : Person
- Current third. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
shortstop : Person
- Current shortstop. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
left : Person
- Current left. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
center : Person
- Current center. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
right : Person
- Current right. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
batter : Person
- The next batter when this team switches to offense. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
ondeck : Person
- The next ondeck batter when this team switches to offense. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
inhole : Person
- The next inHole batter when this team switches to offense. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
battingorder : int
- Number this team is in the batting order
team : Team
- The team that is playing defense currently. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
offense : LinescoreOffense
- Current offense. Dataclass: LinescoreOffense
batter : Person
- Current batter. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
ondeck : Person
- Current on deck batter. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
inhole : Person
- Current in the hole batter. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
pitcher : Person
- Who is this teams pitcher. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- link to person
battingorder : int
- Number in the batting order
team : Team
- The team currently on offense. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
balls : int
- current count balls
strikes : int
- current count strikes
outs : int
- current count outs
boxscore : BoxScore
- This games boxscore. Dataclass: BoxScore
teams : BoxScoreTeams
- Box score data for each team. Dataclass: BoxScoreTeams
home : BoxScoreTeam
- Home team boxscore information. Dataclass: BoxScoreTeam
team : Team
- This team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
teamstats : Dict
- Team stats.
players : Dict
- Players on team.
- Access Key Format: ID+'player_id' : Person
Dict object accessed with Player_id. ex. players[ID623457]
- Returned Person
person : Person
- The person object. Dataclass: Person
id : int
- id number of the person.
full_name : str
- full_name of the person.
link : str
- Api access link for person.
jerseynumber : str
- The person's jersey number.
position : Position
- The person's position. Dataclass: Position
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
status : CodeDesc
- The person's status. Dataclass: CodeDesc
code : str
- the code to reference the persons status
description : str
- the description of the status
parentteamid : int
- The ID of the person's parent team.
stats : dict
- A dictionary of the person's stats.
seasonstats : dict
- A dictionary of the person's season stats.
gameStatus : GameStatus
- The person's game status. Dataclass: GameStatus
iscurrentbatter : bool
- Whether the player is the current batter.
iscurrentpitcher : bool
- Whether the player is the current pitcher.
isonbench : bool
- Whether the player is on the bench.
issubstitute : bool
- Whether the player is a substitute.
battingorder : int
- The persons place in the batting order if avaliable.
allpositions : List[Position]
- All of the person's positions if avaliable. Dataclass: Position
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
batters : List[int]
- List of batters playerid for this team
pitchers : List[int]
- List of pitcher playerid for this team
bench : List[int]
- List of bench playerid for this team
bullpen : List[int]
- Bullpen list of playerid
battingorder : List[int]
- Batting order for this team as a list of playerid
info : List[BoxScoreTeamInfo]
- Batting and fielding info for team. Dataclass: BoxScoreTeamInfo
title : str
- Type of information
fieldlist : List[BoxScoreVL]
- List holding the info for this info type. Dataclass: BoxScoreVL
label : str
- The label for this peice of info
value : str
- The info associated with this label
note : List[str]
- Team notes
away : BoxScoreTeam
- Away team boxscore information. Dataclass: BoxScoreTeam
team : Team
- This team. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
springleague : League
- The spring league of the team. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
abbreviation : str
- abbreviation the league
allstarstatus : str
- The all status status of the team
teamstats : Dict
- Team stats.
players : Dict
- Players on team.
- Access Key Format: ID+'player_id' : Person
Dict object accessed with Player_id. ex. players[ID623457]
- Returned Person
person : Person
- The person object. Dataclass: Person
id : int
- id number of the person.
full_name : str
- full_name of the person.
link : str
- Api access link for person.
jerseynumber : str
- The person's jersey number.
position : Position
- The person's position. Dataclass: Position
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
status : CodeDesc
- The person's status. Dataclass: CodeDesc
code : str
- the code to reference the persons status
description : str
- the description of the status
parentteamid : int
- The ID of the person's parent team.
stats : dict
- A dictionary of the person's stats.
seasonstats : dict
- A dictionary of the person's season stats.
gameStatus : GameStatus
- The person's game status. Dataclass: GameStatus
iscurrentbatter : bool
- Whether the player is the current batter.
iscurrentpitcher : bool
- Whether the player is the current pitcher.
isonbench : bool
- Whether the player is on the bench.
issubstitute : bool
- Whether the player is a substitute.
battingorder : int
- The persons place in the batting order if avaliable.
allpositions : List[Position]
- All of the person's positions if avaliable. Dataclass: Position
code: str
- code number of the Position
name: str
- the name of the Position
type: str
- the type of the Position
abbreviation: str
- the abbreviation of the Position
batters : List[int]
- List of batters playerid for this team
pitchers : List[int]
- List of pitcher playerid for this team
bench : List[int]
- List of bench playerid for this team
bullpen : List[int]
- Bullpen list of playerid
battingorder : List[int]
- Batting order for this team as a list of playerid
info : List[BoxScoreTeamInfo]
- Batting and fielding info for team. Dataclass: BoxScoreTeamInfo
title : str
- Type of information
fieldlist : List[BoxScoreVL]
- List holding the info for this info type. Dataclass: BoxScoreVL
label : str
- The label for this peice of info
value : str
- The info associated with this label
note : List[str]
- Team notes
officials : List[BoxScoreOffical]
- The officials for this game. Dataclass: BoxScoreOffical
official : Person
- The official person. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Api link for person
officialtype : str
- What type of official this person is
info : List[BoxScoreVL]
- Box score information. Dataclass: BoxScoreVL
label : str
- The label for this peice of info
value : str
- The info associated with this label
pitchingnotes : List[str]
- Pitching notes for this game
leaders : GameLeaders
- The data leaders for this game. Dataclass: GameLeaders
hitdistance : dict
- hit distance
hitspeed : dict
- hit speed
pitchspeed : dict
- pitch speed
decisions : GameDecisions
- Decisions for this game, Ie a winner or a loser. Dataclass: GameDecisions
winner : Person
- The winning Pitcher person. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Api link for person
loser : Person
- The loosing Pitcher person. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Api link for person
Save : Person
- The Saving Pitcher person if avaliable. Dataclass: Person
id : int
- id number of the person
full_name : str
- full_name of the person
link : str
- Api link for person
Description: Returns a Game
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
game_id |
string/int | Yes | Game id number |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
timecode |
string | No | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | |
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute |
Description: Return the playbyplay of a game for a specific game id
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
game_id |
string/int | Yes | Game id number | None |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
timecode |
string | No | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | None |
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | None |
Description: Return the Linescore of a game for a specific game id
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
game_id |
string/int | Yes | Game id number | None |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
timecode |
string | No | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | None |
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | None |
Description: Return the boxscore of a game for a specific game id
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
game_id |
string/int | Yes | Game id number | None |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
timecode |
string | No | Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS | None |
fields |
string | No | Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute | None |
https://statsapi.mlb.com/api/v1.1/game/534196/feed/live
import mlbstatsapi
mlb = mlbstatsapi.Mlb()
mlb.get_game(game_id = 534196)
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.