Skip to content

Data Types: People

KCNilssen edited this page Dec 16, 2022 · 13 revisions

Usage that returns League objects

To be added

People Structure

People are expandable and collapsable - Link to people dataclass

id : int
  • People id
link : str
  • link to people endpoint
primaryposition : Position
  • Person primary 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
pitchhand : PitchHand
  • Person primary position. Dataclass: PitchHand
code : str
  • code number of the PitchHand
descritpion: str
  • description of the PitchHand
batside : BatSide
  • Person's BatSide. Dataclass: BatSide
code : str
  • code number of the BatSide
descritpion: str
  • description of the BatSide
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
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 : str
  • 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 and first name of the Person
lastfirstname : str
  • The last init name of the Person
initlastname : str
  • The init last name of the Person
fullfmlname : str
  • The init last name of the Person
initlastname : str
  • The full fml name of the Person
fulllfmname : str
  • The full lfm name of the Person
uselastname : str
  • The last name of the Person
birthcountry : str
  • The birth country of the Person
pronunciation : str
  • The pronuciation of the Person's name
strikezonetop : str
  • The strike zone top of the Person
strikezonebottom : str
  • The strike zone bottom of the Person
nametitle : str
  • The name title of the Person
gender : str
  • The gender of the Person
isplayer : str
  • The player status of the Person
isverified : str
  • 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

Example output from MLB stats api endpoint

Mlb stats api Query:

https://statsapi.mlb.com/api/v1/people?personIds=605151

Equivelant with python-mlb-statsapi:

import mlbstatsapi

mlb = mlbstatsapi.Mlb()

mlb.get_person(player_id = 605151)

Clone this wiki locally