{ "openapi": "3.0.0", "info": { "title": "MLB.com Stats API", "version": "1.0", "description": "\nemail: [email protected]\n" }, "tags": [ { "name": "config", "description": "The configurations endpoint on the Stats API allows users to request information from the MLB database pertaining to configurations for parameters in Stats API endpoints. \n\n\n- Used For: \n - Configurations for parameters in Stats API endpoints. \n\n\n- Best Practices: \n - Run all configurations endpoints with no parameters. \n \n" }, { "name": "attendance", "description": "The attendance endpoint on the Stats API allows users to request information from the MLB database pertaining to the attendance. \n\n\n- Used For: \n - Attendance data for a given club. \n\n\n- Best Practices: \n - Run call with either teamId, leagueId, or leagueListId. \n" }, { "name": "awards", "description": "The awards endpoint on the Stats API allows users to request information from the MLB database pertaining awards.\n\n\n- Used For: \n - A directory of players for a given award.\n\n\n- Best Practices: \n - Run call with with awardId.\n \n" }, { "name": "conference", "description": "The conference endpoint on the Stats API allows users to request information from the MLB database pertaining to the Pacific Coast League. \n\n\n- Used For: \n - Pacific Coast League data.\n\n\n- Best Practices: \n - Run /v1/conferences endpoint with no conferenceId to receive data for both conferences in the PCL.\n" }, { "name": "division", "description": "The division endpoints on the Stats API allows for users to request information from the MLB database pertaining to\ndivisions. This information is comparable to a directory; division name, id, league id, sport id, and abbreviation\nare provided. \n\n- Used For: \n - A directory of division(s) based on divisionId, leagueId, or sportId.\n\n- Best Practices: \n - Run request with no parameters for all divisions across multiple sportIds.\n" }, { "name": "draft", "description": "The draft endpoint on the Stats API allows for users to request information from the MLB database pertaining to the rule 4 draft from 1975 to present day. The draft endpoint contains fullNames, playerIds, signing bonus data (when applicable), and other biographical information. \n\n- Used For: \n - Biographical and salary information regarding players selected in the rule 4 draft.\n\n\n- Best Practices: \n - To pull draft data while the draft is open use the <a href=\"https://statsapi.mlb.com/api/v1/draft/2018/latest\"> Latest</a> endpoint.\n" }, { "name": "game", "description": "The game endpoint on the Stats API allows for users to request information from the MLB database pertaining to\nall games. GUMBO is available through the Game endpoints. \n\n- Used For: \n - GUMBO play by play data.\n - GUIDS Statcast data \n- Best Practices: \n - Run request with required parameter gamePk.\n - Incorporate hydrations when possible for an extended dataset. \n - Use the analytics/game endpoint to pull timestamps reflecting any updates to games with Statcast data\n - Use the analytics/guids endpoint to pull timestamps reflecting updates to specific plays from games with Statcast data\n - Use the game/changes endpoint to reflect all games that have traditional stats updates. Ie. Scoring changes. \n" }, { "name": "gamePace", "description": "The gamePace endpoint on the Stats API allows users to request information from the MLB database pertaining to the pace of game. \n\n- Used For: \n - A directory of time and stat measurements for a collection of games.\n- Best Practices: \n - Run call with with season, team, league or sport id. \n" }, { "name": "highLow", "description": "The highLow endpoint on the Stats API allows users to request information from the MLB database pertaining to highest and lowest values in each of a number of batting, ching with ching and fielding categories. \n\n- Used For: \n - A directory of high/Low stat measurements for a collection of games.\n- Best Practices: \n - Run call with with orgType, statGroup, and sortStat. \n \n" }, { "name": "homerunderby", "description": "The homerun derby endpoint on the Stats API allows for users to request information from the MLB database pertaining to the homerun derby. This is endpoint contains Statcast trajectory, launchSpeed, launchAngle, & hit coordinates data. Also a timeRemaning string is added to track the progress of the derby in real time. \n\n- Used For: \n - Biographical and Statcast data regarding players participating in the homerun derby.\n\n- Best Practices: \n - Run request with required gamePk parameter.\n - Use either the bracket or pool endpoint to view different breaks downs of the data:\n - Bracket\n - Pool \n" }, { "name": "league", "description": "The league endpoint on the Stats API allows for users to request information from the MLB database pertaining to league. This information is comparable to a directory; league name, division name, id, league id, sport id, and abbreviation are provided. Also, the league endpoints allows users to view All-Star Game ballots for nominees, write-ins, and final votes. \n- Used For: \n - A directory of league(s) based on sportId, leagueId, or divisionId.\n - A directory of All-Star ballot(s) for a given league and year.\n\n- Best Practices: \n - Run request with either sportId or leagueId parameters for all leagues across multiple sports and leagues.\n - For Mexican league information use .1, .2 year values for all seasons before 2019 (Ie. 2018.1,2018.2)\n" }, { "name": "person", "description": "The person endpoint on the Stats API allows for users to request biographical and statistical information from the MLB database pertaining to players, umpires, and coaches. \n\n- Used For: \n - Biographical and statistical information for players, coaches, umpires. \n\n- Best Practices: \n - Use Hydrations to load <a href=\" https://statsapi.mlb.com/api/v1/people/605151?season=2018&hydrate=stats(group=hitting,type=career)\">statistics</a>, <a href=\"http://statsapi.mlb.com/api/v1/people/605151?hydrate=transactions\">transactions</a>,<a href=\"http://statsapi.mlb.com/api/v1/people/605151?hydrate=rosterEntries\">roster entries</a>,<a href=\"http://statsapi.mlb.com/api/v1/people/605151?hydrate=hydrations\">etc</a>.... \n - Statistics and other hydrations are availiable for Minor League players by adding <a href=\"https://statsapi.mlb.com/api/v1/people/663898?season=2018&hydrate=stats(group=hitting,type=career,sportId=12)\">sportId</a>.\n - Statcast Metrics for MLB players are available both in <a href=\"https://statsapi.mlb.com/api/v1/people?personIds=592450&season=2018&hydrate=stats(type=metricAverages,metrics=launchSpinRate,season=2018)\">aggregation</a> and in <a href=\"https://statsapi.mlb.com/api/v1/people?personIds=592450&season=2018&hydrate=stats(type=metricLog,metrics=launchSpinRate,season=2018)\">play by play log</a>.\n - Splits are also available for both <a href=\"https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=a),education\">MLB</a> and <a href=\"https://statsapi.mlb.com/api/v1/people?personIds=663898,621052&season=2018&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=a,sportId=12),education\">MiLB</a> players. \n - For Mexican league information use .1, .2 year values for all seasons before 2019 (Ie. 2018.1,2018.2)\n" }, { "name": "jobs", "description": "The jobs endpoint on the Stats API allows for users to view biogrpahical information from the MLB database pertaining to non-player staff across all sports. \n\n\n- Used For: \n - Biogrpahical information on umpires,official scores, and non-player personnel.\n\n\n- Best Practices: \n - Run request with jobType parameter. \n" }, { "name": "schedule", "description": "The schedule endpoint on the Stats API allows for users to request scheduling information from the MLB database pertaining to a given sport.\n\n- Used For: \n - Viewing schedule games for a given timeframe.\n\n\n- Best Practices: \n - Add only sportId to view the <a href=\"https://statsapi.mlb.com/api/v1/schedule?sportId=1\">Current Day</a> schedule for a given sport.\n - Include season and date to view the schedule for a given sport on a particular day <a href=\"https://statsapi.mlb.com/api/v1/schedule?sportId=1&date=06/01/2018\">Individual Day</a>.\n - Include startDate and endDate to view the schedule for a given sport between two date ranges <a href=\"https://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=06/01/2018&endDate=06/15/2018\">Date Range</a>.\n - Incorporate hydrations when possible for an extended dataset. \n - Adding multiple <a href=\"http://statsapi.mlb.com/api/v1/schedule?sportId=1,51&startDate=02/21/2018&endDate=11/15/2018\">sportIds</a> limits the date range of a request to 45 Days.\n" }, { "name": "season", "description": "The season endpoint on the Stats API allows for users to request start and end date information from the MLB database pertaining to seasons across all sports. \n\n\n- Used For: \n - Spring Training,Regular Season, Postseason start dates and end dates.\n\n\n- Best Practices: \n - Run request with no sportId for all season start/end dates across all leagues in that sport.\n - Use the <a href=\"http://statsapi.mlb.com/docs/#operation/seasonId\">Individual Season</a> endpoint to request start/end dates for a particular season.\n" }, { "name": "sports", "description": "The sports endpoint on the Stats API allows for users to request a directory from the MLB database pertaining to all sports. This information includes sportId, name, and abbreviation. Also the Players endpoint allows for a user to view biographical information for all players in a given season. \n- Used For: \n - A directory of sports.\n - Player biographical information for a given sport.\n\n- Best Practices: \n - Run request with no sportId for all sports available in the Stats API.\n - Use the /v1/sports/{sportId}/players endpoint to receive information on all players available in a given sport.\n" }, { "name": "standings", "description": "The standings endpoint on the Stats API allows for users to request a directory from the MLB database pertaining to standings, this information includes team record, league/division information, and boolean values for season accolades(IE. clinch the division). \n\nDescription of all standingTypes:\n\n- regularSeason - Regular Season Standings\n- wildCard - Wild card standings\n- divisionLeaders - Division Leader standings\n- wildCardWithLeaders - Wild card standings with Division Leaders\n- firstHalf - First half standings. Only valid for leagues with a split season (Mexican League).\n- secondHalf - Second half standings. Only valid for leagues with a split season (Mexican League).\n- springTraining - Spring Training Standings\n- postseason - Postseason Standings\n- byDivision - Standings by Division\n- byConference - Standings by Conference\n- byLeague - Standings by League\n\n\n- Used For: \n - Standings information.\n\n- Best Practices: \n - Run request with leagueId and year for all standings available in the Stats API for the given league.\n - Use the date parameter to view standings for an individual day.\n - For Mexican league information use .1, .2 year values for all seasons before 2019 (Ie. 2018.1,2018.2)\n" }, { "name": "stats", "description": "The stats endpoint on the Stats API allows for users to request biographical and statistical information from the MLB database pertaining to players. \n- Used For: \n - <a href=\"http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=hitting&playerPool=All\">Hitting</a>,<a href=\"http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=pitching&playerPool=All\">Pitching</a> or <a href=\"http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=fielding&playerPool=All\">Fielding</a> stats for all players in a sport. \n\n- Best Practices: \n - Use playerPool \"All\" to recreate lookup cur_hitting/cur_fielding/cur_pitching. \n - The API is limited to displaying 1000 returns for each call, use the offset and limit parameter to paginate efficently through the data. \n - Use statType=statSplits and sitCodes=\"sitCode desired\" for Stat Splits. \n - playerPool defaults to \"Qualified\".\n - Use the stats/metrics endpoint for Statcast statistics on both a league and player level.\n - Hydrate multiple stats via the \"person\" hydration.\n - For Mexican league information use .1, .2 year values for all seasons before 2019 (Ie. 2018.1,2018.2)\n - Pull Statcast metrics for individual plays and players in specific venue by adding venueId\n" }, { "name": "team", "description": "The team endpoint on the Stats API allows for users to request biographical and statistical information from the MLB database pertaining to teams, players, affiliates, coaches, etc... \n- Used For: \n - Viewing a directory of teams for a given season, status, league, sport or gameType.\n - Use activeStatus to populate active or inactive teams.\n - Viewing a directory of affiliates/coaches/ and team personnel. \n - Roster information and statistics for all players on a team basis.\n\n- Best Practices: \n - Use the person hydrate to load statistics for all player on a particular team. \n - Like the person endpoint, add sportId for MiLB player stats.\n - Insert date to pull a roster based on type for a specific date. \n" }, { "name": "venue", "description": "The venue endpoint on the Stats API allows for users to request a directory of venues from the MLB database. This information includes longitude and latitude of the venue(Only parks where MLB games are played) and venue name/id.\n- Used For: \n - Venue information.\n\n- Best Practices: \n - Year will populate venue information from 1901 to present day.\n - Use hydrations to expand the dataset for available venue.\n" } ], "paths": { "/v1/attendance": { "get": { "tags": [ "attendance" ], "operationId": "getTeamAttendance", "summary": "View attendance information.", "description": "**Description:**\nThis endpoint returns attendance data based on teamId, leagueId, or leagueListId.\n\n**Return Includes:** attendance total, splits for high/low & home/away, and gameType.\n\n**Required Parameters:** SportId or LeagueId are required to run this call.\n\n---\n**Example of call with required parameters**\n\n1. https://statsapi.mlb.com/api/v1/attendance?teamId=110\n2. https://statsapi.mlb.com/api/v1/attendance?leagueId=103\n3. https://statsapi.mlb.com/api/v1/attendance?leagueListId=mlb\n<br> </br>\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/attendance?teamId=110&leagueId=103&season=2014&leagueListId=mlb&gameType=D \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a teamId to return directory of attendnace for a given team.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/attendance?teamId=147\n 2. Insert multiple teamIds: https://statsapi.mlb.com/api/v1/attendance?teamId=147,110\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert leagueId(s) to return a directory of attendanace for a specific league. Format '103,104'\n 1. One leagueId: https://statsapi.mlb.com/api/v1/attendance?leagueId=103\n 2. Multiple leagueIds: https://statsapi.mlb.com/api/v1/attendance?leagueId=103,104\n", "name": "leagueId", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert year(s) to return a directory of attendance for a given season.\n 1. One year: https://statsapi.mlb.com/api/v1/attendance?leagueId=103&season=2000\n 2. Multiple years: https://statsapi.mlb.com/api/v1/attendance?leagueId=103&season=2000,2001\n", "name": "season", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert date to return information for attendance on a particular date. Format:\n MM/DD/YYYY\n1. Insert date: https://statsapi.mlb.com/api/v1/attendance?teamId=147&date=09/10/2011\n", "name": "date", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert a unique League List Identifier to return a directory of attendanace for a specific league listId.\n 1. One leagueListId: https://statsapi.mlb.com/api/v1/attendance?leagueListId=mlb\n", "name": "leagueListId", "required": true, "schema": { "type": "string", "enum": [ "milb_full", "milb_short", "milb_complex", "milb_all", "milb_all_nomex", "milb_all_domestic", "milb_noncomp", "milb_noncomp_nomex", "milb_domcomp", "milb_intcomp", "win_noabl", "win_caribbean", "win_all", "abl", "mlb", "mlb_hist", "mlb_milb", "mlb_milb_hist", "mlb_milb_win", "baseball_all" ] } }, { "in": "query", "description": "Insert gameType(s) a directory of attendance for a given gameType.\n 1. One gameType: https://statsapi.mlb.com/api/v1/attendance?teamId=147&season=2018&gameType=R\n 2. Multiple gameTypes: https://statsapi.mlb.com/api/v1/attendance?teamId=147&season=2018&gameType=R,D\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/attendance?teamId=147&fields=records,year,attendanceHigh\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**startDate must be coupled with endDate**\n\n 1. Insert date range: http://statsapi.mlb.com/api/v1/attendance?teamId=137&season=2018&startDate=2018-04-01&endDate=2018-04-15\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**endDate must be coupled with startDate**\n\n 1. Insert date range: http://statsapi.mlb.com/api/v1/attendance?teamId=137&season=2018&startDate=2018-04-01&endDate=2018-04-15\n", "name": "endDate", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_AttendanceRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/conferences": { "get": { "tags": [ "conference" ], "operationId": "conferences", "summary": "View all PCL conferences.", "description": "\n**Description:**\nThis endpoint returns all information on PCL conferences available on the Stats API.\n\n**Return Includes:** Conference name and league name. \n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters:** \nhttps://statsapi.mlb.com/api/v1/conferences?conferenceId=302&season=2018\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert conferenceId to return a directory of PCL conference(s).\n1. One conferenceId: https://statsapi.mlb.com/api/v1/conferences?conferenceId=302\n", "name": "conferenceId", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": false } }, { "in": "query", "description": "Insert year to return a directory of PCL conference(s) in a given year.\n1. One year: https://statsapi.mlb.com/api/v1/conferences?conferenceId=302&season=2018\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/conferences?conferenceId=302&fields=conferences,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ConferencesRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/conferences/{conferenceId}": { "get": { "tags": [ "conference" ], "operationId": "conferences", "summary": "View PCL conferences by conferenceId.", "description": "\n**Description:**\nThis endpoint returns all information on PCL conferences available on the Stats API.\n\n**Return Includes:** Conference name and league name. \n\n**Required Parameters:** conferenceId is required to run this call.\n\n---\n**Example of call with all parameters:** \nhttps://statsapi.mlb.com/api/v1/conferences/302?season=2018 \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert conferenceId to return a directory for a PCL conference.\n1. One conferenceId: https://statsapi.mlb.com/api/v1/conferences/302\n", "name": "conferenceId", "required": true, "schema": { "type": "integer" } }, { "in": "query", "description": "Insert season to return a directory for a PCL conference in a given year.\n1. One conferenceId: https://statsapi.mlb.com/api/v1/conferences/302?season=2018\n", "name": "season", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/conferences/302?fields=conferences,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ConferencesRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/awards/{awardId}/recipients": { "get": { "tags": [ "awards" ], "operationId": "awardRecipients", "summary": "View recipients of an award.", "description": "**Description:**\nThis endpoint returns awards data based on awardId.\n\n**Return Includes:** recipients, team, position, year.\n\n**Required Parameters:** awardId is required to run this call.\n\n**Hydrations:** This endpoint can accept the hydrations query parameter. \n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?\n<br> </br>\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?sportId=1&season=2017&leagueId=103\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert a awardId to return a directory of players for a given award.\n1. One sportId: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?\n\nFor a list of all awards: https://statsapi.mlb.com/api/v1/awards\n", "name": "awardId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return a directory of players for a given award in a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert leagueId(s) to return a directory of players for a given award in a specific league. Format '103,104'\n 1. One leagueId: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?leagueId=103\n\n For a list of all leagueIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "leagueId", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert year(s) to return a directory of players for a given award in a given season.\n 1. One year: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017\n", "name": "season", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. Format \"results,team\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&hydrate=team\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&hydrate=results,team\n 3. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&hydrate=hydrations,team(venue)\n 4. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&hydrate=hydrations,team(venue,social)\n 5. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&hydrate=hydrations\n - Available Hydrations:\n\n 1. results\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/awards/MLBHOF/recipients?season=2017&fields=awards,id,player,nameFirstLast\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_AwardsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/awards": { "get": { "tags": [ "config" ], "operationId": "awards", "summary": "Awards", "description": "\n**Description:**\nThis endpoint returns all reward values available on the Stats API.\n\n**Return Includes:** awards.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/awards \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CopyrightResponseEntity_AwardsRestObject_" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/baseballStats": { "get": { "tags": [ "config" ], "operationId": "baseballStats", "summary": "Baseball stats", "description": "\n**Description:**\nThis endpoint returns all stat values available on the Stats API.\n\n**Return Includes:** baseballStats.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/baseballStats \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BaseballStatsTypeRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/eventTypes": { "get": { "tags": [ "config" ], "operationId": "eventTypes", "summary": "Play event types", "description": "\n**Description:**\nThis endpoint returns all eventTypes available on the Stats API.\n\n**Return Includes:** eventTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/eventTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GeneralLookupRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/fielderDetailTypes": { "get": { "tags": [ "config" ], "operationId": "fielderDetailTypes", "summary": "fielderDetailTypes", "description": "\n**Description:**\nThis endpoint returns all publicially availabe fielderDetail types on the Stats API.\n\n**Return Includes:** GUMBO fielderDetailTypes types.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/runnerDetailTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/gameStatus": { "get": { "tags": [ "config" ], "operationId": "gameStatus", "summary": "Game statuses", "description": "\n**Description:**\nThis endpoint returns all gameStatus values available on the Stats API.\n\n**Return Includes:** gameStatuses.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/gameStatus \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/gameTypes": { "get": { "tags": [ "config" ], "operationId": "gameTypes", "summary": "Game types", "description": "\n**Description:**\nThis endpoint returns all gameTypes available on the Stats API.\n\n**Return Includes:** gameTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/gameTypes \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a sportId to return a directory of gameType(s) for a specific sport.\n1. One sportId: http://statsapi.mlb.com/api/v1/gameTypes?sportId=1&season=1993\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert year to return a directory of gameType(s) for a particular season. \n1. Insert year: http://statsapi.mlb.com/api/v1/gameTypes?sportId=1&season=1993\n", "name": "season", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/Collection_string_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/highLow/types": { "get": { "tags": [ "config" ], "operationId": "highLowStats", "summary": "High/low stat types", "description": "\n**Description:**\nThis endpoint returns all highLow stats available on the Stats API. highLow stats are game highs and lows.\n\n**Return Includes:** highLowStats.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/baseballStats \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/BaseballStatsTypeRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/hitTrajectories": { "get": { "tags": [ "config" ], "operationId": "hitTrajectories", "summary": "Hit trajectory descriptions", "description": "\n**Description:**\nThis endpoint returns all hit trajectory descriptions available on the Stats API.\n\n**Return Includes:** hit trajectories.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/hitTrajectories \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GeneralLookupRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobTypes": { "get": { "tags": [ "config" ], "operationId": "jobTypes", "summary": "Job types", "description": "\n**Description:**\nThis endpoint returns all job types available on the Stats API.\n\n**Return Includes:** jobTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/jobTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JobTypeRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/languages": { "get": { "tags": [ "config" ], "operationId": "languages", "summary": "Languages", "description": "\n**Description:**\nThis endpoint returns all languages available on the Stats API.\n\n**Return Includes:** languages.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/languages \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/leagueLeaderTypes": { "get": { "tags": [ "config" ], "operationId": "leagueLeaderTypes", "summary": "League leader types", "description": "\n**Description:**\nThis endpoint returns all league leader stat types available on the Stats API.\n\n**Return Includes:** league leader stat types.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/leagueLeaderTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/logicalEvents": { "get": { "tags": [ "config" ], "operationId": "logicalEvents", "summary": "GUMBO logicalEvent types", "description": "\n**Description:**\nThis endpoint returns all GUMBO logicalEvent types available on the Stats API.\n\n**Return Includes:** logicalEvents.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/logicalEvents \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/metrics": { "get": { "tags": [ "config" ], "operationId": "metrics", "summary": "Metrics", "description": "\n**Description:**\nThis endpoint returns all publicially availabe Statcast metrics on the Stats API.\n\n**Return Includes:** Statcast metric types.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/metrics \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/pitchCodes": { "get": { "tags": [ "config" ], "operationId": "pitchCodes", "summary": "PitchCodes", "description": "\n**Description:**\nThis endpoint returns all availiable pitchCodes on the Stats API.\n\n**Return Includes:** Pitch result code and descriptions. \n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/pitchCodes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GeneralLookupRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/pitchTypes": { "get": { "tags": [ "config" ], "operationId": "pitchTypes", "summary": "PitchTypes", "description": "\n**Description:**\nThis endpoint returns all availiable pitchTypes on the Stats API.\n\n**Return Includes:** Pitch types and codes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/pitchTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GeneralLookupRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/playerStatusCodes": { "get": { "tags": [ "config" ], "operationId": "playerStatusCodes", "summary": "Player status codes", "description": "\n**Description:**\nThis endpoint returns all player status codes available on the Stats API.\n\n**Return Includes:** status codes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttp://statsapi.mlb.com/api/v1/playerStatusCodes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/positions": { "get": { "tags": [ "config" ], "operationId": "positions", "summary": "Positions", "description": "\n**Description:**\nThis endpoint returns all player position information available on the Stats API.\n\n**Return Includes:** Player positions.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/positions \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/IPosition" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/reviewReasons": { "get": { "tags": [ "config" ], "operationId": "reviewReasons", "summary": "Reasons to review a play", "description": "\n**Description:**\nThis endpoint returns all reasons to review a play available on the Stats API.\n\n**Return Includes:** review descriptions.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/reviewReasons \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GeneralLookupRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/rosterTypes": { "get": { "tags": [ "config" ], "operationId": "rosterTypes", "summary": "Roster types", "description": "\n**Description:**\nThis endpoint returns all roster types available on the Stats API.\n\n**Return Includes:** rosterTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/rosterTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/runnerDetailTypes": { "get": { "tags": [ "config" ], "operationId": "runnerDetailTypes", "summary": "runnerDetailTypes", "description": "\n**Description:**\nThis endpoint returns all publicially availabe movementReason types on the Stats API.\n\n**Return Includes:** GUMBO movementReason types.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/runnerDetailTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/RestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/scheduleEventTypes": { "get": { "tags": [ "config" ], "operationId": "scheduleEventTypes", "summary": "Scheduled event types", "description": "\n**Description:**\nThis endpoint returns all scheduled event types available on the Stats API.\n\n**Return Includes:** scheduleEventTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/scheduleEventTypes \n", "deprecated": false, "parameters": [ { "in": "query", "description": "fields", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ScheduleEventTypeRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/situationCodes": { "get": { "tags": [ "config" ], "operationId": "sitCodes", "summary": "Situation codes", "description": "\n**Description:**\nThis endpoint returns all situational codes available on the Stats API.\n\n**Return Includes:** situationCodes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/situationCodes \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SituationCodeRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/sky": { "get": { "tags": [ "config" ], "operationId": "sky", "summary": "Weather descriptions", "description": "\n**Description:**\nThis endpoint returns all weather descriptions available on the Stats API.\n\n**Return Includes:** weather.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/sky \n", "deprecated": false, "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/standingsTypes": { "get": { "tags": [ "config" ], "operationId": "standingsTypes", "summary": "Standings types", "description": "\n**Description:**\nThis endpoint returns all standings types available on the Stats API.\n\n**Return Includes:** standingsTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/standingsTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/statGroups": { "get": { "tags": [ "config" ], "operationId": "statGroups", "summary": "Stat groups", "description": "\n**Description:**\nThis endpoint returns all stat groups available on the Stats API.\n\n**Return Includes:** statGroups.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/statGroups \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/statTypes": { "get": { "tags": [ "config" ], "operationId": "statTypes", "summary": "Stat types", "description": "\n**Description:**\nThis endpoint returns all stat types available on the Stats API.\n\n**Return Includes:** statTypes.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/statTypes \n", "deprecated": false, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/windDirection": { "get": { "tags": [ "config" ], "operationId": "windDirection", "summary": "WindDirection descriptions", "description": "\n**Description:**\nThis endpoint returns all windDirection descriptions available on the Stats API.\n\n**Return Includes:** windDirection.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/windDirection \n", "deprecated": false, "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/divisions": { "get": { "tags": [ "division" ], "operationId": "divisions", "summary": "View a directory of divisions.", "description": "\n**Description:**\nThis endpoint returns a directory of division(s) based on divisionId,leagueId,&sportId.\n\n**Return Includes:** Division name, id, leagueId, & sportId.\n\n**Required Parameters:** No parameters are required to run this call.\n<br></br>\n\n**To return all divisionIds among all sports and leagues run call with no parameters.** \n\n---\n**Example of call with no parameters:**\n\nhttps://statsapi.mlb.com/api/v1/divisions \n\n---\n**Example of call with all parameters:**\n\nhttps://statsapi.mlb.com/api/v1/divisions?divisionId=200&leagueId=103&sportId=1 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert divisionId(s) to return a directory of division(s) for a specific division. Format '200,201'\n1. One divisionId: https://statsapi.mlb.com/api/v1/divisions?divisionId=200\n2. Multiple divisionIds: https://statsapi.mlb.com/api/v1/divisions?divisionId=200,201\n\nFor a list of all divisionIds: https://statsapi.mlb.com/api/v1/divisions\n", "name": "divisionId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert leagueId to return a directory of division(s) for all divisions in a specific league.\n1. One leagueId: https://statsapi.mlb.com/api/v1/divisions?leagueId=103\n\nFor a list of all leagueIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "leagueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a sportId to return a directory of division(s) for all divisions in a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/divisions?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/DivisionsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/draft/{year}": { "get": { "tags": [ "draft" ], "operationId": "draft", "summary": "View drafted players by year.", "description": "\n**Description:**\nThis endpoint returns biographical and financial data for the Rule 4 draft.\n\n**Return Includes:** Player name, id, financial data, & team data.\n\n**Required Parameters:** year is required to run this call.\n\n---\n**Example of call with required parameters:**\n\nhttps://statsapi.mlb.com/api/v1/draft/2018 \n\n---\n**Example of call with all parameters:**\n\nhttps://statsapi.mlb.com/api/v1/draft/2018?limit=1&round=1&name=M&school=A&position=P&teamId=116&playerId=663554&bisPlayerId=759143\n", "deprecated": false, "parameters": [ { "in": "path", "description": "\nInsert year to return biographical and financial data for a specific Rule 4 draft. \n1. Insert year: https://statsapi.mlb.com/api/v1/draft/2018\n", "name": "year", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a limit to limit return. Limit number applies to each round. \n1. Insert limit: https://statsapi.mlb.com/api/v1/draft/2018?limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/draft/2018?fields=drafts,draftYear,rounds,round\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a round to return biographical and financial data for a specific round in a Rule 4 draft.\n1. Insert limit: https://statsapi.mlb.com/api/v1/draft/2018?round=1\n", "name": "round", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the first letter of a draftees last name to return their Rule 4 biographical and financial data.\n1. Insert name: https://statsapi.mlb.com/api/v1/draft/2018?name=M\n", "name": "name", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the first letter of a draftees school to return their Rule 4 biographical and financial data.\n1. Insert school: https://statsapi.mlb.com/api/v1/draft/2018?&school=A\n", "name": "school", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert state to return a list of Rule 4 draftees from that given state\n1. Insert state: https://statsapi.mlb.com/api/v1/draft/2018?&state=NY\n", "name": "state", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert state to return a list of Rule 4 draftees from that given state\n1. Insert state: https://statsapi.mlb.com/api/v1/draft/2018?&country=PR\n", "name": "country", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the position to return Rule 4 biographical and financial data for a players drafted at that position.\n1. Insert position: https://statsapi.mlb.com/api/v1/draft/2018?position=P\n\n **Find available positions at https://statsapi.mlb.com/api/v1/positions**\n", "name": "position", "required": false, "schema": { "type": "string", "enum": [ "P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "DH", "PH", "PR", "BR", "OF", "IF", "SP", "RP", "CP", "UT", "UI", "UO", "RHP", "LHP", "RHS", "LHS", "LHR", "RHR", "B", "X" ] } }, { "in": "query", "description": "\nInsert teamId to return Rule 4 biographical and financial data for all picks made by a specific team.\n1. Insert teamId: https://statsapi.mlb.com/api/v1/draft/2018?teamId=116\n\nFor a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert MLB playerId to return a player's Rule 4 biographical and financial data a specific Rule 4 draft.\n1. Insert playerId: https://statsapi.mlb.com/api/v1/draft/2018?playerId=663554\n", "name": "playerId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert bisPlayerId to return a player's Rule 4 biographical and financial data a specific Rule 4 draft.\n1. Insert bisPlayerId: https://statsapi.mlb.com/api/v1/draft/2018?bisPlayerId=759143\n", "name": "bisPlayerId", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/BaseballDraftListRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/draft/prospects/{year}": { "get": { "tags": [ "draft" ], "operationId": "draftProspects", "summary": "View draft eligible prospects by year.", "description": "\n**Description:**\nThis endpoint returns biographical and financial data for Rule 4 draft eligible prospects.\n\n**Return Includes:** Player name, id, financial data, & team data.\n\n**Required Parameters:** year is required to run this call.\n\n---\n**Example of call with required parameters:**\n\n https://statsapi.mlb.com/api/v1/draft/prospects/2018\n \n---\n**Example of call with all parameters:**\n\n https://statsapi.mlb.com/api/v1/draft/prospects/2018?limit=1&round=1&name=M&school=A&position=P&teamId=116&playerId=663554&bisPlayerId=759143 \n", "deprecated": false, "parameters": [ { "in": "path", "description": "\nInsert year to return biographical and financial data for a specific Rule 4 draft's eligibile prospects. \n1. Insert year: https://statsapi.mlb.com/api/v1/draft/prospects/2018\n", "name": "year", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a limit to limit return. Limit number applies to each round. \n1. Insert limit: https://statsapi.mlb.com/api/v1/draft/prospects/2018?limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/draft/prospects/2018?fields=drafts,draftYear,rounds,round\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a round to return biographical and financial data for a specific round in a Rule 4 draft.\n1. Insert limit: https://statsapi.mlb.com/api/v1/draft/prospects/2018?round=1\n", "name": "round", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the first letter of an eligible draftee's last name to return their Rule 4 biographical and financial data.\n1. Insert name: https://statsapi.mlb.com/api/v1/draft/prospects/2018?name=M\n", "name": "name", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the first letter of an eligible draftee's school to return their Rule 4 biographical and financial data.\n1. Insert school: https://statsapi.mlb.com/api/v1/draft/prospects/2018?&school=A\n", "name": "school", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert state to return a list of Rule 4 draftees from that given state\n1. Insert state: https://statsapi.mlb.com/api/v1/draft/prospects/2018?&state=NY\n", "name": "state", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert state to return a list of Rule 4 draftees from that given state\n1. Insert state: https://statsapi.mlb.com/api/v1/draft/prospects/2018?&country=PR\n", "name": "country", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert the position to return an eligible draftee's Rule 4 biographical and financial data for a players drafted at that position.\n1. Insert position: https://statsapi.mlb.com/api/v1/draft/prospects/2018?position=P\n\n **Find available positions at https://statsapi.mlb.com/api/v1/positions**\n", "name": "position", "required": false, "schema": { "type": "string", "enum": [ "P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "DH", "PH", "PR", "BR", "OF", "IF", "SP", "RP", "CP", "UT", "UI", "UO", "RHP", "LHP", "RHS", "LHS", "LHR", "RHR", "B", "X" ] } }, { "in": "query", "description": "\nInsert teamId to return Rule 4 biographical and financial data for all picks made by a specific team.\n1. Insert teamId: https://statsapi.mlb.com/api/v1/draft/prospects/2018?teamId=116\n\nFor a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert MLB playerId to return an eligible draftee's Rule 4 biographical and financial data a specific Rule 4 draft.\n1. Insert playerId: https://statsapi.mlb.com/api/v1/draft/prospects/2018?playerId=663554\n", "name": "playerId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert bisPlayerId to return an eligible draftee's Rule 4 biographical and financial data a specific Rule 4 draft.\n1. Insert bisPlayerId: https://statsapi.mlb.com/api/v1/draft/prospects/2018?bisPlayerId=759143\n", "name": "bisPlayerId", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ProspectListRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/draft/{year}/latest": { "get": { "tags": [ "draft" ], "operationId": "latestDraftPicks", "summary": "View latest player drafted, endpoint best used when draft is currently open.", "description": "\n**Description:**\nThis endpoint returns biographical and financial data for the most recent pick in the Rule 4 draft.\n\n**Return Includes:** Player name, id, financial data, & team data.\n\n**Required Parameters:** year is required to run this call.\n\n---\n**Example of call with required parameters:**\n\nhttps://statsapi.mlb.com/api/v1/draft/2018/latest \n", "deprecated": false, "parameters": [ { "in": "path", "description": "\nInsert year to return biographical and financial data for the most recent pick in the Rule 4 draft. \n1. Insert year: https://statsapi.mlb.com/api/v1/draft/2018/latest\n", "name": "year", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/BaseballDraftLatestRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1.1/game/{gamePk}/feed/live": { "get": { "tags": [ "game" ], "operationId": "liveGameV1", "summary": "View live game status. AKA GUMBO.", "description": "**Description:**\nThis endpoint returns the Gumbo Live Feed for a specific gamePk.\n\n**Return Includes:** Team information, live play by play data, and player information.\n\n**Required Parameters:** gamePk is required to run this call.\n\n**Hydrations:** This endpoint can accept the hydrations query parameter. \n\n<br></br>\n\n---\n**Example of call with required parameters:**\n\nhttps://statsapi.mlb.com/api/v1.1/game/534196/feed/live \n\n---\n**Example of call with all parameters:**\n\nhttps://statsapi.mlb.com/api/v1.1/game/534196/feed/live?timecode=20180323_014415&hydrate=alignment\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return the GUMBO live feed for a specific game. \n\n1. Insert gamePk: https://statsapi.mlb.com/api/v1.1/game/534196/feed/live\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS.\n\n**Return timecodes from timecodes endpoint https://statsapi.mlb.com/api/v1.1/game/534196/feed/live/timestamps.**\n \n\n1. Insert timecode: https://statsapi.mlb.com/api/v1.1/game/534196/feed/live?timecode=20180323_014415\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert hydration(s) to return putout credits or defensive positioning data for all plays in a particular game. Format 'credits,alignment,flags'\n\n-Notes on \"credits,alignment & flags\" hydration\n\nCredits - This hydration will populate a credits array that will list assist, putout, error, fielded ball, batter and pitcher of record where any event takes place. Caught stealing will populate the credits array in the runners array.\n\nAlignment - This hydration will populate a defense object that lists each position for every play event in the liveData->plays->allPlays array and an offense object that contains batter and runner info if a base is occupied.\n\nFlags - This hydration will populate a flags array in the liveData->plays->allPlays object when additional descriptive identifiers are needed. \n \nOfficials - This hydration will populate an officials array with the alignment of officials for each play \n\n\n\n1. One Hydration: https://statsapi.mlb.com/api/v1.1/game/530824/feed/live?hydrate=credits\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1.1/game/530824/feed/live?hydrate=credits,alignment,flags\n\n - Available Hydrations:\n 1. credits\n 2. alignment\n 3. flags\n 4. officials \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1.1/game/534196/feed/live?fields=metaData,gameEvents,logicalEvents,gameData,game,pk,type,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/GameRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1.1/game/{gamePk}/feed/live/diffPatch": { "get": { "tags": [ "game" ], "operationId": "liveGameDiffPatchV1", "summary": "View differences between two timecodes in live game.", "description": "**Description:**\nThis endpoint returns the difference/discrepancies between two timecodes in the Gumbo Live Feed using the Diff Patch System.\n\n**Return Includes:** Play by play data and player information.\n<br/><br/><b>Diff/Patch\nSystem:</b> startTimecode and endTimecode can be used for getting\ndiffs.<br/>Expected usage: <br/> 1) Request full payload by not passing\nstartTimecode or endTimecode. This will return the most recent game\nstate.<br/> 2) Find the latest timecode in this response. <br/> 3) Wait\nX seconds<br/> 4) Use the timecode from step 2 above as the startTimecode. This\nwill give you a diff of everything that has happened since\nstartTimecode. <br/> 5) If no data is returned, wait X seconds and do\nthe same request. <br/> 6) If data is returned, get a new timeStamp\nfrom the response, and use that for the next call as startTimecode.\n<br></br>\n**Required Parameters:** all parameters are required to run this call. If incorrectly called the call will default to http://statsapi.mlb.com/api/v1.1/game/531304/feed/live\n<br></br>\n\n---\n**Example of call with required parameters:**\n\nhttp://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch?startTimecode=20180823_193704&endTimecode=20180823_193711\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk \n1. Insert gamePk: http://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert startTimecode. Format:\nMMDDYYYY_HHMMSS\n1. Insert startTimecode: http://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch?startTimecode=20180823_193704&endTimecode=20180823_193711\n", "name": "startTimecode", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert endTimecode to complete this call \nFormat: MMDDYYYY_HHMMSS\n1. Insert endTimecode: http://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch?startTimecode=20180823_193704&endTimecode=20180823_193711\n", "name": "endTimecode", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/ResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1.1/game/{gamePk}/feed/live/timestamps": { "get": { "tags": [ "game" ], "operationId": "liveTimestampv11", "summary": "Retrieve all of the play timecodes for a game in GUMBO feed.", "description": "\n**Description:**\nThis endpoint returns timecodes for a specific gamePk.\n\n**Return Includes:** timecodes.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters:**\n\nhttps://statsapi.mlb.com/api/v1.1/game/531060/feed/live/timestamps \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return timecodes for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1.1/game/531060/feed/live/timestamps \n", "name": "gamePk", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/changes": { "get": { "tags": [ "game" ], "operationId": "traditionalChanges", "summary": "View corrected non Statcast information for games", "description": "\n**Description:**\nThis endpoint returns a directory of games with non Statcast data corrections. These changes include, scoring/pitching decisions,etc... \n\n**Return Includes:** biogrpahical information.\n\n**Required Parameters:** updatedSince.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/changes?sportId=1&updatedSince=2019-05-10T19:08:24.000004Z \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert updatedSince to return a directory of games with non Statcast data corrections changes made since the provided timestamp. \n\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/changes?sportId=1&updatedSince=2019-05-10T19:08:24.000004Z \n", "name": "updatedSince", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return a directory of games with non Statcast data corrections for a specific sport.\n1. Insert sportId: https://statsapi.mlb.com/api/v1/game/changes?sportId=1&updatedSince=2019-05-10T19:08:24.000004Z\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/changes?sportId=1&updatedSince=2019-05-13T19:08:24.000004Z&fields=dates,games,gamePk\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/analytics/game": { "get": { "tags": [ "game" ], "operationId": "updateStatcastGames", "summary": "View timestamps of most recent data corrections made to games.", "description": "**Description:**\nThis endpoint returns timestamps reflecting the most recent data corrections made to Games.\n\n**Return Includes:** timestamps.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttp://statsapi.mlb.com/api/v1/analytics/game\n\n---\n\n**Example of call with all parameters** \n\nhttp://statsapi.mlb.com/api/v1/analytics/game?lastMetricsUpdatedTime=2019-01-04T00:00:00.007380Z&gameModeId=2&sortBy=lastMetricsUpdatedTime&limit=1\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert gameModeId to return timestamps for data corrections made for a specific gameMode. There are 3 different gameModes:\n1. 0= Batting Practice\n2. 1 = Warm Up\n3. 2 = Live Game\n\nInsert one gameMode per request. Request default to gameMode 2\n\n1. Insert BP gameMode : http://statsapi.mlb.com/api/v1/analytics/game?gameModeId=0\n2. Insert Warm Up gameMode: http://statsapi.mlb.com/api/v1/analytics/game?gameModeId=1\n3. Insert Live gameMode: http://statsapi.mlb.com/api/v1/analytics/game?gameModeId=2\n", "name": "gameModeId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified\ntime. \n1. Insert timecode: http://statsapi.mlb.com/api/v1/analytics/game?lastUpdatedTime=2019-05-20T20:33:06.000058Z\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: http://statsapi.mlb.com/api/v1/analytics/game?limit=10\n", "name": "limit", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Sort return based on specific metric. Users can sort by 3 metrics:\n1. lastUpdatedTime - http://statsapi.mlb.com/api/v1/analytics/game?lastUpdatedTime=2019-05-20T20:33:06.000058Z&gameModeId=2&sortBy=lastUpdatedTime\n2. lastMetricsUpdatedTime - http://statsapi.mlb.com/api/v1/analytics/game?lastMetricsUpdatedTime=2019-05-20T20:33:25.400000Z&gameModeId=2&sortBy=lastMetricsUpdatedTime\n3. lastVideoUpdatedTime (MiLB Only for now) - http://statsapi.mlb.com/api/v1/analytics/game?lastVideoUpdatedTime=2019-08-05T14:05:34.353000Z&isNonStatcast=true&sortBy=lastVideoUpdatedTime\n\nEach of the 3 metrics map to the following objects\n \n1. lastUpdatedTime ~ updatedAt\n2. lastMetricsUpdatedTime ~ metricsUpdatedAt\n3. lastVideoUpdatedTime ~ videoUpdatedAt\n\nDescription of each of the 3 metrics. \n \n1. lastUpdatedTime ~ Timestamp of most recent update made to an individual play from a given game. This includes reassingment of plays or updates to raw data.\n2. lastMetricsUpdatedTime ~ Timestamp of most recent update made only to the metrics of an individual play from a given game. \n3. lastVideoUpdatedTime ~ Timestamp of most recent update made to the video for an individual play from a given game. \n", "name": "sortBy", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert isNonStatcast to return most recent MiLB games that have been updated with video. \n1. Insert isNonStatcast: http://statsapi.mlb.com/api/v1/analytics/game?lastUpdatedTime=2019-06-07&isNonStatcast=true\n", "name": "isNonStatcast", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "description": "Insert an offset to returns i+1 as the first record in the set of most recent games {Limit 1000} updated since a specific time, specific gameMode.\n1. Insert offset: http://statsapi.mlb.com/api/v1/analytics/game?offset=10\n", "name": "offset", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/analytics/game?fields=games,gamePk,metricsUpdatedAt\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/analytics/guids": { "get": { "tags": [ "game" ], "operationId": "updateGameGuids", "summary": "View timestamps of most recent data corrections made to GUIDs.", "description": "**Description:**\nThis endpoint returns timestamps reflecting the most recent data corrections made to GUIDS.\n\n**Return Includes:** timestamps.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttp://statsapi.mlb.com/api/v1/analytics/guids \n\n---\n\n**Example of call with all parameters** \n\nhttp://statsapi.mlb.com/api/v1/analytics/guids?lastMetricsUpdatedTime=2019-01-04T00:00:00.007380Z&gameModeId=2&sortBy=lastMetricsUpdatedTime&limit=1\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert gameModeId to return timestamps for data corrections made for a specific gameMode. There are 3 different gameModes:\n1. 0= Batting Practice\n2. 1 = Warm Up\n3. 2 = Live Game\n\nInsert one gameMode per request. Request default to gameMode 2\n\n1. Insert BP gameMode : http://statsapi.mlb.com/api/v1/analytics/guids?gameModeId=0\n2. Insert Warm Up gameMode: http://statsapi.mlb.com/api/v1/analytics/guids?gameModeId=1\n3. Insert Live gameMode: http://statsapi.mlb.com/api/v1/analytics/guids?gameModeId=2\n", "name": "gameModeId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified\ntime. \n1. Insert timecode: http://statsapi.mlb.com/api/v1/analytics/guids?lastUpdatedTime=2018-10-25T09:58:06.007830Z\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: http://statsapi.mlb.com/api/v1/analytics/guids?limit=10\n", "name": "limit", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Sort return based on specific metric. Users can sort by 4 metrics:\n1. lastUpdatedTime - http://statsapi.mlb.com/api/v1/analytics/guids?lastUpdatedTime=2019-01-04T00:00:00.007380Z&gameModeId=2&sortBy=lastUpdatedTime\n2. lastMetricsUpdatedTime - http://statsapi.mlb.com/api/v1/analytics/guids?lastMetricsUpdatedTime=2019-01-04T00:00:00.007380Z&gameModeId=2&sortBy=lastMetricsUpdatedTime\n3. lastPlayTime-http://statsapi.mlb.com/api/v1/analytics/guids?lastPlayTime=2018-02-02T16:06:51.704011Z&gameModeId=2&sortBy=lastPlayTime\n4. lastVideoUpdatedTime (MiLB Only for now) - http://statsapi.mlb.com/api/v1/analytics/guids?lastVideoUpdatedTime=2019-08-05T14:05:34.353000Z&isNonStatcast=true&sortBy=lastVideoUpdatedTime\n\n\nEach of the 4 metrics map to the following objects\n \n1. lastUpdatedTime ~ updatedAt\n2. lastMetricsUpdatedTime ~ metricsUpdatedAt\n3. lastPlayTime ~ time\n4. lastVideoUpdatedTime ~ videoUpdatedAt\n\n\nDescription of each of the 4 metrics. \n \n1. lastUpdatedTime ~ Timestamp of most recent update made to an individual play. This includes reassingment of plays or updates to raw data.\n2. lastMetricsUpdatedTime ~ Timestamp of most recent update made only to the metrics of an individual play. \n3. lastPlayTime ~ Timestamp of when play has started, however this is not frame accurate like startTime,endTime, & pitchTime and can vary between plays \n4. lastVideoUpdatedTime ~ Timestamp of most recent update made to an individual play. \n", "name": "sortBy", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert isNonStatcast to return most recent guids for MiLB games that have been updated with video. \n1. Insert isNonStatcast: http://statsapi.mlb.com/api/v1/analytics/guids?lastUpdatedTime=2019-06-07T13:09:04.527000Z&isNonStatcast=true\n", "name": "isNonStatcast", "required": false, "schema": { "type": "boolean" } }, { "in": "query", "description": "Insert an offset to returns i+1 as the first record in the set of most recent games {Limit 1000} updated since a specific time, specific gameMode.\n1. Insert offset: http://statsapi.mlb.com/api/v1/analytics/guids?offset=10\n", "name": "offset", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/analytics/guids?fields=games,gamePk,metricsUpdatedAt\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/guids": { "get": { "tags": [ "game" ], "operationId": "Statcast", "summary": "View Statcast data for a specific game.", "description": "**Description:**\nThis endpoint returns Statcast data forall plays in a specific game.\n\n**Return Includes:** timestamps.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/566685/guids? \n\n---\n\n**Call with all parameters** \n\nhttp://statsapi.mlb.com/api/v1/game/566685/guids?updatedSince=2019-05-13T14:15:14.005620Z&gameModeId=2&isPitch=true&isHit=true&isPickoff=false&hydrate=analytics(result,hit,pitch,metrics,contextAverages,video,metaData)\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return GUIDS for a specific game.\n 1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/566685/guids?\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert gameModeId to return timestamps for data corrections made for a specific gameMode. There are 3 different gameModes:\n1. 0= Batting Practice\n2. 1 = Warm Up\n3. 2 = Live Game\n\nInsert one gameMode per request. Request default to gameMode 2\n\n1. Insert BP gameMode : https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=0\n2. Insert Warm Up gameMode: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=1\n3. Insert Live gameMode: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=2\n", "name": "gameModeId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified time it was updated.\n\n1. Insert timecode: http://statsapi.mlb.com/api/v1/game/566685/guids?updatedSince=2019-05-13T14:15:14.005620Z&gameModeId=2&hydrate=analytics(video)\n\nupdatedSince is mapped to the lastUpdatedTime timestamp.\n \n1. lastUpdatedTime ~ updatedSince\n", "name": "updatedSince", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert isPitch to return either all GUIDS corresponding to pitches{true} or non-pitch events{false}.\n1. Insert isPitch true: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=2&isPitch=true\n2. Insert isPitch false: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=2&isPitch=false\n", "name": "isPitch", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert isHit to return either all GUIDS corresponding to hits{true} or non-hit events{false}.\n1. Insert isHit true: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=2&isHit=true\n2. Insert isHit false: https://statsapi.mlb.com/api/v1/game/566685/guids?gameModeId=2&isHit=false\n", "name": "isHit", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert isPickoff to return either all GUIDS corresponding to pickoffs{true} or non-pickoff events{false}.\n1. Insert isPickoff true: https://statsapi.mlb.com/api/v1/game/565798/guids?gameModeId=2&isPickoff=true\n2. Insert isPickoff false: https://statsapi.mlb.com/api/v1/game/565798/guids?gameModeId=2&isPickoff=false\n", "name": "isPickoff", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert hydration(s) to return statistical or video data for a specific game. Format 'analytics(result,hit,pitch,metrics,contextAverages,video)'\n1. One Hydration: https://statsapi.mlb.com/api/v1/game/565798/guids?hydrate=analytics(hit)\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/game/565798/guids?hydrate=analytics(result,hit,pitch,metrics,contextAverages,video,metaData)\n\n - Available Hydrations:\n 1. hit - Statcast hit segment (exit velocity, launch angle, etc.)\n 2. pitch- Statcast ball segment (lastMeasuredData, releaseData trajectoryData\n 3. metrics - Calculated Statcast metrics (Sprint Speed, Exit Velocity, etc.)\n 4. contextAverages - context for calculated metrics \n 5. video - URLs for clipped video files \n 6. metaData- metaData for the play\n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Return full parsed or raw data via .tar for the entire game\n1. parsed: https://statsapi.mlb.com/api/v1/game/565798/analytics/parsed\n2. raw: https://statsapi.mlb.com/api/v1/game/565798/analytics/raw\n", "name": "parsed/raw", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/564248/guids?gameModeId=2&hydrate=analytics(hit)&fields=gamePk,hitSegment,launchData,speed\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/{GUID}/analytics": { "get": { "tags": [ "game" ], "operationId": "StatcastGuids", "summary": "View Statcast data for a specific play.", "description": "**Description:**\nThis endpoint returns Statcast data for a specific play.\n\n**Return Includes:** timestamps.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?\n\n---\n\n**Example of call with hydration parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?hydrate=analytics(hit,pitch,ball,metrics,video,positions,diagram)\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return Statcast data for a specific play.\n 1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "path", "description": "Insert GUID to return Statcast data for a specific play.\n 1. Insert GUID: https://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?\n", "name": "GUID", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert hydration(s) to return statistical or video data for a specific game. Format 'analytics(result,hit,pitch,metrics,context,video,metaData)'\n1. One Hydration: https://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?hydrate=analytics(hit)\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?hydrate=analytics(hit,pitch,ball,metrics,video,positions,diagram)\n\n - Available Hydrations:\n 1. hit - Statcast hit segment (exit velocity, launch angle, etc.)\n 2. pitch- Statcast ball segment (lastMeasuredData, releaseData trajectoryData\n 3. ball- Statcast generic measurements for hit and pitch segments (firstMeasurment, startData, etc...) & Array of the measurement of the ball position and velocity\n 4. metrics - Calculated Statcast metrics (Sprint Speed, Exit Velocity, etc.)\n 5. video - URLs for clipped video files \n 6. positions - Identification of players tracked on the field\n 7. diagram- visual SVG image of what transpired on the play\n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/566532/17c0551a-4caa-476b-9208-5d3cb5f58b7d/analytics?hydrate=analytics(result,hit,pitch,metrics,context,positions)&fields=trackedEvents,timeStamp,playEvent\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/{GUID}/contextMetricsAverages": { "get": { "tags": [ "game" ], "operationId": "StatcastGuidsContextMetrics", "summary": "View Statcast contextMetrics data for a specific play.", "description": "**Description:**\nThis endpoint returns Statcast data for a specific play.\n\n**Return Includes:** timestamps.\n\n**Required Parameters:** No parameters are required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttp://statsapi.mlb.com/api/v1/game/566885/25381bfd-e258-4064-8c54-628e6ae3bdab/contextMetricsAverages\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return Statcast data for a specific play.\n 1. Insert gamePk: http://statsapi.mlb.com/api/v1/game/566885/25381bfd-e258-4064-8c54-628e6ae3bdab/contextMetricsAverages\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "path", "description": "Insert GUID to return Statcast data for a specific play.\n 1. Insert GUID:http://statsapi.mlb.com/api/v1/game/566885/25381bfd-e258-4064-8c54-628e6ae3bdab/contextMetricsAverages\n", "name": "GUID", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/game/566885/25381bfd-e258-4064-8c54-628e6ae3bdab/contextMetricsAverages?fields=group,name,value\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/contextMetrics": { "get": { "tags": [ "game" ], "operationId": "getGameContextMetrics", "summary": "View context metrics for a game based on its current state.", "description": "\n**Description:**\nThis endpoint returns Context Metrics for a specific gamePk.\n\n**Return Includes:** Context Metircs, team information, venue information.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters:**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/contextMetrics \n\n---\n**Example of call with all parameters:**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/contextMetrics?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return Conetext Metrics for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/contextMetrics\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert timecode to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS.\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531060/contextMetrics?timecode=20180803_182458\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531060/contextMetrics?fields=game,gameDate,status,statusCode,teams,away,home,score,team,name,awayWinProbability,homeWinProbability\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/GameContextRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/winProbability": { "get": { "tags": [ "game" ], "operationId": "getWinProbability", "summary": "View win probability for a specific gamePk per atBat.", "description": "\n**Description:**\nThis endpoint returns complete game data with win probabilities after each at bat for a specific game. \n\n**Return Includes:** Win probability and play by play data.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/winProbability\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/winProbability?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return win probabilites after every at bat for a specific game.\n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/winProbability\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531060/winProbability?timecode=20180803_182458\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531060/winProbability?fields=atBatIndex,homeTeamWinProbability,awayTeamWinProbability\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlayRestObject" }, "uniqueItems": false } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/boxscore": { "get": { "tags": [ "game" ], "operationId": "boxscore", "summary": "View boxscore for specific game.", "description": "\n**Description:**\nThis endpoint returns boxscore data for a specific gamePk. \n\n**Return Includes:** Boxscore,play by play, and team data.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/boxscore\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/boxscore?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return boxscore information for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/boxscore\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531060/boxscore?timecode=20180803_182458\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531060/boxscore?fields=teams,away,team,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/Boxscore" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/content": { "get": { "tags": [ "game" ], "operationId": "content", "summary": "View all content for a game.", "description": "\n**Description:**\nThis endpoint returns editorial content for a specific gamePk. \n\n**Return Includes:** Editorial pieces, highlights, images, game summary and game notes.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/content\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/content?highlightLimit=5\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return content information for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/content\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Number of results to return\n1. Insert limit: https://statsapi.mlb.com/api/v1/game/531060/content?highlightLimit=5\n", "name": "highlightLimit", "required": false, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_GameContentRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/feed/color": { "get": { "tags": [ "game" ], "operationId": "colorFeed", "summary": "View game color commentary info.", "description": "\n**Description:**\nThis endpoint returns the color feed for a specific gamePk. \n\n**Return Includes:** Play by play, video, and pitch data.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531321/feed/color\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531321/feed/color?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return the color feed for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531321/feed/color\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified.\ntime. Format: YYYYMMDD_HHMMSS\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531321/feed/color?&timecode=20180823_181734\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531321/feed/color?fields=game_id,items\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/feed/color/diffPatch": { "get": { "tags": [ "game" ], "operationId": "colorFeedDiffPatch", "summary": "View game color feed.", "description": "**Description:**\nThis endpoint returns the difference/discrepancies between two timecodes in the Color Feed using the Diff Patch System.\n\n**Return Includes:** Play by play data and player information.\n<br/><br/><b>Diff/Patch\nSystem:</b> startTimecode and endTimecode can be used for getting\ndiffs.<br/>Expected usage: <br/> 1) Request full payload by not passing\nstartTimecode or endTimecode. This will return the most recent game\nstate.<br/> 2) Find the latest timecode in this response. <br/> 3) Wait\nX seconds<br/> 4) Use the timecode from step 2 above as the startTimecode. This\nwill give you a diff of everything that has happened since\nstartTimecode. <br/> 5) If no data is returned, wait X seconds and do\nthe same request. <br/> 6) If data is returned, get a new timeStamp\nfrom the response, and use that for the next call as startTimecode.\n<br></br>\n**Required Parameters:** all parameters are required to run this call. If incorrectly called the call will default to http://statsapi.mlb.com/api/v1/game/531304/feed/color\n<br></br>\n\n---\n**Example of call with required parameters:**\n\nhttp://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch?startTimecode=20180822_163853&endTimecode=20180822_163938\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk \n1. Insert gamePk: http://statsapi.mlb.com/api/v1/game/531321/feed/color/diffPatch\n", "name": "gamePk", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert startTimecode. Format:\nMMDDYYYY_HHMMSS\n\n1. Insert starTimecode: http://statsapi.mlb.com/api/v1/game/531321/feed/color/diffPatch?startTimecode=20180823_162652\n", "name": "startTimecode", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert endTimecode to complete this call.\nFormat: MMDDYYYY_HHMMSS\n\n1. Insert endTimecode: http://statsapi.mlb.com/api/v1.1/game/531321/feed/live/diffPatch?startTimecode=20180823_170716&endTimecode=20180823_171303\n", "name": "endTimecode", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/ResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/feed/color/timestamps": { "get": { "tags": [ "game" ], "operationId": "colortimecodes", "summary": "View all of the color timecodes for a game.", "description": "**Description:**\nThis endpoint returns timecodes for a specific gamePk.\n\n**Return Includes:** timecodes.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/534101/feed/color/timestamps\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return timecodes for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/534101/feed/color/timestamps\n", "name": "gamePk", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "type": "string" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/linescore": { "get": { "tags": [ "game" ], "operationId": "linescore", "summary": "View game linescore.", "description": "\n**Description:**\nThis endpoint returns linescore data from a specific gamePk. \n\n**Return Includes:** Linescore,play by play, and team data.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/linescore\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/linescore?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return linescore information for a specific game.\n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/linescore\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified\ntime. Format: YYYYMMDD_HHMMSS\n\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531060/linescore?timecode=20180803_182458\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531060/linescore?fields=innings,num,home,away,runs\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/Linescore" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/game/{gamePk}/playByPlay": { "get": { "tags": [ "game" ], "operationId": "playByPlay", "summary": "View game play By Play.", "description": "**Description:**\nThis endpoint returns play by play data for a specific gamePk.\n\n**Return Includes:** play by play data.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/game/531060/playByPlay\n\n---\n\n**Example of call with all parameters** \n\nhttps://statsapi.mlb.com/api/v1/game/531060/playByPlay?timecode=20180803_182458\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return timestamps for a specific game. \n1. Insert gamePk: https://statsapi.mlb.com/api/v1/game/531060/playByPlay\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Use this parameter to return a snapshot of the data at the specified\ntime. Format: YYYYMMDD_HHMMSS\n1. Insert timecode: https://statsapi.mlb.com/api/v1/game/531060/playByPlay?timecode=20180803_182458\n", "name": "timecode", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/game/531060/playByPlay?fields=allPlays,result,type,description,about,inning\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json;charset=UTF-8": { "schema": { "$ref": "#/components/schemas/PlayByPlayRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/gamePace": { "get": { "tags": [ "gamePace" ], "operationId": "gamePace", "summary": "View time of game info.", "description": "\n**Description:**\nThis endpoint returns pace of game metrics for specific sport, league or team.\n\n**Return Includes:** Time of game, time per hit, totalHits etc....\n\n**Required Parameters:** season is required to run this call.\n\n---\n**Example of call with required parameters**\n \n1. https://statsapi.mlb.com/api/v1/gamePace?season=2018\n\n\ndeprecated: false\n", "parameters": [ { "in": "query", "description": "Insert year to return a directory of pace of game metrics for a given season.\n 1. One year: https://statsapi.mlb.com/api/v1/gamePace?season=2018\n", "name": "season", "required": true, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a teamIds to return directory of pace of game metrics for a given team.\n 1. Insert teamIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&teamIds=110\n 2. Insert multiple teamIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&teamIds=110,147\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamIds", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert leagueIds to return a directory of pace of game metrics for a given league. Format '103,104'\n 1. One leagueIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&leagueId=103\n 2. Multiple leagueIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&leagueId=103,104\n", "name": "leagueIds", "required": false, "schema": { "type": "array", "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a unique League List Identifier to return a directory of pace of game metrics for a specific league listId.\n 1. One leagueListId: https://statsapi.mlb.com/api/v1/gamePace?season=2018&leagueListId=mlb\n", "name": "leagueListId", "required": false, "schema": { "type": "string", "enum": [ "milb_full", "milb_short", "milb_complex", "milb_all", "milb_all_nomex", "milb_all_domestic", "milb_noncomp", "milb_noncomp_nomex", "milb_domcomp", "milb_intcomp", "win_noabl", "win_caribbean", "win_all", "abl", "mlb", "mlb_hist", "mlb_milb", "mlb_milb_hist", "mlb_milb_win", "baseball_all" ] } }, { "in": "query", "description": "Insert a sportId to return a directory of pace of game metrics for a specific sport.\n1. One sportIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&sportId=1\n2. Multiple sportIds: https://statsapi.mlb.com/api/v1/gamePace?season=2018&sportIds=1,11\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert gameType(s) a return a directory of pace of game metrics for a specific gameType.\n 1. One gameType: https://statsapi.mlb.com/api/v1/gamePace?season=2018&gameType=R\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert date to return a directory of pace of game metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**startDate must be coupled with endDate**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/gamePace?season=2018&startDate=04/04/2018&endDate=04/06/2018\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of pace of game metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**endDate must be coupled with startDate**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/gamePace?season=2018&startDate=04/04/2018&endDate=04/06/2018\n", "name": "endDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert venueId to return a directory of pace of game metrics for a particular venueId.\n 1. Insert venueId: https://statsapi.mlb.com/api/v1/gamePace?season=2018&venueIds=15\n \n For a list of all venueId: https://statsapi.mlb.com/api/v1/teams\n", "name": "venueIds", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a orgType to return a directory of pace of game metrics based on team, league or sport .\n 1. One orgType: https://statsapi.mlb.com/api/v1/gamePace?season=2018&orgType=S\n", "name": "orgType", "required": false, "schema": { "type": "string", "enum": [ "T- TEAM", "L- LEAGUE", "S- SPORT" ] } }, { "in": "query", "description": "Insert includeChildren to return a directory of pace of game metrics for all child teams in a given parent sport.\n 1. Insert includeChildren boolean: https://statsapi.mlb.com/api/v1/gamePace?season=2018&sportId=1&includeChildren=1\n \n", "name": "includeChildren", "required": false, "schema": { "type": "boolean", "default": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/gamePace?season=2018&fields=sports,timePerGame,sport,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_GamePaceWrapperRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/highLow/{orgType}": { "get": { "tags": [ "highLow" ], "operationId": "highLow", "summary": "View high/low stats by player or team.", "description": "highLow", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert a orgType to return a directory of highLow stats for a group of games.\n 1. One orgType: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=atBats\n", "name": "orgType", "required": true, "schema": { "type": "string", "enum": [ "PLAYER", "TEAM", "DIVISION", "LEAGUE", "SPORT" ] } }, { "in": "query", "description": "Insert statGroup to return a directory of highLow stats for a statGroup.\n 1. Insert statGroup: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=atBats&group=hitting\n \n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups \n", "name": "statGroup", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nSort return based on stat. All availbale stats can be found at https://statsapi.mlb.com/api/v1/highLow/types\n\n1. Insert stat: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=atBats\n", "name": "sortStat", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert year to return highLow statistics for a particular season. \n1. Insert year: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=atBats\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert gameType to return highLow statistics for a given gameType. \n 1. Insert gameType: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&gameType=D\n \nFind available gameType at https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert teamId to return highLow statistics for a given team. \n 1. Insert teamId: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&gameType=D&teamId=111\n", "name": "teamId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert leagueId to return highLow statistics for a given league. \n 1. Insert leagueId: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&gameType=D&leagueId=104\n", "name": "leagueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert sportId to return highLow statistics for a given sport. \n1. Insert sportId: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&gameType=D&sportId=11\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportIds", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&sportId=1&limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/highLow/Team?season=2018&sortStat=homeRuns&sportId=1&fields=highLowResults,splits,stat,homeRuns,date,game,gamePk\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/HighLowWrapperRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/homeRunDerby/{gamePk}": { "get": { "tags": [ "homerunderby" ], "operationId": "homeRunDerbyPk", "summary": "View a home run derby object based on gamePk.", "description": "\n**Description:**\nThis endpoint returns HomerunDerby data for a specific gamePk.\n\n**Return Includes:** Round breakdown, hit data, player information.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/homeRunDerby/511101 \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return HomerunDerby data for a specific gamepk.\n1. Insert gamePk: https://statsapi.mlb.com/api/v1/homeRunDerby/511101\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/homeRunDerby/511101?fields=rounds,round,matchups,topSeed,player,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/HomeRunDerbyRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/homeRunDerby/{gamePk}/bracket": { "get": { "tags": [ "homerunderby" ], "operationId": "homeRunDerbyBracket", "summary": "View a home run derby object based on bracket.", "description": "\n**Description:**\nThis endpoint returns HomerunDerby data for a specific gamePk broken down by bracket.\n\n**Return Includes:** Round breakdown, hit data, player information.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/homeRunDerby/511101/bracket\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return HomerunDerby data for a specific gamepk.\n1. Insert gamePk: https://statsapi.mlb.com/api/v1/homeRunDerby/511101/bracket\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/homeRunDerby/511101/bracket?fields=rounds,round,matchups,topSeed,player,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/HomeRunDerbyRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/homeRunDerby/{gamePk}/pool": { "get": { "tags": [ "homerunderby" ], "operationId": "homeRunDerbyPool", "summary": "View a home run derby object based on pool.", "description": "\n**Description:**\nThis endpoint returns HomerunDerby data for a specific gamePk broken down by pool.\n\n**Return Includes:** Round breakdown, hit data, player information.\n\n**Required Parameters:** gamePk is required to run this call.\n\n---\n**Example of call with required parameters**\n\nhttps://statsapi.mlb.com/api/v1/homeRunDerby/511101/pool \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert gamePk to return HomerunDerby data for a specific gamepk.\n1. Insert gamePk: https://statsapi.mlb.com/api/v1/homeRunDerby/511101/pool\n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/homeRunDerby/511101/pool?fields=rounds,round,batters,player,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/HomeRunDerbyRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/league": { "get": { "tags": [ "league" ], "operationId": "league", "summary": "View league information.", "description": "**Description:**\nThis endpoint returns league information data based on sportId,leagueId,or year.\n\n**Return Includes:** Regular Season Start/End Date, Post Season Start/End Date, leagueId.\n\n**Required Parameters:** SportId or LeagueId are required to run this call.\n\n---\n**Example of call with required parameters**\n\n1. https://statsapi.mlb.com/api/v1/league?sportId=1\n2. https://statsapi.mlb.com/api/v1/league?leagueIds=103\n<br> </br>\n**Blank season value defaults to current year.**\n\n---\n**Example of call with all parameters**\n\nhttps://statsapi.mlb.com/api/v1/league?leagueIds=103&seasons=2018\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert sportId to return league information for a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/league?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": true, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert leagueId(s) to return league information for a specific league. Format '103,104'\n 1. One leagueId: https://statsapi.mlb.com/api/v1/league?leagueIds=103\n 2. Multiple leagueId: https://statsapi.mlb.com/api/v1/league?leagueIds=103,104\n", "name": "leagueIds", "required": true, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert year(s) to return league information for a specific season. Format '2017,2018'\n 1. One year: https://statsapi.mlb.com/api/v1/league?seasons=2018&leagueIds=103\n 2. Multiple years: https://statsapi.mlb.com/api/v1/league?seasons=2017,2018&leagueIds=103\n", "name": "seasons", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/league?sportId=1&fields=leagues,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/league/{leagueId}/allStarBallot": { "get": { "tags": [ "league" ], "operationId": "allStarBallot", "summary": "View All-Star Ballots per league.", "description": "\n**Description:**\n This endpoint returns Allstar Game Roster Ballot data based on leagueId or year.\n \n **Return Includes:** Player biographical information.\n \n **Required Parameters:** Season and LeagueId are required to run this call.\n \n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/league/103/allStarBallot?season=2018\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert leagueId to return allStarBallot information for a specific league.\n1. Insert leagueId: https://statsapi.mlb.com/api/v1/league/103/allStarBallot?\n", "name": "leagueId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return allStarBallot information for a specific season and complete the call.\n1. https://statsapi.mlb.com/api/v1/league/103/allStarBallot?season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/league/103/allStarBallot?season=2018&fields=people,id,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/league/{leagueId}/allStarWriteIns": { "get": { "tags": [ "league" ], "operationId": "allStarWriteIns", "summary": "View All-Star Write-ins per league.", "description": "\n**Description:**\n This endpoint returns Allstar Game Roster Write In Vote data based on leagueId or year.\n \n **Return Includes:** Player biographical information.\n \n **Required Parameters:** Season and LeagueId are required to run this call.\n \n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/league/103/allStarWriteIns?season=2018\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert leagueId to return allStarBallot information for a specific league.\n1. Insert leagueId: https://statsapi.mlb.com/api/v1/league/103/allStarWriteIns\n", "name": "leagueId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return allStarBallot information for a specific season and complete the call.\n1. https://statsapi.mlb.com/api/v1/league/103/allStarWriteIns?season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/league/103/allStarWriteIns?season=2018&fields=people,id,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/league/{leagueId}/allStarFinalVote": { "get": { "tags": [ "league" ], "operationId": "allStarFinalVote", "summary": "View All-Star Final Vote per league.", "description": "\n**Description:**\n This endpoint returns data for Allstar Game Roster Final Vote based on leagueId or year.\n \n **Return Includes:** Player biographical information.\n \n **Required Parameters:** Season and LeagueId are required to run this call.\n \n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/league/103/allStarFinalVote?season=2018\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert leagueId to return allStarBallot information for a specific league.\n1. Insert leagueId: https://statsapi.mlb.com/api/v1/league/103/allStarFinalVote\n", "name": "leagueId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return allStarBallot information for a specific season and complete the call.\n1. https://statsapi.mlb.com/api/v1/league/103/allStarFinalVote?season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Format: Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/league/103/allStarFinalVote?season=2018&fields=people,id,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/people": { "get": { "tags": [ "person" ], "operationId": "people", "summary": "View one or more person's stats and biographical information.", "description": "**Description:**\n This endpoint returns statistical data and biographical information for a players,umpires, and coaches based on playerId.\n \n **Return Includes:** personId, DOB, statistics for players based on statType.\n \n **Required Parameters:** personIds is required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \nhttps://statsapi.mlb.com/api/v1/people?personIds=605151\n \n ---\n **Example of call with hydration parameters**\n \nhttps://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(type=byMonth),education\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert personId(s) to return biographical information for a specific player. Format '605151,592450'\n1. One personId: https://statsapi.mlb.com/api/v1/people?personIds=605151\n2. Multiple personIds: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450\n\n **List of players by sport can be found at the <a href=\"http://statsapi.mlb.com/docs/#operation/sportPlayers\">sportPlayers</a> endpoint.** \n", "name": "personIds", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert hydration(s) to return statistical or biographical data for a specific player(s). Format stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"]).\n1. One Hydration: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=education\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting,pitching],type=[byMonth]),education\n3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=hydrations\n\n - Available Hydrations:\n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/people?personIds=605151&appContext=majorLeague&hydrate=currentTeam\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/people?personIds=605151&appContext=minorLeague&hydrate=currentTeam\n \n - Notes on Stat Hydrations\n \n Best practice for MLB stat hydrations, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"]). \n\n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting],type=[career])\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting,pitching],type=[career,yearByYear])\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual season stat hydrations, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\"). \n\n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting],type=[season],season=2018)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&season=2018&hydrate=stats(group=[hitting,pitching],type=[seasonAdvanced,season],season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\").\n \n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people?personIds=663898,665489&season=2018&hydrate=stats(group=[hitting],type=[career],sportId=12)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people?personIds=663898,621052&season=2018&hydrate=stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12),education\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB individual season stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=\"year\").\n \n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people?personIds=663898,665489&season=2018&hydrate=stats(group=[hitting],type=[season],sportId=12,season=2018)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people?personIds=663898,621052&season=2018&hydrate=stats(group=[hitting,pitching],type=[seasonAdvanced,season],sportId=12,season=2018),education\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: https://statsapi.mlb.com/api/v1/people?personIds=592450&hydrate=stats(group=[hitting],type=[playLog],limit=1,season=2017)\n \n 2. Limiting pitchLog: https://statsapi.mlb.com/api/v1/people?personIds=605151&hydrate=stats(group=[pitching],type=[pitchLog],limit=1,season=2017)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"],startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\"). \n\n 1. Hydrating byDateRange stat: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&hydrate=stats(group=[hitting],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: https://statsapi.mlb.com/api/v1/people?personIds=605151&hydrate=stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: https://statsapi.mlb.com/api/v1/people?personIds=605151&hydrate=stats(group=[pitching],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n Best practice for metrics in stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[metricAverages],metrics=[launchSpeed],season=\"year\") or stats(type=[metricLog],metrics=[launchSpeed],season=\"year\"). \n \n 1. Hydrating one metric with metricAverages: https://statsapi.mlb.com/api/v1/people?personIds=592450&hydrate=stats(group=[hitting],type=[metricAverages],metrics=[launchSpinRate],season=2018)\n 2. Hydrating one statType and multiple metrics with metricAverages: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&hydrate=stats(group=[hitting,pitching],type=[byMonth,metricAverages],metrics=[launchSpeed,launchSpinRate],season=2018)\n \n 3. Hydrating one metric with metricLog: https://statsapi.mlb.com/api/v1/people?personIds=592450&season=2018&hydrate=stats(group=[hitting],type=[metricLog],metrics=[launchSpinRate],season=2018)\n 4. Hydrating one statType and multiple metrics with metricLog: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&hydrate=stats(group=[hitting,pitching],type=[byMonth,metricLog],metrics=[launchSpeed,launchSpinRate],season=2018)\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n\n Best practice for MLB sitCodes in stat hydrations, use stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],season=\"year\"). \n \n 1. Hydrating one sitCode: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&hydrate=stats(group=[hitting],type=[career,statSplits],sitCodes=[a],season=2018)\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/people?personIds=605151,592450&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n\n Best practice for MiLB sitCodes in stat hydrations, use stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],sportId = \"MiLB Id\",season=\"year\"). \n \n 1. Hydrating on sitCode: https://statsapi.mlb.com/api/v1/people?personIds=663898,621052&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a],sportId=12,season=2018)\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/people?personIds=663898,621052&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=12,season=2018)\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n\n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/people?personIds=605151&fields=people,id,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PeopleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/people/freeAgents": { "get": { "tags": [ "person" ], "operationId": "freeAgents", "summary": "View biographical information and stats for Free Agents.", "description": "**Description:**\n This endpoint returns statistical data and biographical information for Free Agents based on season.\n \n **Return Includes:** personId, DOB, statistics for players based on statType.\n \n **Required Parameters:** season is required to run this call.\n \n \n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018 \n \n ---\n **Example of call with hydration parameters**\n \n http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(person(stats(group=hitting,type=season)) \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert year to return free agents for a particular season. \n 1. Insert year: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018\n", "name": "seasonId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert order to sort the return of free agents. Format asc, desc \n 1. Insert order: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&order=desc\n", "name": "order", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert hydration(s) to return statistical or biographical data for free agents. Format 'education,stats(type=byMonth,season=2018)'\n1. One Hydration: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=education\n2. Multiple Hydrations: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=stats(type=byMonth,season=2018),education\n3. Check For Available Hydrations: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=hydrations\n\n - Available Hydrations:\n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n \n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&appContext=majorLeague&hydrate=person(currentTeam,appContext=majorLeague)\n 2. Most Recent Minor League Team: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(currentTeam,appContext=minorLeague)\n \n - Notes on Stat Hydrations\n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"]). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\"). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[seasonAdvanced,season],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\").\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[career],sportId=13)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,season],sportId=13)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB individual stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=\"year\").\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[career],sportId=13,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,season],sportId=13,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\"). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[vsPlayer],opposingPlayerId=547973,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n Best practice for limiting playLog & pitchLog, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[playLog],limit=1,year=2017)%3A%29\n \n 2. Limiting pitchLog: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[pitching],type=[pitchLog],limit=1,year=2017)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for metrics in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[metricAverages],metrics=[launchSpeed],season=\"year\") or stats(type=[metricLog],metrics=[launchSpeed],season=\"year\") . \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[metricAverages],metrics=[launchSpinRate],season=2018)%3A%29\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byMonth,metricAverages],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n \n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[metricLog],metrics=[launchSpinRate],season=2018)%3A%29\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byMonth,metricLog],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n\n Best practice for MLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],season=\"year\"). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting],type=[career,statSplits],sitCodes=[a],season=2018)%3A%29\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n\n Best practice for MiLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],sportId = \"MiLB Id\",season=\"year\"). \n \n 1. Hydrating on sitCode: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a],sportId=13,season=2018)%3A%29\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/people/freeAgents?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=13,season=2018)%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "fields", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/FreeAgentListRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/people/{personId}": { "get": { "tags": [ "person" ], "operationId": "person", "summary": "View one person's stats and biographical information.", "description": "**Description:**\n This endpoint returns statistical data and biographical information for a player,coach or umpire based on playerId.\n \n **Return Includes:** personId, DOB, statistics for players based on statType.\n \n **Required Parameters:** personIds is required to run this call.\n \n \n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/people/605151\n \n ---\n **Example of call with hydration parameters**\n \n http://statsapi.mlb.com/api/v1/people/605151?hydrate=education,stats(type=byMonth,season=2018),hydrations \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert personId to return biographical information for a specific player.\n1. Insert personId: https://statsapi.mlb.com/api/v1/people/605151\n\n **List of players by sport can be found at the <a href=\"http://statsapi.mlb.com/docs/#operation/sportPlayers\">sportPlayers</a> endpoint.** \n", "name": "personId", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert hydration(s) to return statistical or biographical data for a specific player(s). Format 'education,stats(type=byMonth,season=2018)'\n1. One Hydration: https://statsapi.mlb.com/api/v1/people/592450?season=2018&hydrate=education\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/people/592450?season=2018&hydrate=stats(type=byMonth,season=2018),education\n3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/people/592450?season=2018&hydrate=hydrations\n\n - Available Hydrations:\n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n \n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/people/605151?appContext=majorLeague&hydrate=currentTeam\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/people/605151?appContext=minorLeague&hydrate=currentTeam\n \n- Notes on Stat Hydrations\n \n Best practice for MLB stat hydrations, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"]). \n\n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting],type=[career])\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting,pitching],type=[career,yearByYear])\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual season stat hydrations, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\"). \n\n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people/605151?&hydrate=stats(group=[hitting],type=[season],season=2018)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting,pitching],type=[seasonAdvanced,season],season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\").\n \n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people/663898?hydrate=stats(group=[hitting],type=[career],sportId=12)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people/663898?season=2018&hydrate=stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12),education\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB individual season stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=\"year\").\n \n 1. Hydrating one statType/statGroup: https://statsapi.mlb.com/api/v1/people/663898?hydrate=stats(group=[hitting],type=[season],sportId=12,season=2018)\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/people/663898?hydrate=stats(group=[hitting,pitching],type=[seasonAdvanced,season],sportId=12,season=2018),education\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: https://statsapi.mlb.com/api/v1/people/592450?hydrate=stats(group=[hitting],type=[playLog],limit=1,season=2017)\n \n 2. Limiting pitchLog: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[pitching],type=[pitchLog],limit=1,season=2017)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"],startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\"). \n\n 1. Hydrating byDateRange stat: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[pitching],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n Best practice for metrics in stat hydrations, use stats(group=[\"statGroup1,statGroup2\"],type=[metricAverages],metrics=[launchSpeed],season=\"year\") or stats(type=[metricLog],metrics=[launchSpeed],season=\"year\"). \n \n 1. Hydrating one metric with metricAverages: https://statsapi.mlb.com/api/v1/people/592450?hydrate=stats(group=[hitting],type=[metricAverages],metrics=[launchSpinRate],season=2018)\n 2. Hydrating one statType and multiple metrics with metricAverages: https://statsapi.mlb.com/api/v1/people/592450?hydrate=stats(group=[hitting,pitching],type=[byMonth,metricAverages],metrics=[launchSpeed,launchSpinRate],season=2018)\n \n 3. Hydrating one metric with metricLog: https://statsapi.mlb.com/api/v1/people/592450?hydrate=stats(group=[hitting],type=[metricLog],metrics=[launchSpinRate],season=2018)\n 4. Hydrating one statType and multiple metrics with metricLog: https://statsapi.mlb.com/api/v1/people/592450?hydrate=stats(group=[hitting,pitching],type=[byMonth,metricLog],metrics=[launchSpeed,launchSpinRate],season=2018)\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n\n Best practice for MLB sitCodes in stat hydrations, use stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],season=\"year\"). \n \n 1. Hydrating one sitCode: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting],type=[career,statSplits],sitCodes=[a],season=2018)\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/people/605151?hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n\n Best practice for MiLB sitCodes in stat hydrations, use stats(group=[\"statGroup\"],type=[statSplits],sitCodes=[h,a],sportId = \"MiLB Id\",season=\"year\"). \n \n 1. Hydrating on sitCode: https://statsapi.mlb.com/api/v1/people/663898?hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a],sportId=12,season=2018)\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/people/663898?hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=12,season=2018)\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/people/605151?fields=people,id,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PeopleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/people/{personId}/stats/game/{gamePk}": { "get": { "tags": [ "person" ], "operationId": "PersonGameStats", "summary": "View a player's stats for a specific game.", "description": "Insert personId and gamePk to view stats for individual player based on a specific game.\n\n**Description:**\nThis endpoint returns gameLog statistics based on gamePk and playerId.\n \n**Return Includes:** Fielding, Hitting, & Pitching gameLog Statistics.\n \n**Required Parameters:** gamePk and personId are required to run this call.\n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/people/605151/stats/game/531368 \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert personId.\n1. Insert personId: http://statsapi.mlb.com/api/v1/people/605151/stats/game/531368 \n\n **List of players by sport can be found at the <a href=\"http://statsapi.mlb.com/docs/#operation/sportPlayers\">sportPlayers</a> endpoint.** \n", "name": "personId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "path", "description": "Insert gamePk to return gameLog statistics for a specific player in a specific game and to complete the call.\n1. Insert gamePk: http://statsapi.mlb.com/api/v1/people/605151/stats/game/531368 \n", "name": "gamePk", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/people/605151/stats/game/531368?fields=stats,splits,stat,type,group\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/people/{personId}/stats/game/current": { "get": { "tags": [ "person" ], "operationId": "currentGameStats", "summary": "View a player's stats for the current game.", "description": "\n\n**Description:**\nInsert personId and gamePk to view stats for individual player based on playerId and a current game.\n \n**Return Includes:** Fielding, Hitting, & Pitching gameLog Statistics.\n \n**Required Parameters:** playerId are required to run this call.\n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/people/592518/stats/game/current \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert personId to return gameLog statstistics for a player in a game currently being played.\n1. Insert personId: http://statsapi.mlb.com/api/v1/people/592518/stats/game/current\n\n **List of players by sport can be found at the <a href=\"http://statsapi.mlb.com/docs/#operation/sportPlayers\">sportPlayers</a> endpoint.** \n", "name": "personId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/people/592178/stats/game/current?fields=stats,splits,stat,type,group\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobs": { "get": { "tags": [ "jobs" ], "operationId": "Anyjob", "summary": "View directory by jobType.", "description": "\n\n**Description:**\nThis endpoint returns a directory of persons for a particular job type on the Stats API.\n \n**Return Includes:** personId,uniform number, and jobId.\n \n**Required Parameters:** No parameters are required to run this call.\n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/jobs?jobType=COAT\n \n **Example of call with all parameters**\n \n http://statsapi.mlb.com/api/v1/jobs?jobType=COAT&sportId=1 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert jobType to return information for a given jobType.\n1. One jobType: http://statsapi.mlb.com/api/v1/jobs?jobType=COAT\n\nFor a list of all jobTypes: https://statsapi.mlb.com/api/v1/jobTypes \n", "name": "jobType", "required": true, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert sportId to return information for a given jobType in a specific sport.\n1. One sportId: http://statsapi.mlb.com/api/v1/jobs?jobType=COAT&sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert date to return information for jobs on a particular date. Format:\n MM/DD/YYYY\n1. Insert date: https://statsapi.mlb.com/api/v1/jobs?jobType=COAT&date=09/10/2011\n", "name": "date", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/jobs/?jobType=COAT&sportId=1&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobs/umpires": { "get": { "tags": [ "jobs" ], "operationId": "umpires", "summary": "View umpire directory.", "description": "\n\n**Description:**\nThis endpoint returns a directory of umpires.\n \n**Return Includes:** personId,uniform number, and jobId.\n \n**Required Parameters:** No parameters are required to run this call.\n\n ---\n **Example of call with all parameters**\n \n https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert sportId to return information for umpires in a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert date to return information for umpires on a particular date. Format:\n MM/DD/YYYY\n1. Insert date: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1&date=09/10/2011\n", "name": "date", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1&date=09/10/2011&hydrate=person(education)\n 2. Multiple Hydrations Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1&date=09/10/2011&hydrate=person(education,xrefId)\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobs/datacasters": { "get": { "tags": [ "jobs" ], "operationId": "datacasters", "summary": "View datacasters directory.", "description": "\n\n**Description:**\nThis endpoint returns a directory of datacasters.\n \n**Return Includes:** personId and jobId.\n \n**Required Parameters:** No parameters are required to run this call.\n\n ---\n **Example of call with all parameters**\n \n https://statsapi.mlb.com/api/v1/jobs/datacasters \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert sportId to return information for datacasters in a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/jobs/datacasters?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert date to return information for datacasters on a particular date. Format:\n MM/DD/YYYY\n1. Insert date: https://statsapi.mlb.com/api/v1/jobs/datacasters?date=09/10/2011\n", "name": "date", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/datacasters?sportId=1&date=09/10/2011&hydrate=person(education)\n 2. Multiple Hydrations Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/datacasters?sportId=1&date=09/10/2011&hydrate=person(education,xrefId)\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/jobs/datacasters?sportId=1&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobs/officialScorers": { "get": { "tags": [ "jobs" ], "operationId": "officialScorers", "summary": "View official scorer directory.", "description": "\n\n**Description:**\nThis endpoint returns a directory of officialScorers.\n \n**Return Includes:** personId and jobId.\n \n**Required Parameters:** No parameters are required to run this call.\n\n ---\n **Example of call with all parameters**\n \n https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert sportId to return information for officialScorers in a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert date to return information for officialScorers on a particular date. Format:\n MM/DD/YYYY\n1. Insert date: https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1&date=09/10/2011\n", "name": "date", "required": false, "schema": { "type": "string", "uniqueItems": false } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1&date=09/10/2011&hydrate=person(education)\n 2. Multiple Hydrations Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1&date=09/10/2011&hydrate=person(education,xrefId)\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/jobs/officialScorers?sportId=1&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/jobs/umpires/games/{umpireId}": { "get": { "tags": [ "jobs" ], "operationId": "umpiregames", "summary": "Get umpires and associated game for umpireId.", "description": "This endpoint allows you to pull teams", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert umpireId to return biographical games for a specific umpire in a given season. \n1. One umpireId: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018\n\n **For a list of umpires by sport: https://statsapi.mlb.com/api/v1/jobs/umpires?sportId=1** \n", "name": "umpireId", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert year to return games for a specific umpire in a given season.\n 1. Insert year: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available schedule hydration. The hydrations for schedule contain \"venue\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\"\n1. One Hydration: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=linescore\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=linescore,officials\n3. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018&hydrate=team(social)\n4. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018&hydrate=team(social,league)\n5. One Hydration Using Venue Sub Hydration: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018&hydrate=venue(location) \n6. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018&hydrate=hydrations\n\n - Available Hydrations:\n 1. tickets\n 2. game(content)\n 3. game(content(all))\n 4. game(content(media(all)))\n 5. game(content(editorial(all)))\n 6. game(content(highlights(all)))\n 7. game(content(editorial(preview)))\n 8. game(content(editorial(recap)))\n 9. game(content(editorial(articles)))\n 10. game(content(editorial(wrap)))\n 11. game(content(media(epg)))\n 12. game(content(media(milestones)))\n 13. game(content(highlights(scoreboard)))\n 14. game(content(highlights(scoreboardPreview)))\n 15. game(content(highlights(highlights)))\n 16. game(content(highlights(gamecenter)))\n 17. game(content(highlights(milestone)))\n 18. game(content(highlights(live)))\n 19. game(content(media(featured)))\n 20. game(content(summary))\n 21. game(content(gamenotes))\n 22. game(tickets)\n 23. game(atBatTickets)\n 24. game(promotions)\n 25. game(atBatPromotions)\n 26. game(sponsorships)\n 27. linescore\n 27. linescore(matchup)\n 27. linescore(runners)\n 27. linescore(defense)\n 28. decisions\n 29. scoringplays\n 30. broadcasts\n 31. broadcasts(all)\n 32. radioBroadcasts\n 33. metadata\n 34. game(seriesSummary)\n 35. seriesStatus\n 36. event(performers)\n 37. event(promotions)\n 38. event(timezone)\n 39. event(tickets)\n 40. event(venue)\n 41. event(designations)\n 42. event(game)\n 43. event(status)\n 44. weather\n 45. officials\n\n 46. venue\n - Hydrations Available Through Venue \n 1. relatedVenues\n 2. parentVenues\n 3. residentVenues\n 4. relatedVenues(venue)\n 5. parentVenues(venue)\n 6. residentVenues(venue)\n 7. location\n 8. social\n 9. relatedApplications\n 10. timezone\n 11. menu\n 12. metadata\n 13. performers\n 14. images\n 15. schedule\n 16. nextSchedule\n 17. previousSchedule \n 18. ticketManagement\n 19. xrefId\n \n 47. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref \n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/jobs/umpires/games/596809?season=2018&fields=dates,date,games,gamePk,gameDate\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_ScheduleRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/schedule/": { "get": { "tags": [ "schedule" ], "operationId": "schedule", "summary": "View schedule info based on scheduleType.", "description": "**Description:**\n This endpoint returns all schedules based on a particular scheduleType.\n \n **Return Includes:** Game and event data.\n \n **Required Parameters:** sportId or gamePk(s) are required to run this call\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n \n ---\n **Example of call with required parameters**\n 1. https://statsapi.mlb.com/api/v1/schedule?sportId=1 \n 2. https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262\n\n **If no gamePk or startDate/endDate are given then call will populate for current date**\n\n ---\n **Example of call with hydration parameters**\n https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=linescore\n", "deprecated": false, "parameters": [ { "in": "query", "description": "There are three different scheduleTypes: \n 1. games - games schedule\n 2. events - non game events, like a ballpark tour, fireworks show, or a concert\n 3. xref - pulls in games that are cross-referenced but don't belong to a team normally, ie. All-Star Game\n\nInsert one or mutliple of the three available scheduleTypes to return data for a particular schedule. Format \"games,events,xref\"\n1. Calling games scheduleType: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&scheduleTypes=games\n2. Multiple scheduleTypes: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&scheduleTypes=events,xref,games\n", "name": "scheduleType", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "There are two different schedule eventTypes: \n 1. primary- returns calendar/schedule pages.\n 2. secondary returns ticket pages.\n\nInsert one or mutliple of the three available eventTypes to return data for a particular schedule. Format \"primary,secondary\"\n1. Calling primary eventTypes: https://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2018-04-01&endDate=2018-07-3&eventTypes=primary&scheduleTypes=events\n2. Multiple eventTypes: https://statsapi.mlb.com/api/v1/schedule?sportId=1&startDate=2018-04-01&endDate=2018-07-3&eventTypes=primary,secondary&scheduleTypes=events\n", "name": "eventTypes", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available schedule hydration. The hydrations for schedule contain \"venue\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\"\n1. One Hydration: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=linescore\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=linescore,officials\n3. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=team(social)\n4. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=team(social,league)\n5. One Hydration Using Venue Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=venue(location) \n6. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gamePk=534262&hydrate=hydrations\n\n - Available Hydrations:\n 1. tickets\n 2. game(content)\n 3. game(content(all))\n 4. game(content(media(all)))\n 5. game(content(editorial(all)))\n 6. game(content(highlights(all)))\n 7. game(content(editorial(preview)))\n 8. game(content(editorial(recap)))\n 9. game(content(editorial(articles)))\n 10. game(content(editorial(wrap)))\n 11. game(content(media(epg)))\n 12. game(content(media(milestones)))\n 13. game(content(highlights(scoreboard)))\n 14. game(content(highlights(scoreboardPreview)))\n 15. game(content(highlights(highlights)))\n 16. game(content(highlights(gamecenter)))\n 17. game(content(highlights(milestone)))\n 18. game(content(highlights(live)))\n 19. game(content(media(featured)))\n 20. game(content(summary))\n 21. game(content(gamenotes))\n 22. game(tickets)\n 23. game(atBatTickets)\n 24. game(promotions)\n 25. game(atBatPromotions)\n 26. game(sponsorships)\n 26. lineup\n 27. linescore\n 27. linescore(matchup)\n 27. linescore(runners)\n 27. linescore(defense)\n 28. decisions\n 29. scoringplays\n 30. broadcasts\n 31. broadcasts(all)\n 32. radioBroadcasts\n 33. metadata\n 34. game(seriesSummary)\n 35. seriesStatus\n 36. event(performers)\n 37. event(promotions)\n 38. event(timezone)\n 39. event(tickets)\n 40. event(venue)\n 41. event(designations)\n 42. event(game)\n 43. event(status)\n 44. weather\n 45. officials\n 46. probablePitcher\n \n 47. venue\n - Hydrations Available Through Venue \n 1. relatedVenues\n 2. parentVenues\n 3. residentVenues\n 4. relatedVenues(venue)\n 5. parentVenues(venue)\n 6. residentVenues(venue)\n 7. location\n 8. social\n 9. relatedApplications\n 10. timezone\n 11. menu\n 12. metadata\n 13. performers\n 14. images\n 15. schedule\n 16. nextSchedule\n 17. previousSchedule \n 18. ticketManagement\n 19. xrefId\n \n 48. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref \n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "\nInsert teamId to return all schedules based on a particular scheduleType for a specific team.\n1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&teamId=118\n\nFor a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": false, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "\nInsert leagueId to return all schedules based on a particular scheduleType for a specific league.\n1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&leagueId=103\n\nFor a list of all leagueIds: https://statsapi.mlb.com/api/v1/league?sportId=1\n", "name": "leagueId", "required": false, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "\nInsert sportId to return all schedules based on a particular scheduleType for a specific sport.\n1. Insert sportId: https://statsapi.mlb.com/api/v1/schedule/?sportId=1\n2. Insert multiple sportIds: https://statsapi.mlb.com/api/v1/schedule/?sportId=1,11\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": true, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "\nInsert gamePks to return all schedules based on a particular scheduleType for specific games.\n1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/?gamePk=531493\n2. Insert multiple teamIds: https://statsapi.mlb.com/api/v1/schedule/?gamePks=531493,531497\n", "name": "gamePks", "required": true, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": false } }, { "in": "query", "description": "Insert venueId to return all schedules based on a particular scheduleType for a specific venueId.\n 1. Insert venueId: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&venueIds=10\n \n For a list of all venueId: https://statsapi.mlb.com/api/v1/teams\n", "name": "venueIds", "required": false, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Insert gameTypes to return schedule information for all games in particular gameTypes.\n 1. One gameTypes: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gameTypes=W&season=2017&startDate=10/01/2017&endDate=10/31/2017\n 2. Multiple gameTypes: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gameTypes=D,W&season=2017&startDate=10/01/2017&endDate=10/31/2017\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameTypes", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert date to return schedule information for all games or events in on a particular date. Format:\n MM/DD/YYYY\n 1. Insert date: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&date=07/17/2018\n \n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return schedule information for all games or events in a particular date range. Format:\n MM/DD/YYYY\n \n**startDate must be coupled with endDate**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gameTypes=D,W&season=2017&startDate=10/01/2017&endDate=10/31/2017\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return schedule information for all games or events in a particular date range. Format:\n MM/DD/YYYY\n \n**endDate must be coupled with startDate**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&gameTypes=D,W&season=2017&startDate=10/01/2017&endDate=10/31/2017\n", "name": "endDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert opponentId to return schedule information for all games between two opponents\n\n**Works best with date range and teamId**\n \n\n 1. Insert opponentId: https://statsapi.mlb.com/api/v1/schedule/?sportId=1&teamId=147&opponentId=133&startDate=04/04/2018&endDate=09/27/2018&hydrate=linescore\n", "name": "opponentId", "required": false, "schema": { "items": { "type": "integer", "format": "int32" }, "uniqueItems": true } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/schedule?sportId=1&fields=dates,date,games,link\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ScheduleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/schedule/games/tied": { "get": { "tags": [ "schedule" ], "operationId": "tieGames", "summary": "View tied game schedule info.", "description": "**Description:**\n This endpoint returns tied game schedules for a given year.\n \n **Return Includes:** Team information, date of play and game status.\n \n **Required Parameters:** season is required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016\n \n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=linescore \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert gameType to return schedule information for all tied games in a particular gameType.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/schedule/games/tied?gameTypes=R&season=2016\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameTypes", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert year to return schedule information for tied games in a season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available schedule hydration. The hydrations for schedule contain \"venue\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n1. One Hydration: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=linescore\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=linescore,officials\n3. Team Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=linescore,team(social)\n4. Venue Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=linescore,team(social),venue(location)\n5. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/schedule/games/tied?season=2016&hydrate=hydrations\n\n - Available Hydrations:\n 1. tickets\n 2. game(content)\n 3. game(content(all))\n 4. game(content(media(all)))\n 5. game(content(editorial(all)))\n 6. game(content(highlights(all)))\n 7. game(content(editorial(preview)))\n 8. game(content(editorial(recap)))\n 9. game(content(editorial(articles)))\n 10. game(content(editorial(wrap)))\n 11. game(content(media(epg)))\n 12. game(content(media(milestones)))\n 13. game(content(highlights(scoreboard)))\n 14. game(content(highlights(scoreboardPreview)))\n 15. game(content(highlights(highlights)))\n 16. game(content(highlights(gamecenter)))\n 17. game(content(highlights(milestone)))\n 18. game(content(highlights(live)))\n 19. game(content(media(featured)))\n 20. game(content(summary))\n 21. game(content(gamenotes))\n 22. game(tickets)\n 23. game(atBatTickets)\n 24. game(promotions)\n 25. game(atBatPromotions)\n 26. game(sponsorships)\n 26. lineup\n 27. linescore\n 27. linescore(matchup)\n 27. linescore(runners)\n 27. linescore(defense) \n 28. decisions\n 29. scoringplays\n 30. broadcasts\n 31. broadcasts(all)\n 32. radioBroadcasts\n 33. metadata\n 34. game(seriesSummary)\n 35. seriesStatus\n 36. event(performers)\n 37. event(promotions)\n 38. event(timezone)\n 39. event(tickets)\n 40. event(venue)\n 41. event(designations)\n 42. event(game)\n 43. event(status)\n 44. weather\n 45. officials\n 46. probablePitcher\n \n 47. venue\n - Hydrations Available Through Venue \n 1. relatedVenues\n 2. parentVenues\n 3. residentVenues\n 4. relatedVenues(venue)\n 5. parentVenues(venue)\n 6. residentVenues(venue)\n 7. location\n 8. social\n 9. relatedApplications\n 10. timezone\n 11. menu\n 12. metadata\n 13. performers\n 14. images\n 15. schedule\n 16. nextSchedule\n 17. previousSchedule \n 18. ticketManagement\n 19. xrefId \n \n 48. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/schedule/games/tied?gameTypes=R&season=2016&fields=dates,date\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ScheduleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/schedule/postseason": { "get": { "tags": [ "schedule" ], "operationId": "postseasonSchedule", "summary": "View postseason schedule info.", "description": "**Description:**\n This endpoint returns postseason schedules for a given year.\n \n **Return Includes:** Team information, date of play and game status.\n \n **Required Parameters:** There are no required parameters to run this call. Blank call (https://statsapi.mlb.com/api/v1/schedule/postseason) will return current year's postseason schedule\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/schedule/postseason?hydrate=hydrations,linescore&season=2017 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert gameType to return schedule information for all tied games in a particular gameType.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/schedule/postseason?gameTypes=W&season=2017\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameTypes", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert seriesNumber to return schedule information for all postseason games in a round's particular series.\n 1. Insert seriesNumber: https://statsapi.mlb.com/api/v1/schedule/postseason?seriesNumber=4&season=2017\n \n **Each round of the postseason has seriesNumber. Ie. seriesNumber 4 will show all games from the Cubs & Nationals NLDS becuase it was the 4th match up of teams in the Division Series**\n", "name": "seriesNumber", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert teamId to return schedule information for all postseason games for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2017&teamId=112\n \n For a list of all teamIds: ttps://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": false, "schema": { "type": "integer" } }, { "in": "query", "description": "Insert a sportId to return schedule information for all postseason games for a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/schedule/postseason?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return schedule information for postseason games for a given year. \n 1. Insert year: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2017\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available schedule hydration. The hydrations for schedule contain \"venue\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2016&hydrate=linescore\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2016&hydrate=linescore,officials\n 3. Team Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2016&hydrate=linescore,team(social)\n 4. Venue Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2016&hydrate=linescore,team(social),venue(location)\n 5. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/schedule/postseason?season=2016&hydrate=hydrations\n \n - Available Hydrations:\n 1. tickets\n 2. game(content)\n 3. game(content(all))\n 4. game(content(media(all)))\n 5. game(content(editorial(all)))\n 6. game(content(highlights(all)))\n 7. game(content(editorial(preview)))\n 8. game(content(editorial(recap)))\n 9. game(content(editorial(articles)))\n 10. game(content(editorial(wrap)))\n 11. game(content(media(epg)))\n 12. game(content(media(milestones)))\n 13. game(content(highlights(scoreboard)))\n 14. game(content(highlights(scoreboardPreview)))\n 15. game(content(highlights(highlights)))\n 16. game(content(highlights(gamecenter)))\n 17. game(content(highlights(milestone)))\n 18. game(content(highlights(live)))\n 19. game(content(media(featured)))\n 20. game(content(summary))\n 21. game(content(gamenotes))\n 22. game(tickets)\n 23. game(atBatTickets)\n 24. game(promotions)\n 25. game(atBatPromotions)\n 26. game(sponsorships)\n 26. lineup\n 27. linescore\n 27. linescore(matchup)\n 27. linescore(runners)\n 27. linescore(defense) \n 28. decisions\n 29. scoringplays\n 30. broadcasts\n 31. broadcasts(all)\n 32. radioBroadcasts\n 33. metadata\n 34. game(seriesSummary)\n 35. seriesStatus\n 36. event(performers)\n 37. event(promotions)\n 38. event(timezone)\n 39. event(tickets)\n 40. event(venue)\n 41. event(designations)\n 42. event(game)\n 43. event(status)\n 44. weather\n 45. officials\n 46. probablePitcher\n \n 47. venue\n - Hydrations Available Through Venue \n 1. relatedVenues\n 2. parentVenues\n 3. residentVenues\n 4. relatedVenues(venue)\n 5. parentVenues(venue)\n 6. residentVenues(venue)\n 7. location\n 8. social\n 9. relatedApplications\n 10. timezone\n 11. menu\n 12. metadata\n 13. performers\n 14. images\n 15. schedule\n 16. nextSchedule\n 17. previousSchedule \n 18. ticketManagement\n 19. xrefId \n \n 48. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/schedule/postseason?fields=dates,date,games,gamePk\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ] }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ScheduleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } }, "/v1/schedule/postseason/series": { "get": { "tags": [ "schedule" ], "operationId": "postseasonScheduleSeries", "summary": "View schedule info for postseason based on series.", "description": "**Description:**\n This endpoint returns postseason schedules for a given year broken down by series.\n \n **Return Includes:** Team information, date of play and game status.\n \n **Required Parameters:** There are no required parameters to run this call. Blank call (https://statsapi.mlb.com/api/v1/schedule/postseason/series) will return current year's postseason schedule broken down by series. \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert gameType to return schedule information for all tied games in a particular gameType.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/schedule/games/tied?gameTypes=R&season=2016\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameTypes", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert seriesNumber to return schedule information for all postseason games in a round's particular series.\n 1. Insert seriesNumber: https://statsapi.mlb.com/api/v1/schedule/postseason/series?seriesNumber=4&season=2017\n \n **Each round of the postseason has seriesNumber. Ie. seriesNumber 4 will show all games from the Cubs & Nationals NLDS becuase it was the 4th match up of teams in the Division Series**\n", "name": "seriesNumber", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert teamId to return schedule information for all postseason games for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/postseason/series?season=2017&teamId=112\n \n For a list of all teamIds: ttps://statsapi.mlb.com/api/v1/teams?\n", "name": "teamId", "required": false, "schema": { "type": "integer" } }, { "in": "query", "description": "Insert a sportId to return schedule information for all postseason games for a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/schedule/postseason/series?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return schedule information for postseason games for a given year broken down by series. \n 1. Insert year: https://statsapi.mlb.com/api/v1/schedule/postseason/series?season=2017\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/schedule/postseason/series?season=2018&fields=series,series,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PostseasonScheduleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/schedule/postseason/tuneIn": { "get": { "tags": [ "schedule" ], "operationId": "tuneIn", "summary": "View schedule info for the tuneIn application.", "description": "**Description:**\n This endpoint returns postseason schedules for the tuneIn application.\n \n **Return Includes:** Total Number of games and games in progress.\n \n **Required Parameters:** There are no required parameters to run this call. Blank call (https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn) will return current year's postseason tuneIn schedule\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/schedule/postseason?hydrate=hydrations,linescore&season=2017 \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert teamId to return schedule information for all postseason games for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2017&teamId=112\n \n For a list of all teamIds: ttps://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": false, "schema": { "type": "integer" } }, { "in": "query", "description": "Insert a sportId to return schedule information for all postseason games for a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return schedule information for postseason games for a given year broken down by series. \n 1. Insert year: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2017\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available schedule hydration. The hydrations for schedule contain \"venue\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \" \n1. One Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2016&hydrate=linescore\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2016&hydrate=linescore,officials\n3. Team Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2016&hydrate=linescore,team(social)\n4. Venue Sub Hydration: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2016&hydrate=linescore,team(social),venue(location)\n5. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/schedule/postseason/tuneIn?season=2016&hydrate=hydrations\n \n - Available Hydrations:\n 1. tickets\n 2. game(content)\n 3. game(content(all))\n 4. game(content(media(all)))\n 5. game(content(editorial(all)))\n 6. game(content(highlights(all)))\n 7. game(content(editorial(preview)))\n 8. game(content(editorial(recap)))\n 9. game(content(editorial(articles)))\n 10. game(content(editorial(wrap)))\n 11. game(content(media(epg)))\n 12. game(content(media(milestones)))\n 13. game(content(highlights(scoreboard)))\n 14. game(content(highlights(scoreboardPreview)))\n 15. game(content(highlights(highlights)))\n 16. game(content(highlights(gamecenter)))\n 17. game(content(highlights(milestone)))\n 18. game(content(highlights(live)))\n 19. game(content(media(featured)))\n 20. game(content(summary))\n 21. game(content(gamenotes))\n 22. game(tickets)\n 23. game(atBatTickets)\n 24. game(promotions)\n 25. game(atBatPromotions)\n 26. game(sponsorships)\n 26. lineup\n 27. linescore\n 27. linescore(matchup)\n 27. linescore(runners)\n 27. linescore(defense) \n 28. decisions\n 29. scoringplays\n 30. broadcasts\n 31. broadcasts(all)\n 32. radioBroadcasts\n 33. metadata\n 34. game(seriesSummary)\n 35. seriesStatus\n 36. event(performers)\n 37. event(promotions)\n 38. event(timezone)\n 39. event(tickets)\n 40. event(venue)\n 41. event(designations)\n 42. event(game)\n 43. event(status)\n 44. weather\n 45. officials\n 46. probablePitcher\n \n 47. venue\n - Hydrations Available Through Venue \n 1. relatedVenues\n 2. parentVenues\n 3. residentVenues\n 4. relatedVenues(venue)\n 5. parentVenues(venue)\n 6. residentVenues(venue)\n 7. location\n 8. social\n 9. relatedApplications\n 10. timezone\n 11. menu\n 12. metadata\n 13. performers\n 14. images\n 15. schedule\n 16. nextSchedule\n 17. previousSchedule \n 18. ticketManagement\n 19. xrefId \n \n 48. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExmaple: \n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/ScheduleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/seasons": { "get": { "tags": [ "season" ], "operationId": "seasons", "summary": "View current season info.", "description": "**Description:**\n This endpoint returns season information for the current year.\n \n **Return Includes:** Spring Training,Regular Season, Postseason start dates and end dates\n \n **Required Parameters:** sportId is required to run this call.\n \n ---\n\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/seasons?sportId=1\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a sportId to return season information for the current year for a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/seasons?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a withGameTypeDates to return season information for all gameTypes.\n 1. Insert withGameTypeDates: http://statsapi.mlb.com/api/v1/seasons?season=2019&sportId=1&withGameTypeDates=true\n", "name": "withGameTypeDates", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/seasons?sportId=1&fields=seasons,seasonStartDate,seasonEndDate\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/SeasonsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/seasons/all": { "get": { "tags": [ "season" ], "operationId": "allSeasons", "summary": "View information for all seasons based on id.", "description": "**Description:**\n This endpoint returns season information for all seasons based on id.\n \n **Return Includes:** Regular Season, Postseason start dates and end dates\n \n **Required Parameters:** sportId is required to run this call.\n \n ---\n\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/seasons/all?sportId=1\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert divisionId to return a directory of seasons for a specific division.\n1. One divisionId: https://statsapi.mlb.com/api/v1/seasons/all?divisionId=200\n\nFor a list of all divisionIds: https://statsapi.mlb.com/api/v1/divisions\n", "name": "divisionId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert leagueId to return a directory of seasons in a specific league.\n1. One leagueId: https://statsapi.mlb.com/api/v1/seasons/all?leagueId=103\n\nFor a list of all leagueIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "leagueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a withGameTypeDates to return season information for all gameTypes.\n 1. Insert withGameTypeDates: https://statsapi.mlb.com/api/v1/seasons/all?sportId=1&withGameTypeDates=true\n", "name": "withGameTypeDates", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a sportId to return a directory of seasons for a specific sport.\n1. One sportId: https://statsapi.mlb.com/api/v1/seasons/all?sportId=1\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/seasons/all?sportId=1&fields=seasons,seasonStartDate,seasonEndDate\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/SeasonsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/seasons/{seasonId}": { "get": { "tags": [ "season" ], "operationId": "seasonId", "summary": "View information on an individual season.", "description": "**Description:**\nThis endpoint returns season information for the current year.\n\n**Return Includes:** Spring Training,Regular Season, Postseason start dates and end dates\n\n**Required Parameters:** sportId and seasonId are required to run this call.\n\n---\n\n**Example of call with required parameters**\n\n https://statsapi.mlb.com/api/v1/seasons/2017?sportId=1\n \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert year to return season information for a particular season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/seasons/2017?sportId=1\n", "name": "seasonId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return season information for the current year for a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/seasons/2017?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a withGameTypeDates to return season information for all gameTypes.\n 1. Insert withGameTypeDates: https://statsapi.mlb.com/api/v1/seasons/2017?sportId=1&withGameTypeDates=true\n", "name": "withGameTypeDates", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/seasons/2017?sportId=1&fields=seasons,regularSeasonStartDate,regularSeasonEndDate\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/SeasonsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/sports": { "get": { "tags": [ "sports" ], "operationId": "sports", "summary": "View information for all sportIds.", "description": "**Description:**\n This endpoint returns information for all sports available via the Stats API\n \n **Return Includes:** SportId and sport name. \n \n **Required Parameters:** No parameters are required to run this call.\n \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a sportId to return a directory of sport(s).\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/sports?sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/sports?sportId=1&fields=sports,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/SportsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/sports/{sportId}": { "get": { "tags": [ "sports" ], "operationId": "sportId", "summary": "View information for any given sportId.", "description": "**Description:**\n This endpoint returns information for a sports available via the Stats API\n \n **Return Includes:** SportId and sport name. \n \n **Required Parameters:** sportId is required to run this call.\n \n ---\n\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/sports/1 \n \n \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert a sportId to return a directory of sport(s).\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/sports/1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/sports/1?fields=sports,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/SportsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/sports/{sportId}/players": { "get": { "tags": [ "sports" ], "operationId": "sportPlayers", "summary": "View information on a players for a given sportId.", "description": "**Description:**\n This endpoint returns player information for all players in a given sport.\n \n **Return Includes:** Biographical information and strikezone size.\n \n **Required Parameters:** sportId and season are required to run this call.\n \n ---\n\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/sports/1/players?season=2018 \n \n \n ---\n\n **Example of call with all parameters**\n \n https://statsapi.mlb.com/api/v1/sports/1/players?season=2017&gameType=W \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert a sportId to return player information for a particular sport.\n 1. Insert sportId: http://statsapi.mlb.com/api/v1/sports/1/players\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return player information for a particular season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/sports/1/players?season=2017\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert gameType to return player information for a particular gameType. \n 1. Insert gameType: https://statsapi.mlb.com/api/v1/sports/1/players?season=2017&gameType=W \n \nFind available game types at https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PeopleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/standings": { "get": { "tags": [ "standings" ], "operationId": "standings", "summary": "View standings for a league.", "description": "**Description:**\n This endpoint returns standings information for a given league.\n \n **Return Includes:** Team and standing information.\n \n **Required Parameters:** leagueId and season are required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n ---\n\n **Example of call with required parameters** \n \n https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018\n \n **Call defaults to regularSeason standings**\n \n ---\n\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=wildCard,regularSeason&hydrate=team(league) \n", "deprecated": false, "parameters": [ { "in": "query", "description": "\nInsert leagueId to return all standings based on a particular standingType for a specific league.\n1. Insert leagueId: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=regularSeason\n\nFor a list of all leagueIds: https://statsapi.mlb.com/api/v1/league?sportId=1 \n", "name": "leagueId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert year to return all standings based on a particular year.\n1. Insert year: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=regularSeason\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert standingType to return all standings based on a particular year.\n1. One standingType: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=regularSeason\n2. Multiple standingType: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=regularSeason,wildCard\n\n **Description of all standingTypes**\n 1. regularSeason - Regular Season Standings\n 2. wildCard - Wild card standings\n 3. divisionLeaders - Division Leader standings\n 4. wildCardWithLeaders - Wild card standings with Division Leaders\n 5. firstHalf - First half standings. Only valid for leagues with a split season (Mexican League).\n 6. secondHalf - Second half standings. Only valid for leagues with a split season (Mexican League).\n 7. springTraining - Spring Training Standings\n 8. postseason - Postseason Standings\n 9. byDivision - Standings by Division\n 10. byConference - Standings by Conference\n 11. byLeague - Standings by League\n\n\n**Find standingTypes at https://statsapi.mlb.com/api/v1/standingsTypes**\n", "name": "standingsTypes", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return standing information for on a particular date. Format: MM/DD/YYYY\n 1. Insert date: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=regularSeason&date=08/07/2018\n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available standings hydration. Format \"team,league\"\n1. One Hydration: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=wildCard,regularSeason&hydrate=league\n2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=wildCard,regularSeason&hydrate=league,sport\n3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=wildCard,regularSeason&hydrate=hydrations\n\n - Available Hydrations:\n 1. team\n 2. league\n 3. division\n 4. sport\n 5. conference\n 6. record(conference)\n 7. record(division)\n \n \n- Notes on Hydrations:\n The team has individual hydrations on its own. These sub hydrations can be used in the standings call\n <br> </br>\n IE:\n https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018&standingsTypes=wildCard,regularSeason&hydrate=team(division)\n 1. \"team(division)\" = a directory of divisions for the given league\n \n", "name": "hydrate", "required": false, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/standings?leagueId=103,104&teamId=147&season=2018&standingsTypes=regularSeason&fields=records,league,division,sport,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/StandingsRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/stats": { "get": { "tags": [ "stats" ], "operationId": "stats", "summary": "View standard statistics.", "description": "**Description:**\n This endpoint returns standard statistics.\n \n **Return Includes:** Team, league, player statistics.\n \n **Required Parameters:** stats and group are required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n ---\n\n **Example of call with required parameters** \n \n https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting\n \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert statType to return statistics for a players for a given sportId. \n 1. Insert statType: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&sportId=1 \n \n**Find available stat types at https://statsapi.mlb.com/api/v1/statTypes**\n\n**For a list of all sportIds https://statsapi.mlb.com/api/v1/sports**\n \n - Notes for playLog, the playLog statType has available hydrations \n 1. hitData: launchSpeed,launchAngle,etc\n 2. pitchData: startSpeed, strikeZoneTop, strikeZoneBottom, etc\n \n 1. One Hydration: http://statsapi.mlb.com/api/v1/people/518516/stats?stats=playLog&group=hitting&season=2018&hydrate=hitData\n 2. Multiple Hydration: http://statsapi.mlb.com/api/v1/people/518516/stats?stats=playLog&group=hitting&season=2018&hydrate=hitData,pitchData\n \n - Notes for populating different stat outputs for all players in both MLB & MiLB. The API defaults to a limit of 1000 returns in each call. The total for the entire return will appear via the \"totalSplits\" object. Use a large limit to match the totalSplits number or offset and limit to navigate through all of the data. Either workflow is efficient. \n\n 1. MLB Season Stats: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=hitting&order=asc&playerPool=all&limit=5000\n 2. MiLB Season Stats: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=12&season=2018&group=hitting&order=asc&playerPool=alloffset=100&limit=1000 \n\n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n 3. One Stat Split: http://statsapi.mlb.com/api/v1/stats?stats=statSplits&sportId=1&season=2018&group=hitting&order=asc&playerPool=all&sitCodes=h&limit=5000\n 4. Multiple Stat Splits: http://statsapi.mlb.com/api/v1/stats?stats=statSplits&sportId=1&season=2018&group=hitting&order=asc&playerPool=all&sitCodes=a,h&offset=1000&limit=1000 \n\n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n 5. MLB stats by Date Range: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=hitting&type=byDateRange&order=asc&playerPool=all&offset=100&limit=1000&startDate=05/17/2018&endDate=05/21/2018\n 6. MiLB stats by Date Range: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=12&season=2018&group=hitting&type=byDateRange&order=asc&playerPool=all&offset=100&limit=1000&startDate=05/17/2018&endDate=05/21/2018\n\n\n - Notes for individual events for playLog, playlog can be filered by individual events\n \n 1. One event for a given player: http://statsapi.mlb.com/api/v1/people/514888/stats?stats=playLog&group=hitting&season=2018&eventType=single\n 2. Multiple events for a given player: http://statsapi.mlb.com/api/v1/people/514888/stats?stats=playLog&group=hitting&season=2018&eventType=single,double \n \n **List of eventTypes can be found at https://statsapi.mlb.com/api/v1/eventTypes** \n\n \n", "name": "stats", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "\nThere are 4 different types of playerPools to return statistics for a particular playerPool across a sport. \n\nUse \"ALL\" for the APIequivalent of lookup cur_hitting/cur_pitching/cur_fielding \n1. Insert All: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&playerPool=All\n2. Insert Qualified: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&playerPool=Qualified\n3. Insert Rookies: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&playerPool=Rookies\n4. Insert Qualified Rookies: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&playerPool=Qualified_rookies \n5. Insert Multiple sportIds and groups: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1,11,12,13,14,15,16&season=2018&group=hitting,pitching&playerPool=All\n", "name": "playerPool", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert position to return statistics for a given position. Default to \"Qualified\" playerPool \n1. Insert position: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&position=3B\n\n **Find available positions at https://statsapi.mlb.com/api/v1/positions**\n", "name": "position", "required": false, "schema": { "type": "string", "enum": [ "P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "DH", "PH", "PR", "BR", "OF", "IF", "SP", "RP", "CP", "UT", "UI", "UO", "RHP", "LHP", "RHS", "LHS", "LHR", "RHR", "B", "X" ] } }, { "in": "query", "description": "Insert teamId to return statistics for a given team. Default to \"Qualified\" playerPool \n 1. Insert teamId: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018&teamId=140\n", "name": "teamId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert leagueId to return statistics for a given team. Default to \"Qualified\" playerPool \n 1. Insert leagueId: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018&leagueId=104\n", "name": "leagueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a limit to limit return. \n1. Insert limit: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&position=3B&playerPool=Qualified&limit=2\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert an offset to returns i+1 as the first record in the set of players. The example below returns the top 2 & 3 batting average leaders among all qualified third basemen.\n1. Insert offset: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&position=3B&playerPool=Qualified&limit=2&offset=1&sortStat=battingAverage\n", "name": "offset", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert statGroup to return statistics for a given sport or league based on group. Default to \"Qualified\" playerPool \n 1. Insert statGroup: https://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting \n \nFind available stat types at https://statsapi.mlb.com/api/v1/statGroup\n", "name": "group", "required": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert gameType to return statistics for a given sport or league based on gameType. Default to \"Qualified\" playerPool \n 1. Insert gameType: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018 \n \nFind available gameType at https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert year to return statistics for a particular season. Default to \"Qualified\" playerPool \n1. Insert year: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert sportId to return statistics for a given sport. \n1. Insert sportId: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018&sportIds=11\n2. Insert multiple sportIds: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018&sportIds=1,11\n\nFor a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportIds", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nSort return based on stat. \n\nDefault to \"Qualified\" playerPool \n1. Insert stat: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&playerPool=Qualified&hydrate=person\n\nFor a list of all availbale stats: https://statsapi.mlb.com/api/v1/baseballStats\n", "name": "sortStat", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\norder return based on either desc or asc. \n\nDefault to \"Qualified\" playerPool \n1. Insert stat: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=person\n\nFor a list of all availbale stats: https://statsapi.mlb.com/api/v1/baseballStats\n", "name": "order", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Team Sub Hydration: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=team(league)\n 2. Multiple Hydrations Using Team Sub Hydration: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=team(league,social)\n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=person(transactions),team(league)\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n \n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=person(appContext=majorLeague,currentTeam)%3A%29\n 2. Most Recent Minor League Team: http://statsapi.mlb.com/api/v1/stats?stats=season&sportId=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=person(appContext=minorLeague,currentTeam)%3A%29\n\n\n \n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/stats?stats=season&group=hitting&gameType=R&season=2018&fields=stats,type,splits,season,stat,homeruns,player,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/stats/metrics": { "get": { "tags": [ "stats" ], "operationId": "statsMetrics", "summary": "View Statcast stats.", "description": "**Description:**\n This endpoint returns Statcast stats.\n \n **Return Includes:** Team, league, player statistics.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n **Required Parameters:** stats, metrics, season, and group are required to run this call.\n \n ---\n\n **Example of call with required parameters** \n \n http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019\n \n", "deprecated": false, "parameters": [ { "in": "query", "description": "There are two statTypes for metrics: metricAverages (average of event level return for Statcast metrics) & metricLog (play by play return of all Statcast metric values). \n 1. metricAverages: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019\n 2. metricLog: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricLog&metrics=launchSpeed&group=hitting&season=2019\n \n**Find available metrics at https://statsapi.mlb.com/api/v1/metrics**\n", "name": "stats", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert statGroup to return statistics for a given sport or league based on group. \n 1. Insert statGroup: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019 \n \n**Find available statGroups at https://statsapi.mlb.com/api/v1/statGroups**\n", "name": "group", "required": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert gameType to return statistics for a given sport or league based on gameType. \n 1. Insert gameType: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2018&gameType=W \n \nFind available gameType at https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert year to return statistics for a particular season. \n1. Insert year: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert date to return a directory of attendance metrics for a particular date range. Format: MM/DD/YYYY \n\n**startDate must be coupled with endDate** \n\n1. Insert startDate: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&startDate=04/17/2019&endDate=05/21/2019\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert date to return a directory of attendance metrics for a particular date range. Format: MM/DD/YYYY \n\n**endDate must be coupled with startDate** \n\n1. Insert endDate: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&startDate=04/17/2019&endDate=05/21/2019\n", "name": "endDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert venueId to return statistics for a given venue. \n1. One Metric: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricLog&metrics=distance&group=hitting&season=2019&venueId=3313\n2. Multiple Metrics: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricLog&metrics=distance,barreledBall&group=hitting&season=2019&venueId=3313\n\n **List of all MLB venue: https://statsapi.mlb.com/api/v1/teams?sportId=1**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n", "name": "venueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert minOccurrences for a required minimum of occurrences for a given metric \n1. minOccurrences for barrels: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricLog&metrics=barreledBall&group=hitting&season=2019&minOccurrences=26\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n", "name": "minOccurrences", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert percentile for a specific percentile return for a given metric \n1. percentile for sprintSpeed: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=sprintSpeed&group=running&season=2019&percentile=70\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n", "name": "percentile", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "\nInsert personId to return metric values for a give player, this is the only statType that takes personId in the stats endpoint. \n 1. One Metric: http://statsapi.mlb.com/api/v1/stats?stats=metricAverages&personId=592450&group=hitting&gameType=R&season=2018&metrics=launchSpeed\n 2. Multiple Metrics: http://statsapi.mlb.com/api/v1/stats?stats=metricAverages&personId=592450&group=hitting&gameType=R&season=2018&metrics=launchSpeed,launchAngle\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics** \n\n\n - Notes for populating metrics based on specific pitchTypes and playEvents.\n\n 1. One Metric and Event Type: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=605141&group=hitting&stats=metricAverages&metrics=launchSpeed&season=2018&eventType=homeRun\n 2. One Metric, Event Type, Pitch Type: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=605141&group=hitting&stats=metricAverages&metrics=launchSpeed&season=2018&eventType=homeRun&pitchType=FF \n 3. Multiple Players: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=605141,592450&group=hitting&stats=metricAverages&metrics=launchSpeed&season=2018&eventType=homeRun&pitchType=FF\n 4. Multiple Metrics: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=605141,592450&group=hitting&stats=metricAverages&metrics=launchSpeed,launchAngle&season=2018&eventType=homeRun&pitchType=FF \n 5. Pitching: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=663855&group=pitching&stats=metricAverages&metrics=effectiveSpeed&season=2019&pitchType=FF\n 6. Pitching with Event Type: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=571945&group=pitching&stats=metricAverages&metrics=effectiveSpeed&season=2019&eventType=homeRun&pitchType=SL\n 7. Pitching with Event Type and Venue: https://statsapi.mlb.com/api/v1/stats/metrics?personIds=571945,592866&group=pitching&stats=metricLog&metrics=effectiveSpeed&season=2019&eventType=homeRun&pitchType=SL&venueId=31\n 8. For League: https://statsapi.mlb.com/api/v1/stats/metrics?group=hitting&stats=metricAverages&metrics=launchSpeed&season=2019&eventType=homeRun&offset=100&limit=100\n \n **List of statTypes can be found at http://statsapi.mlb.com/api/v1/pitchTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n **List of eventTypes can be found at https://statsapi.mlb.com/api/v1/eventTypes**\n", "name": "personId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert teamId to return statistics for a given team. \n 1. Insert teamId: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&teamId=140\n", "name": "teamId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert a limit to limit return. \n1. Insert limit: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert an offset to returns i+1 as the first record in the set of players. \n1. Insert offset: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&offset=1\n", "name": "offset", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \n 1. One Hydration Using Person Sub Hydration: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&hydrate=person(team)\n 2. Multiple Hydrations Using Team Sub Hydration: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&hydrate=person(team,rosterEntries)\n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&hydrate=person(team,rosterEntries,stats(type=season,season=2019))\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n \n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&hydrate=person(appContext=majorLeague,currentTeam)\n 2. Most Recent Minor League Team: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&hydrate=person(appContext=minorLeague,currentTeam) \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/stats/metrics?stats=metricAverages&metrics=launchSpeed&group=hitting&season=2019&limit=1&fields=stats,type,splits,season,stat,homeruns,player,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_StatsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/stats/leaders": { "get": { "tags": [ "stats" ], "operationId": "leaders", "summary": "View leaders for a statistic.", "description": "**Description:**\n This endpoint returns statistical data for top performers information based on League Leader Categories.\n \n **Return Includes:** Player biographical and statistical information.\n \n **Required Parameters:** leaderCategories is required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n\n ---\n **Example of call with required parameters**\n \nhttps://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns\n \n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&hydrate=team\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a league leader category to return information and ranking for a particular statistic.\n 1. Insert leaderCategory: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns\n\n For a list of all leaderCategories: https://statsapi.mlb.com/api/v1/leagueLeaderTypes\n", "name": "leaderCategories", "required": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "\nThere are 4 different types of playerPools to return statistics for a particular playerPool across a sport. \n\nUse \"ALL\" for the APIequivalent of lookup cur_hitting/cur_pitching/cur_fielding \n1. Insert All: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&season=2018&leagueId=104&playerPool=All\n2. Insert Qualified: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&season=2018&playerPool=Qualified\n3. Insert Rookies: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&season=2018&playerPool=Rookies\n4. Insert Qualified Rookies: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&season=2018&playerPool=Qualified_rookies\n", "name": "playerPool", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a game type to return information and ranking for a particular statistic in a particular game type.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "leaderGameTypes", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a sitCode to return information and ranking for a particular statistic in a particular game type.\n 1. Insert sitCode: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sitCodes=4\n \n For a list of all sitCodes: https://statsapi.mlb.com/api/v1/situationCodes\n", "name": "sitCodes", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "\nInsert position to return statistics for a given position. Default to \"Qualified\" playerPool \n1. Insert position: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&position=1B\n\n **Find available positions at https://statsapi.mlb.com/api/v1/positions**\n", "name": "position", "required": false, "schema": { "type": "string", "enum": [ "P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "DH", "PH", "PR", "BR", "OF", "IF", "SP", "RP", "CP", "UT", "UI", "UO", "RHP", "LHP", "RHS", "LHS", "LHR", "RHR", "B", "X" ] } }, { "in": "query", "description": "Insert a stat group to return information and ranking for a particular statistic in a particular group.\n 1. Insert statGroup: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&statGroups=hitting&season=2018\n\n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups\n \n - Best practice to request all time stat leaders:\n \n When requesting for all time leaders in a particular stat, it is best practices to include\n - statType=statsSingleseason\n - statGroup\n - leaderGameTypes\n - leaderCategories\n \n 1. All time leaders in assists: https://statsapi.mlb.com/api/v1/stats/leaders?statType=statsSingleSeason&statGroup=fielding&limit=10&sportId=1&leaderGameTypes=R&leaderCategories=assists&season=2018\n", "name": "statGroup", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert year to return information and ranking for a particular statistic in a given year. \n 1. Insert year: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&statGroups=hitting&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert leagueId to return statistics for a given team. Default to \"Qualified\" playerPool \n 1. Insert leagueId: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sportId=1&leagueId=104&season=2018\n", "name": "leagueId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**startDate must be coupled with endDate and byDateRange statType**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&startDate=06/01/2018&endDate=06/15/2018&season=2018&statType=byDateRange\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**endDate must be coupled with startDate and byDateRange statType**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&startDate=06/01/2018&endDate=06/15/2018&season=2018&statType=byDateRange\n", "name": "endDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return information and ranking for a particular statistic in a given sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sportId=12&season=2018\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \" \n 1. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&statGroups=hitting&season=2018&hydrate=team(league)\n 2. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameType=R&statGroups=hitting&season=2018&hydrate=team(league,social)\n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameType=R&statGroups=hitting&season=2018&hydrate=person(transactions),team(league)\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&leaderGameTypes=R&statGroups=hitting&season=2018&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n \n - Notes on \"currentTeam\" hydration:\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&hydrate=person(appContext=majorLeague,currentTeam)\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&hydrate=person(appContext=minorLeague,currentTeam)\n\n - Notes on Stat Hydrations\n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"])). \n\n 1. Hydrating one stat: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\")). \n\n 1. Hydrating one stat: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sportId=12&season=2018&hydrate=person(stats(group=[hitting],type=[career],sportId=12)%3A%29\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sportId=12&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB individual stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&sportId=12&hydrate=person(stats(group=[hitting],type=[season],sportId=12,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&sportId=12&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],sportId=12,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[playLog],limit=1,season=2017)%3A%29\n \n 2. Limiting pitchLog: http://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2017)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for metrics in stat hydrations, use person(stats(type=[metricAverages],metrics=[launchSpeed],season=\"year\")) or person(stats(type=[metricLog],metrics=[launchSpeed],season=\"year\")). \n \n 1. Hydrating one metric with metricAverages: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(type=[metricAverages],metrics=[launchSpinRate],season=2018)%3A%29\n 2. Hydrating one statType and multiple metrics with metricAverages: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(type=[byMonth,metricAverages],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n 3. Hydrating one metric with metricLog: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(type=[metricLog,metrics=launchSpinRate,season=2018)%3A%29\n 4. Hydrating one statType and multiple metrics with metricLog: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(type=[byMonth,metricLog],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use person(stats(type=[statSplits],sitCodes=[h,a],season=\"year\")). \n \n 1. Hydrating one sitCode: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=a,season=2018)%3A%29\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a,h],season=2018)%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes**\n\n Best practice for MiLB sitCodes in stat hydrations, use person(stats(type=statSplits,sitCodes=[h,a],season=2018,sportId = \"MiLB Id\",season=\"year\")). \n \n 1. Hydrating on sitCode: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&season=2018&&sportId=12&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=a,sportId=12,season=2018)%3A%29\n 2. Hydrating one statType and multiple sitCodes: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&&sportId=12&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a,h],sportId=12,season=2018)%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n \n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&hydrate=person(stats(type=season,season=2018),education),hydrations,team(league)&limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/stats/leaders?leaderCategories=homeRuns&fields=leagueLeaders,leaders,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/LeagueLeaderContainerRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/stats/streaks": { "get": { "tags": [ "stats" ], "operationId": "getStreaks", "summary": "View statistical streaks for a given season", "description": "**Description:**\n This endpoint returns statistical streaks based on streakType,streakSpan,gameType,season, & sportId.\n \n **Return Includes:** biographical and statistical information for a group of players.\n \n **Required Parameters:** streakType,streakSpan,gameType,season, sportId & limit \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with hydration parameters**\n \n http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=season&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(type=season,season=2018)) \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert streakType to return streak information for player in a particular season. \n 1. Insert streakType: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=season&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n", "name": "streakType", "required": true, "schema": { "type": "string", "enum": [ "hittingStreakOverall", "hittingStreakHome", "hittingStreakAway", "onBaseOverall", "onBaseHome", "onBaseAway" ] } }, { "in": "query", "description": "Insert streakSpan to return the span of streak for player in a particular season. \n 1. Insert streakSpan: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=season&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n name: streakSpan\n", "required": true, "schema": { "type": "string", "enum": [ "career", "season", "currentStreak", "currentStreakInSeason", "notable", "notableInSeason" ] } }, { "in": "query", "description": "Insert gameType to return streak stats for a particular gameType.\n 1. Insert gameType: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes \n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return streak stats for a particular season. \n 1. Insert year: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert sportId to return streak stats for a particular sportId.\n 1. Insert sportId: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n \n For a list of all sportId: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string", "uniqueItems": true } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available stats hydration. The hydrations for Stats contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Team Sub Hydration: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=team(league)\n 2. Multiple Hydrations Using Team Sub Hydration: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=team(league,social)\n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: http://statsapi.mlb.com/api/v1/stats?stats=season&sportIds=1&season=2018&group=hitting&sortStat=battingAverage&order=asc&playerPool=Qualified&hydrate=person(transactions),team(league)\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n \n - Notes on \"currentTeam\" hydration\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(appContext=majorLeague,currentTeam)%3A%29\n 2. Most Recent Minor League Team: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(appContext=minorLeague,currentTeam)%3A%29\n\n\n - Notes on Stat Hydrations\n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"]). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\"). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n \n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting],sportId=12,type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting,pitching],sportId=12,type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB individual stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=2018)). \n\n 1. Hydrating one statType/statGroup: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting],type=[season],sportId=12,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],sportId=12,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,seaon=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[playLog],limit=1,season=2018)%3A%29\n \n 2. Limiting pitchLog: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for metrics in stat hydrations, use person(stats(type=[metricAverages],metrics=[launchSpeed],season=2018)) or person(stats(type=[metricLog],metrics=[launchSpeed],season=2018)). \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(type=[metricAverages],metrics=[launchSpinRate],season=2018)%3A%29\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(type=[byMonth,metricAverages],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n \n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&teamId=147&hydrate=person(stats(type=[metricLog],metrics=[launchSpinRate],season=2018)%3A%29\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&teamId=147&hydrate=person(stats(type=[byMonth,metricLog],metrics=[launchSpeed,launchSpinRate],season=2018)%3A%29\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use person(stats(type=[statSplits],sitCodes=[h,a],season=\"year\")). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting],type=[statSplits],sitCodes=a)%3A%29\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[a,h])%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes**\n\n Best practice for MiLB sitCodes in stat hydrations, use person(stats(type=[statSplits],sitCodes=[h,a],season=\"year\",sportId = \"MiLB Id\")). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting],type=[statSplits],sportId=12,sitCodes=a,season=2018)%3A%29\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=12&limit=10&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sportId=12,sitCodes=[a,h],season=2018)%3A%29\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/stats/streaks?gameType=R&streakSpan=notableInSeason&streakType=hittingStreakOverall&season=2018&sportId=1&limit=10&fields=streaks,person,fullName,stats,gamesPlayed,hits\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/StatStreaksRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams": { "get": { "tags": [ "team" ], "operationId": "teams", "summary": "View directory of team(s).", "description": "**Description:**\n This endpoint returns team information based on year,leagueId,sportId and gameType.\n \n **Return Includes:** League,division,sport and venue information for each team.\n \n **Required Parameters:** No parameters are required to run this call. However, sportIds and leagueIds must be called seperately \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/teams?season=2018&sportId=1&hydrate=league\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert year to return team information for a particular season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams?season=1990\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert activeStatus to populate a teams based on active/inactive status for a given season.\n\nThere are three status types: \n 1. active - https://statsapi.mlb.com/api/v1/teams?season=2016&sportIds=13&activeStatus=Y\n 2. inactive - https://statsapi.mlb.com/api/v1/teams?season=2016&sportIds=13&activeStatus=N\n 3. both - https://statsapi.mlb.com/api/v1/teams?season=2016&sportIds=13&activeStatus=B\n", "name": "activeStatus", "required": false, "schema": { "type": "string", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert allStarStatuses to populate a teams based on Allstar status for a given season.\n\nThere are two status types: \n 1. Y - https://statsapi.mlb.com/api/v1/teams?season=2016&sportIds=13&allStarStatuses=Y\n 2. N - https://statsapi.mlb.com/api/v1/teams?season=2016&sportIds=13&allStarStatuses=N\n", "name": "allStarStatuses", "required": false, "schema": { "type": "string", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert leagueId to return team information for particular league.\n 1. One leagueId: https://statsapi.mlb.com/api/v1/teams?leagueIds=103\n\nFor a list of all leagueIds: http://statsapi.mlb.com/api/v1/league\n", "name": "leagueIds", "required": false, "schema": { "type": "string", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert sportId to return team information for a particular sportId.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/teams?sportIds=1&season=1990\n 2. Insert multiple sportIds: https://statsapi.mlb.com/api/v1/teams?sportIds=1,11,12&season=1990\n \n For a list of all sportId: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportIds", "required": false, "schema": { "type": "string", "uniqueItems": true } }, { "in": "query", "description": "Insert gameType to return team information for a particular gameType.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/teams?gameTypes=R&season=1990&sportIds=1\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes \n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. Format \"league,venue\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/teams?season=2018&sportIds=1&hydrate=league\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/teams?season=2018&sportIds=1&hydrate=league,venue\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams?season=2018&sportIds=1&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. previousSchedule\n 2. nextSchedule\n 3. venue\n 4. social\n 5. deviceProperties\n 6. game(promotions)\n 7. game(atBatPromotions)\n 8. game(tickets)\n 9. game(atBatTickets)\n 10. game(sponsorships)\n 11. league\n 12. person\n 13. sport\n 14. division\n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams?gameTypes=R&season=2018&sportIds=1&fields=teams,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/history": { "get": { "tags": [ "team" ], "operationId": "allTeams", "summary": "View historical records for a list of teams.", "description": "allTeams", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert teamId to return a historical data for a particular club(s).\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/history?teamIds=147\n 2. Insert multiple teamIds: https://statsapi.mlb.com/api/v1/teams/history?teamIds=147,110\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamIds", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert startSeason to return a historical data for a particular club(s) from the given year to present.\n 1. Insert startSeason: https://statsapi.mlb.com/api/v1/teams/history?teamIds=147&startSeason=1903\n 2. Insert startSeason & endSeason: https://statsapi.mlb.com/api/v1/teams/history?teamIds=147&startSeason=1995&endSeaon=2009\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "startSeason", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert endSeason to return a historical data for a particular club(s) from the creation to the given year.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/history?teamIds=147\n 2. Insert startSeason & endSeason: https://statsapi.mlb.com/api/v1/teams/history?teamIds=120&startSeason=2000&endSeason=2005\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "endSeason", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/history?teamIds=120&startSeason=2000&endSeason=2005&fields=teams,id,name,venue,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/stats": { "get": { "tags": [ "team" ], "operationId": "teams stats", "summary": "View team stats.", "description": "**Description:**\n This endpoint returns team statistics based on year,leagueId,sportId and gameType.\n \n **Return Includes:** team season statistics.\n \n **Required Parameters:** stat group, season, and stats are required to run this call \n \n \n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert year to return team stats for a particular season. \n 1. Insert year: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert sportId to return team stats for a particular sportId.\n 1. Insert sportId: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018&sportIds=1\n 2. Insert sportIds: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018&sportIds=1,11\n \n For a list of all sportId: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportIds", "required": false, "schema": { "type": "string", "uniqueItems": true } }, { "in": "query", "description": "Insert statGroup to return team stats for a particular statGroup.\n 1. Insert statGroup: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018&sportIds=1\n \n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups \n", "name": "statGroup", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert gameType to return team stats for a particular gameType.\n 1. Insert gameType: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018&sportIds=1&gameType=W\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes \n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert stats to return team stats for a particular statType and statGroup.\n 1. Insert one statType one statGroup: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&stats=season&season=2018&sportIds=1&gameType=R\n 2. Insert multiple statTypes and statGroups: http://statsapi.mlb.com/api/v1/teams/stats?group=pitching,hitting&stats=season,seasonAdvanced&season=2018&sportIds=1&gameType=R\n \n **For a list of all statTypes: https://statsapi.mlb.com/api/v1/statTypes**\n \n **For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups**\n \n - Notes on statSplits statType\n \n Best practice for MLB sitCodes, use stats=statSplits&sitCodes=\"sitCode\".\n \n 1. Team batting statistics batting right: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&season=2018&sportIds=1&stats=statSplits&sitCodes=r\n\n **For a list of all sitCodes: https://statsapi.mlb.com/api/v1/situationCodes**\n \n Best practice for MLB byDateRange, use stats=byDateRange&startDate=\"mm/dd/yyyy\"&endDate=\"mm/dd/yyyy\".\n \n 1. Team batting statistics from May 17th-May21st: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&season=2018&sportIds=1&stats=byDateRange&startDate=05/17/2018&endDate=05/21/2018\n\n \n", "name": "stats", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert order to return team stats in a particular order.\n 1. Insert order: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&season=2018&stats=season&sportIds=1&gameType=R&order=desc\n \n", "name": "order", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert sortStat to sort team stats based on a specific stat.\n 1. Insert sortStat: http://statsapi.mlb.com/api/v1/teams/stats?group=hitting&season=2018&stats=season&sportIds=1&gameType=R&order=desc&sortStat=homeRuns\n \n For a list of all availbale stats: https://statsapi.mlb.com/api/v1/baseballStats\n\n \n", "name": "sortStat", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams?gameTypes=R&season=2018&sportIds=1&fields=teams,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/stats/leaders": { "get": { "tags": [ "team" ], "operationId": "teamstatsleaders", "summary": "View leaders for a statistic.", "description": "**Description:**\n This endpoint returns statistical data for top performers based on League Leader Categories.\n \n **Return Includes:** Player biographical and statistical information.\n \n **Required Parameters:** leaderCategories is required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n ---\n **Example of call with required parameters**\n \nhttps://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns\n \n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&hydrate=team\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert a league leader category to return information and ranking for a particular statistic.\n 1. Insert leaderCategory: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns\n\n For a list of all leaderCategories: https://statsapi.mlb.com/api/v1/leagueLeaderTypes\n", "name": "leaderCategories", "required": true, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a sitCode to return information and ranking for a particular statistic in a particular game type.\n 1. Insert sitCode: http://statsapi.mlb.com/api/v1/teams/stats/leaders?sportId=1&group=hitting&sitCodes=p2&statType=statSplits&leaderCategories=homeRuns\n \n For a list of all sitCodes: https://statsapi.mlb.com/api/v1/situationCodes\n", "name": "sitCodes", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert a gameType to return information and ranking for a particular statistic in a particular gameType.\n 1. Insert gameType: http://statsapi.mlb.com/api/v1/teams/stats/leaders?gameTypes=D&leaderCategories=homeRuns&season=2018&sportId=1&statGroup=hitting\n\n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "gameTypes", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert a stat group to return information and ranking for a particular statistic in a particular group.\n 1. Insert statGroup: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&gameTypes=R&statGroups=hitting&season=2018\n\n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups\n \n", "name": "statGroup", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": false } }, { "in": "query", "description": "Insert year to return information and ranking for a particular statistic in a given year. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&gameTypes=R&statGroups=hitting&season=2018\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert leagueIds to return statistics for a given team. \n 1. Insert leagueIds: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&sportId=1&leagueIds=104&season=2018\n", "name": "leagueIds", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**startDate must be coupled with endDate and byDateRange statType**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&startDate=06/01/2018&endDate=06/15/2018&season=2018&statType=byDateRange\n", "name": "startDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of attendance metrics for a particular date range. Format:\n MM/DD/YYYY\n \n**endDate must be coupled with startDate and byDateRange statType**\n\n 1. Insert date range: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&startDate=06/01/2018&endDate=06/15/2018&season=2018&statType=byDateRange\n", "name": "endDate", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return information and ranking for a particular statistic in a given sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&sportId=12&season=2018\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports \n", "name": "sportId", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. The hydrations for Teams stats leaders and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \n\n 1. One Hydration: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&hydrate=team(league)\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&hydrate=team(league,nextSchedule)\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams?season=2018&sportIds=1&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. previousSchedule\n 2. nextSchedule\n 3. venue\n 4. social\n 5. deviceProperties\n 6. game(promotions)\n 7. game(atBatPromotions)\n 8. game(tickets)\n 9. game(atBatTickets)\n 10. game(sponsorships)\n 11. league\n 12. person\n 13. sport\n 14. division\n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format: topLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/stats/leaders?leaderCategories=homeRuns&fields=leagueLeaders,leaders,rank,value,team,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/LeagueLeaderContainerRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/affiliates": { "get": { "tags": [ "team" ], "operationId": "affiliates", "summary": "View a directory of affiliates for a given team.", "description": "**Description:**\n This endpoint returns a directory of affiliates for a given team based on teamIds,leagueId,sportId and gameType.\n \n **Return Includes:** League,division,sport and venue information for each team.\n \n **Required Parameters:** teamIds is required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/affiliates?teamIds=147\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/teams/affiliates?teamIds=147&hydrate=league\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert teamId to return a directory of affiliates for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/affiliates?teamIds=147\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamIds", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return a directory of affiliates for a particular club in a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/teams/affiliates?sportId=1&teamIds=147\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert year to return a directory of affiliates for a particular club in a particular season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/affiliates?season=2017&teamIds=147\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. Format \"league,venue\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/teams/affiliates?season=2018&teamIds=147&sportId=1&hydrate=league\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/teams/affiliates?season=2018&teamIds=147&sportId=1&hydrate=league,venue\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/affiliates?season=2018&teamIds=147&sportId=1&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. previousSchedule\n 2. nextSchedule\n 3. venue\n 4. social\n 5. deviceProperties\n 6. game(promotions)\n 7. game(atBatPromotions)\n 8. game(tickets)\n 9. game(atBatTickets)\n 10. game(sponsorships)\n 11. league\n 12. person\n 13. sport\n 14. division\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/affiliates?teamIds=147&hydrate=league&fields=teams,id,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}": { "get": { "200": { "description": "Description was not specified", "content": { "*/*": null, "schema": { "type": "string" } } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" }, "tags": [ "team" ], "operationId": "teamId", "summary": "View a team directory.", "description": "\n**Description:**\n This endpoint returns a team directory based on teamId.\n \n **Return Includes:** League,division,sport and venue information for each team.\n \n **Required Parameters:** teamId is required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/147\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/teams/147?hydrate=league\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of team information for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/147\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return a directory of team information for a particular club in a specific season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/147?season=1960\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a sportId to return a directory of team information for a particular club in a sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/teams/147?season=1960&sportId=1\n\n For a list of all sportIds: http://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. Format \"league,venue\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/teams/147?season=2018&sportId=1&hydrate=league\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/teams/147?season=2018&sportId=1&hydrate=league,social\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/147?season=2018&sportId=1&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. previousSchedule\n 2. nextSchedule\n 3. venue\n 4. social\n 5. deviceProperties\n 6. game(promotions)\n 7. game(atBatPromotions)\n 8. game(tickets)\n 9. game(atBatTickets)\n 10. game(sponsorships)\n 11. league\n 12. person\n 13. sport\n 14. division\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/147?fields=teams,name,id,league,division\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": null } }, "/v1/teams/{teamId}/stats": { "get": { "tags": [ "team" ], "operationId": "teamIdIndividualStats", "summary": "View stats for an individual team.", "description": "\n**Description:**\n This endpoint returns a team directory based on teamId.\n \n **Return Includes:** Team season statistics.\n \n **Required Parameters:** stat group, season, and stats are required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2019\n \n ---\n **Example of call with hydrated parameters**\n \n http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2019\n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert year to return team stats for a particular season. \n 1. Insert year: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert statGroup to return team stats for a particular statGroup.\n 1. Insert statGroup: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2018&sportIds=1\n \n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups \n", "name": "statGroup", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert gameType to return team stats for a particular gameType.\n 1. Insert gameType: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2018&sportIds=1&gameType=R\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes \n", "name": "gameType", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert stats to return team stats for a particular statType and statGroup.\n 1. Insert one statType one statGroup: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2018&sportIds=1&gameType=R\n 2. Insert multiple statTypes and statGroups: http://statsapi.mlb.com/api/v1/teams/137/stats?group=pitching,hitting&stats=season,seasonAdvanced&season=2018&sportIds=1&gameType=R\n \n **For a list of all statTypes: https://statsapi.mlb.com/api/v1/statTypes**\n \n **For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups**\n \n - Notes on statSplits statType\n \n Best practice for MLB sitCodes, use stats=statSplits&sitCodes=\"sitCode\".\n \n 1. Team batting statistics batting right: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&season=2018&sportIds=1&stats=statSplits&sitCodes=r\n\n **For a list of all sitCodes: https://statsapi.mlb.com/api/v1/situationCodes**\n \n\n \n", "name": "stats", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/teams/137/stats?group=hitting&stats=season&season=2019&fields=stats,type,displayName,splits,stat,homeRuns\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/affiliates": { "get": { "tags": [ "team" ], "operationId": "TeamIdaffiliates", "summary": "View a directory of affiliates for a given team.", "description": "**Description:**\n This endpoint allows you to return directory of affiliates for a given team.\n \n **Return Includes:** League,division,sport and venue information for each team.\n \n **Required Parameters:** teamId is required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/147/affiliates\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/teams/147/affiliates?hydrate=league\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of affiliates for a given team.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/147/affiliates\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert sportId to return a directory of affiliates for a given team in a particular sport.\n 1. Insert sportId: https://statsapi.mlb.com/api/v1/teams/147/affiliates?sportId=1\n \n For a list of all sportIds: https://statsapi.mlb.com/api/v1/sports\n", "name": "sportId", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert year to return a directory of affiliates for a particular club in a particular season.\n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/147/affiliates?season=2017\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. Format \"league,venue\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/teams/147/affiliates?season=2018&sportId=1&hydrate=league\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/teams/147/affiliates?season=2018&sportId=1&hydrate=league,social\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/147/affiliates?season=2018&sportId=1&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. previousSchedule\n 2. nextSchedule\n 3. venue\n 4. social\n 5. deviceProperties\n 6. game(promotions)\n 7. game(atBatPromotions)\n 8. game(tickets)\n 9. game(atBatTickets)\n 10. game(sponsorships)\n 11. league\n 12. person\n 13. sport\n 14. division\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/109/affiliates?season=2018&fields=teams,name\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/CopyrightResponseEntity_TeamsRestObject_" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/alumni": { "get": { "tags": [ "team" ], "operationId": "alumni", "summary": "View all team alumni.", "description": "**Description:**\n This endpoint allows you to return directory of active alumni for a given team.\n \n **Return Includes:** biogaphical information.\n \n **Required Parameters:** teamId,season & statGroup are required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n ---\n **Example of call with required parameters**\n \n http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting\n \n ---\n **Example of call with hydrated parameters**\n \n http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=rosterEntries \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of alumni for a given team.\n 1. Insert teamId: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return a directory of alumni for a particular club in a particular season.\n 1. Insert year: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert statGroup to return a directory of alumni for a given team based on statistical grouping.\n 1. Insert statGroup: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting\n \n For a list of all statGroups: https://statsapi.mlb.com/api/v1/statGroups\n", "name": "group", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert Hydration(s) to return data for any available team hydration. The hydrations for Teams contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=team(league)\n 2. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=team(league,venue) \n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(transactions),team(league)\n 4. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=hydrations\n\n\n - Available Hydrations:\n\n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n\n\n - Notes on \"currentTeam\" hydration:\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=currentTeam&appContext=majorLeague\n 2. Most Recent Minor League Team: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=currentTeam&appContext=minorLeague\n\n\n\n - Notes on Stat Hydrations: \n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"])). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting],type=[career])\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career,yearByYear])\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting],type=[season],season=2018)\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career],sportId=12),hydrations\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12),hydrations\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=2018)). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[season],sportId=12,season=2018),hydrations\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[season,seasonAdvanced],sportId=12,season=2018),hydrations\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=09/21/2018,season=2018)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[pitching],type=[vsTeam],opposingTeamId=141,season=2018,sportId=1)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[playLog],limit=1,season=2017)\n \n 2. Limiting pitchLog:http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2017)\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for metrics in stat hydrations, use person(stats(type=metricAverages,metrics=launchSpeed,season=2018)) or person(stats(type=metricLog,metrics=launchSpeed,season=2018)). \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[metricAverages],metrics=launchSpeed,season=2018),hydrations\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[career,metricAverages],metrics=[launchSpeed,launchAngle],season=2018),hydrations\n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[metricLog],metrics=launchSpeed,season=2018),hydrations\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=pitching&hydrate=stats(group=[hitting,pitching],type=[career,metricLog],metrics=[launchSpeed,launchAngle],season=2018),hydrations\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use stats(type=statSplits,sitCodes=[h,a],season=2018). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[statSplits],sitCodes=h,season=2018),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n Best practice for MiLB sitCodes in stat hydrations, use stats(type=statSplits,sitCodes=[h,a],season=2018,sportId = \"MiLB Id\"). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/260/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h],season=2018),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/260/alumni?season=2018&group=hitting&hydrate=stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: http://statsapi.mlb.com/api/v1/teams/147/alumni?season=2018&group=hitting&fields=people,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/PeopleRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/coaches": { "get": { "tags": [ "team" ], "operationId": "TeamIdcoaches", "summary": "View biographical information on all coaches for a given club.", "description": "**Description:**\n This endpoint allows you return a directory of coaches for a particular team.\n \n **Return Includes:** fullName, job,jobID and profile link.\n \n **Required Parameters:** teamId is required to run this call. \n \n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/coaches\n \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of coaches for a given team.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/147/coaches\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert year to return a directory of coaches for a particular club in a particular season.\n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/147/coaches?season=2017\n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of coaches for a particular club on a particular date. \n 1. Insert date: https://statsapi.mlb.com/api/v1/teams/109/coaches?date=08/28/2016\n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/109/coaches?fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/RosterRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/personnel": { "get": { "tags": [ "team" ], "operationId": "TeamIdpersonnel", "summary": "View biographical information on all personnel for a given club.", "description": "**Description:**\n This endpoint allows you return a directory of personnel for a particular team.\n \n **Return Includes:** fullName, job,jobID and profile link.\n \n **Required Parameters:** teamId is required to run this call. \n \n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/personnel\n \n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of personnel for a given team.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/147/personnel\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Insert date to return a directory of personnel for a particular club on a particular date.\n 1. Insert date: https://statsapi.mlb.com/api/v1/teams/109/personnel?date=08/28/2016\n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/109/personnel?fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/RosterRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/leaders": { "get": { "tags": [ "team" ], "operationId": "teamleaders", "summary": "View statistical and biographical information on stat leaders for a given club.", "description": "**Description:**\n This endpoint returns statistical data for a team's top performers information based on League Leader Categories.\n \n **Return Includes:** Player biographical and statistical information.\n \n **Required Parameters:** teamdId,season, and leaderCategories is required to run this call.\n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n \n\n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018\n \n ---\n **Example of call with hydration parameters**\n \n https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=team(league),hydrations\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert a teamId to return information and ranking for a particular statistic.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018\n\n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a league leader category to return information and ranking for a particular statistic.\n 1. Insert leaderCategories: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018\n\n For a list of all leaderCategories: https://statsapi.mlb.com/api/v1/leagueLeaderTypes\n", "name": "leaderCategories", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return information and ranking for a particular statistic in a given year. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert a game type to return information and ranking for a particular statistic in a particular game type.\n 1. Insert gameType: https://statsapi.mlb.com/api/v1/teams/147/leaders?leaderCategories=homeRuns&season=2017&leaderGameTypes=D\n \n For a list of all gameTypes: https://statsapi.mlb.com/api/v1/gameTypes\n", "name": "leaderGameTypes", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "\nInsert Hydration(s) to return data for any available team hydration. The hydrations for Teams contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=team(league)\n 2. Multiple Hydrations Using Team Sub Hydration: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=team(league,venue) \n 3. Multiple Hydrations Using Team & Stat Sub Hydrations: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(transactions),team(league)\n 4. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=hydrations\n\n\n - Available Hydrations:\n\n 1. person\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n 2. team\n - Hydrations Available Through Team \n 1. hydrations\n 2. previousSchedule\n 3. nextSchedule\n 4. venue\n 5. springVenue\n 6. social\n 7. deviceProperties\n 8. game(promotions)\n 9. game(promotions)\n 10. game(atBatPromotions)\n 11. game(tickets)\n 12. game(atBatTickets)\n 13. game(sponsorships)\n 14. league\n 15. videos\n 16. person\n 17. sport\n 18. standings\n 18. division \n 19. xref\n\n - Notes on \"currentTeam\" hydration:\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(appContext=majorLeague,currentTeam)\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(appContext=minorLeague,currentTeam)\n\n\n\n - Notes on Stat Hydrations: \n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"])). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=career,sportId=12)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12)),hydrations\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n \n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=2018)). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting],type=career,sportId=12,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12,season=2018)),hydrations\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: https://statsapi.mlb.com/api/v1/teams/140/leaders?leaderCategories=airOuts&season=2018&hydrate=person(stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: https://statsapi.mlb.com/api/v1/teams/140/leaders?leaderCategories=airOuts&season=2018&hydrate=person(stats(group=[pitching],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2017&hydrate=person(stats(group=[hitting,pitching],type=[playLog],limit=1,season=2017)%3A%29\n \n 2. Limiting pitchLog:http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2017&hydrate=person(stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2017)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for metrics in stat hydrations, use person(stats(type=metricAverages,metrics=launchSpeed,season=2018)) or person(stats(type=metricLog,metrics=launchSpeed,season=2018)). \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[metricAverages],metrics=launchSpeed,season=2018)),hydrations\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricAverages],metrics=[launchSpeed,launchAngle],season=2018)),hydrations\n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[metricLog],metrics=launchSpeed,season=2018)),hydrations\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricLog],metrics=[launchSpeed,launchAngle],season=2018)),hydrations\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use stats(type=statSplits,sitCodes=[h,a],season=2018). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[statSplits],sitCodes=h,season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/111/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n Best practice for MiLB sitCodes in stat hydrations, use stats(type=statSplits,sitCodes=[h,a],season=2018,sportId = \"MiLB Id\"). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[statSplits],sitCodes=h,sportId=12,season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/260/leaders?leaderCategories=homeRuns&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=12,season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n \n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Insert a limit to limit return.\n1. Insert limit: https://statsapi.mlb.com/api/v1/teams/147/leaders?leaderCategories=homeRuns&season=2017&leaderGameTypes=D&limit=1\n", "name": "limit", "required": false, "schema": { "type": "integer", "format": "int32" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/147/leaders?leaderCategories=homeRuns&season=2017&leaderGameTypes=D&fields=teamLeaders,leaders,rank,value,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/TeamLeaderContainerRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/roster": { "get": { "tags": [ "team" ], "operationId": "roster", "summary": "View biographical and statistical information for a club's roster.", "description": "\n**Description:**\n Insert teamId to return a directory of players based on roster status for a particular club.\n\n \n **Return Includes:** Player information for provided team.\n \n **Required Parameters:** teamId, season, & rosterType is required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n\n\n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/roster?hydrate=person(stats(type=season,season=2018),education)&rosterType=Active\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return a directory of players based on roster status for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert teamId to return a directory of players based on roster status for a particular club.\n 1. Insert rosterType: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018\n \n For a list of all rosterType: https://statsapi.mlb.com/api/v1/rosterTypes \n", "name": "rosterType", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return a directory of players based on roster status for a particular club in a specific season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return a directory of players based on roster status for a particular club on a specific date. \n 1. Insert date: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018&date=06/05/2018\n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. The hydration for Teams contains \"person\" which has subhydrations Format \"person(subHydration1, subHydrations2)\" \"\n1. One Hydration Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018&&hydrate=person(social)\n2. Multiple Hydrations Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/teams/109/roster?hydrate=person(transactions,social)&rosterType=Active&season=2018\n3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018&&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. \"person\"\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. video\n 15. xrefId\n\n - Notes on \"currentTeam\" hydration:\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(appContext=majorLeague,currentTeam)\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(appContext=minorLeague,currentTeam)\n\n - Notes on Stat Hydrations: \n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"])). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting],type=[career],sportId=12)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n \n Best practice for MiLB individual stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting],type=[season],sportId=12,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],sportId=12,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[playLog],limit=1,season=2017)%3A%29\n \n 2. Limiting pitchLog: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2017)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[pitching],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n Best practice for metrics in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=metricAverages,metrics=launchSpeed,season=2018)) or person(stats(type=metricLog,metrics=launchSpeed,season=2018)). \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[metricAverages],metrics=launchSpeed,season=2018)%3A%29\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricAverages],metrics=[launchSpeed,launchAngle],season=2018)%3A%29\n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricLog],metrics=launchSpeed,season=2018)%3A%29\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricLog],metrics=[launchSpeed,launchAngle],season=2018)%3A%29\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[statSplits],sitCodes=[h,a],season=\"year\")). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[statSplits],sitCodes=[h],season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/111/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n Best practice for MiLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=statSplits,sitCodes=[h,a],sportId = \"MiLB Id\",season=2018)). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h],sportId=12,season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/260/roster?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=12,season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/109/roster?rosterType=Active&season=2018&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/RosterRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/teams/{teamId}/roster/{rosterType}": { "get": { "tags": [ "team" ], "operationId": "rosterType", "summary": "View biographical and statistical information for a club's roster based on roster type.", "description": "\n**Description:**\n This endpoint returns team directorial information based on roster.\n \n **Return Includes:** Player information for a provided team.\n \n **Required Parameters:** teamId, season and, rosterType is required to run this call. \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n \n\n\n\n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/roster/Active\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018&hydrate=person(stats(type=season,season=2018),education),hydrations\n", "deprecated": false, "parameters": [ { "in": "path", "description": "Insert teamId to return team directorial information based on roster for a particular club.\n 1. Insert teamId: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018\n \n For a list of all teamIds: https://statsapi.mlb.com/api/v1/teams\n", "name": "teamId", "required": true, "schema": { "type": "integer", "format": "int32" } }, { "in": "path", "description": "Insert rosterType to return team directorial information based for a particular roster.\n 1. Insert rosterType: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018\n \n For a list of all rosterType: https://statsapi.mlb.com/api/v1/rosterTypes \n", "name": "rosterType", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert year to return team directorial information based on roster a particular club in a specific season. \n 1. Insert year: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?hydrate=person(stats(type=season,season=2018),education)&season=2018\n", "name": "season", "required": true, "schema": { "type": "string" } }, { "in": "query", "description": "Insert date to return team and their coaching staff directorial information for a particular date. \n 1. Insert date: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2000&hydrate=person(stats(type=season,season=2000),education)&date=06/05/2000\n", "name": "date", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available team hydration. The hydrations for Teams contain \"person\" and \"team\" which have subhydrations Format \"team(subHydration1, subHydrations2)\" \"\n 1. One Hydration Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018&hydrate=person(transactions%3A%29\n 2. Multiple Hydrations Using Person Sub Hydration: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018&hydrate=person(transactions,social%3A%29\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. \"person\"\n - Hydrations Available Through Person \n 1. hydrations\n 2. awards\n 3. currentTeam\n 4. team\n 5. rosterEntries\n 6. relatives\n 7. transactions\n 8. social\n 9. education\n 10. stats\n 11. draft\n 12. mixedFeed\n 13. articles\n 14. videos\n 15. xrefId\n\n\n - Notes on \"currentTeam\" hydration:\n \n When hydrating for \"currentTeam\" users can use the 'appContext' parameter to specify most recent team by league\n 1. Most Recent Major League Team: https://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(appContext=majorLeague,currentTeam)\n 2. Most Recent Minor League Team: https://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(appContext=minorLeague,currentTeam)\n\n - Notes on Stat Hydrations: \n \n Best practice for MLB stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"])). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting],type=[career])%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear])%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for MLB individual stat hydrations, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"statType1\",\"statType2\"],season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting],type=[season],season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?rosterType=Active&season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for MiLB stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting],type=[career],sportId=12)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,yearByYear],sportId=12)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n \n Best practice for MiLB individual stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[\"statType1\",\"statType2],sportId=\"MiLB Id\",season=\"year\")). \n\n 1. Hydrating one stat: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting],type=[season],sportId=12,season=2018)%3A%29\n 2. Hydrating multiple statTypes/statGroups: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[season,seasonAdvanced],sportId=12,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n\n Best practice for season stats in date range, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"byDateRange\"]startDate=\"mm/dd/yyyy\",endDate=\"mm/dd/yyyy\",season=\"year\")). \n\n 1. Hydrating byDateRange stat: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[byDateRange],startDate=05/17/2018,endDate=05/21/2018,season=2018)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for limiting playLog & pitchLog, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"playLog\"],limit=1,season=\"year\"). \n\n 1. Limiting playLog: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[playLog],limit=1,season=2017)%3A%29\n \n 2. Limiting pitchLog: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[pitchLog],limit=1,season=2017)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n\n Best practice for player vs. player stats, use person(stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsPlayer\"],opposingPlayerId=\"personId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsPlayer stat: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[pitching],type=[vsPlayer],opposingPlayerId=453568,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n Best practice for player vs. team stats, use stats(group=[\"statGroup1\",\"statGroup2\"],type=[\"vsTeam\"],opposingTeamId=\"teamId\",season=\"year\",sportId=\"sportId\"). \n\n 1. Hydrating vsTeam stat: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[pitching],type=[vsTeam],opposingTeamId=147,season=2018,sportId=1)%3A%29\n \n **List of statTypes can be found at https://statsapi.mlb.com/api/v1/statTypes**\n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/teams** \n\n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n\n Best practice for metrics in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=metricAverages,metrics=launchSpeed,season=2018)) or person(stats(type=metricLog,metrics=launchSpeed,season=2018)). \n \n 1. Hydrating one metric with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[metricAverages],metrics=launchSpeed,season=2018)%3A%29\n 2. Hydrating one statType and multiple metrics with metricAverages: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricAverages],metrics=[launchSpeed,launchAngle],season=2018)%3A%29\n 3. Hydrating one metric with metricLog: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricLog],metrics=launchSpeed,season=2018)%3A%29\n 4. Hydrating one statType and multiple metrics with metricLog: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,metricLog],metrics=[launchSpeed,launchAngle],season=2018)%3A%29\n \n **List of metrics can be found at https://statsapi.mlb.com/api/v1/metrics**\n \n Best practice for MLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=[statSplits],sitCodes=[h,a],season=\"year\")). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[statSplits],sitCodes=[h],season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/111/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n Best practice for MiLB sitCodes in stat hydrations, use person(stats(group=[\"statGroup1,statGroup2\"],type=statSplits,sitCodes=[h,a],sportId = \"MiLB Id\",season=2018)). \n \n 1. Hydrating one sitCode: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h],sportId=12,season=2018)),hydrations\n 2. Hydrating one statType and multiple sitCodes: http://statsapi.mlb.com/api/v1/teams/260/roster/Active?season=2018&hydrate=person(stats(group=[hitting,pitching],type=[career,statSplits],sitCodes=[h,a],sportId=12,season=2018)),hydrations\n \n **List of sitCodes can be found at https://statsapi.mlb.com/api/v1/situationCodes** \n \n **List of sportIds can be found at http://statsapi.mlb.com/api/v1/sports** \n \n **List of statGroups can be found at https://statsapi.mlb.com/api/v1/statGroups**\n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/teams/109/roster/Active?season=2018&&fields=roster,person,fullName\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/RosterRestObject" } } } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/v1/venues": { "get": { "tags": [ "venue" ], "operationId": "venues", "summary": "View information for a venue based on venueId.", "description": "**Description:**\n This endpoint returns venue directorial information for all available venues in the Stats API.\n \n **Return Includes:** Name and id\n \n **Required Parameters:** venueIds is required to run this call. However, sportIds and leagueIds must be called seperately \n \n **Hydrations:** This endpoint can accept the hydrations query parameter. \n\n\n ---\n **Example of call with required parameters**\n \n https://statsapi.mlb.com/api/v1/venues?venueIds=15\n \n ---\n **Example of call with hydrated parameters**\n \n https://statsapi.mlb.com/api/v1/venues?venueIds=15&hydrate=location\n \n", "deprecated": false, "parameters": [ { "in": "query", "description": "Insert venueId to return venue directorial information based venueId.\n 1. Insert venueId: https://statsapi.mlb.com/api/v1/venues?venueIds=15\n \n For a list of all venueId: https://statsapi.mlb.com/api/v1/teams\n", "name": "venueIds", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert sportIds to return venue directorial information based a given sport(s).\n 1. Insert one sportId: https://statsapi.mlb.com/api/v1/venues?&sportIds=1&season=2019\n 2. Insert multiple sportIds https://statsapi.mlb.com/api/v1/venues?&sportIds=1,12,13,14,15,16,23&season=2019\n \n For a list of all sports: https://statsapi.mlb.com/api/v1/sports\n", "name": "sportIds", "required": true, "schema": { "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert year to return venue directorial information for a given season.\n 1. Insert year: https://statsapi.mlb.com/api/v1/venues?season=2018\n \n", "name": "season", "required": false, "schema": { "type": "string" } }, { "in": "query", "description": "Comma delimited list of specific fields to be returned. Format:\ntopLevelNode, childNode, attribute\n\nExample: https://statsapi.mlb.com/api/v1/venues/15?fields=venues,id\n", "name": "fields", "required": false, "schema": { "type": "array", "items": { "type": "string" }, "uniqueItems": true } }, { "in": "query", "description": "Insert Hydration(s) to return data for any available venue hydration. Format \"league,venue\"\n 1. One Hydration: https://statsapi.mlb.com/api/v1/venues?venueIds=15&hydrate=location\n 2. Multiple Hydrations: https://statsapi.mlb.com/api/v1/venues?venueIds=15&hydrate=location,hydrations\n\n 3. Check For Available Hydrations: https://statsapi.mlb.com/api/v1/venues?venueIds=15&hydrate=hydrations\n\n - Available Hydrations:\n\n 1. hydrations\n 2. relatedVenues\n 3. parentVenues\n 4. residentVenues\n 5. relatedVenues(venue)\n 6. parentVenues(venue)\n 7. residentVenues(venue)\n 8. location\n 9. social\n 10. relatedApplications\n 11. timezone\n 12. fieldInfo\n 12. menu\n 13. metadata\n 14. performers\n 15. images\n 16. schedule\n 17. nextSchedule\n 18. previousSchedule\n 19. ticketManagement\n 20. xrefId \n", "name": "hydrate", "required": false, "schema": { "type": "array", "items": { "type": "string", "uniqueItems": false } } } ], "responses": { "200": { "description": "OK" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } } }, "servers": [ { "url": "https://statsapi.mlb.com/api/" } ], "components": { "schemas": { "AttendanceRestObject": {}, "AdditionalBioRestObject": {}, "AwardRestObject": { "properties": { "date": { "type": "string", "format": "date" }, "description": { "type": "string" }, "history": { "type": "string" }, "homePageUrl": { "type": "string" }, "id": { "type": "string" }, "imageUrl": { "type": "string" }, "league": { "$ref": "#/components/schemas/LeagueRestObject" }, "name": { "type": "string" }, "notes": { "type": "string" }, "player": { "$ref": "#/components/schemas/BaseballPersonRestObject" }, "recipientType": { "type": "string" }, "results": { "type": "array", "items": { "$ref": "#/components/schemas/AwardResultRestObject" } }, "season": { "type": "string" }, "shortName": { "type": "string" }, "sortOrder": { "type": "integer", "format": "int32" }, "sport": { "$ref": "#/components/schemas/SportRestObject" }, "team": { "$ref": "#/components/schemas/TeamRestObject" }, "votes": { "type": "integer", "format": "int32" } } }, "AwardResultRestObject": { "properties": { "seasonId": { "type": "integer", "format": "int32" }, "winners": { "type": "array", "items": { "$ref": "#/components/schemas/AwardWinnerRestObject" } } } }, "AwardWinnerRestObject": { "properties": { "coach": { "$ref": "#/components/schemas/PersonRestObject" }, "player": { "$ref": "#/components/schemas/PersonRestObject" }, "rank": { "type": "string" }, "team": { "$ref": "#/components/schemas/TeamRestObject" } } }, "AwardsRestObject": { "properties": { "awards": { "type": "array", "items": { "$ref": "#/components/schemas/AwardRestObject" } } } }, "BaseballDraftProspectRestObject": {}, "BaseballPersonRestObject": { "properties": { "articles": { "type": "array", "items": { "$ref": "#/components/schemas/IFeedRestObject" } }, "batSide": { "$ref": "#/components/schemas/DynamicEnumRestObject" }, "drafts": { "type": "array", "items": { "$ref": "#/components/schemas/BaseballDraftProspectRestObject" } }, "firstLastName": { "type": "string" }, "fullFMLName": { "type": "string" }, "fullLFMName": { "type": "string" }, "initLastName": { "type": "string" }, "lastFirstName": { "type": "string" }, "lastInitName": { "type": "string" }, "mixedFeed": { "type": "array", "items": { "$ref": "#/components/schemas/IFeedRestObject" } }, "mlbDebutDate": { "type": "string", "format": "date" }, "nameSlug": { "type": "string" }, "nameTitle": { "type": "string" }, "note": { "type": "string" }, "pitchHand": { "$ref": "#/components/schemas/DynamicEnumRestObject" }, "strikeZoneBottom": { "type": "number", "format": "double" }, "strikeZoneTop": { "type": "number", "format": "double" }, "transactions": { "type": "array", "items": { "$ref": "#/components/schemas/TransactionRestObject" } }, "videos": { "type": "array", "items": { "$ref": "#/components/schemas/IFeedRestObject" } } } }, "BroadcastRestObject": { "properties": { "callSign": { "type": "string" }, "homeAway": { "type": "string" }, "id": { "type": "integer", "format": "int32" }, "isNational": { "type": "boolean" }, "language": { "type": "string" }, "name": { "type": "string", "description": "The name of the broadcast. Format: KWKW 1330, 95.7 FM The Game, etc" }, "site": { "type": "string" }, "sourceUrl": { "type": "integer", "format": "int32" }, "type": { "type": "string", "description": "The type of broadcast. Format: AM, FM, TV, etc" } } }, "Conference": {}, "ConferenceRestObject": { "properties": { "id": { "type": "integer", "format": "int32", "description": "Unique Identifier" }, "link": { "type": "string", "description": "Link to full resource" }, "name": { "type": "string", "description": "Unique Name" } } }, "DecisionRestObject": { "properties": { "loser": { "$ref": "#/components/schemas/PersonRestObject", "description": "All of the details of the player who lost" }, "winner": { "$ref": "#/components/schemas/PersonRestObject", "description": "All of the details of the player who won" } } }, "Division": {}, "DivisionRestObject": { "properties": { "abbreviation": { "type": "string", "description": "Shortened version of short name. Format: ALE, SFG" }, "conference": { "$ref": "#/components/schemas/ConferenceRestObject" }, "hasWildcard": { "type": "boolean", "description": "Whether or not there is a wildcard" }, "id": { "type": "integer", "format": "int32", "description": "Unique Identifier" }, "league": { "$ref": "#/components/schemas/LeagueRestObject", "description": "The league the division belongs to" }, "link": { "type": "string", "description": "Link to full resource" }, "name": { "type": "string", "description": "Unique Name" }, "nameShort": { "type": "string", "description": "Shortened version of name. Format: AL East, SF Giants" }, "sport": { "$ref": "#/components/schemas/SportRestObject", "description": "The sport the league belongs to" } } }, "DynamicEnumRestObject": { "properties": { "code": { "type": "string" }, "description": { "type": "string" }, "sortOrder": { "type": "integer", "format": "int32" } } }, "EducationRestObject": { "properties": { "colleges": { "type": "array", "items": { "$ref": "#/components/schemas/SchoolRestObject" }, "description": "The player's college(s)" }, "highschools": { "type": "array", "items": { "$ref": "#/components/schemas/SchoolRestObject" }, "description": "The player's highschool(s)" } } }, "FranchiseRestObject": { "properties": { "firstSeasonId": { "type": "integer", "format": "int32" }, "franchiseId": { "type": "integer", "format": "int32" }, "lastSeasonId": { "type": "integer", "format": "int32" }, "link": { "type": "string" }, "locationName": { "type": "string" }, "mostRecentTeamId": { "type": "integer", "format": "int32" }, "roster": { "$ref": "#/components/schemas/RosterRestObject" }, "teamName": { "type": "string" } } }, "GameContentRestObject": { "properties": { "editorial": { "$ref": "#/components/schemas/GameEditorialRestObject", "description": "All of the details of the game editorial" }, "gameNotes": { "$ref": "#/components/schemas/GameNotesRestObject" }, "highlights": { "$ref": "#/components/schemas/GameHighlightsRestObject", "description": "All of the details of the game highlights" }, "link": { "type": "string", "description": "Link to full resource" }, "media": { "$ref": "#/components/schemas/GameMediaRestObject", "description": "All of the details of the game media" }, "summary": { "$ref": "#/components/schemas/GameContentSummaryRestObject", "description": "List of boolean values for Game Content" } } }, "GameContentSummaryRestObject": { "properties": { "hasHighlightsVideo": { "type": "boolean" }, "hasPreviewArticle": { "type": "boolean" }, "hasRecapArticle": { "type": "boolean" }, "hasWrapArticle": { "type": "boolean" } } }, "GameEditorialRestObject": { "properties": { "articles": { "$ref": "#/components/schemas/JsonNode", "description": "Gives the articles about the game" }, "preview": { "$ref": "#/components/schemas/JsonNode", "description": "Gives the written preview of upcoming game" }, "probables": { "$ref": "#/components/schemas/JsonNode", "description": "Lists the probable starting pitches for the game" }, "recap": { "$ref": "#/components/schemas/JsonNode", "description": "Gives the written recap of the game" }, "wrap": { "$ref": "#/components/schemas/JsonNode", "description": "Gives the written wrap of the game" } } }, "GameHighlightsRestObject": { "properties": { "gameCenter": { "$ref": "#/components/schemas/JsonNode" }, "highlights": { "$ref": "#/components/schemas/JsonNode" }, "live": { "$ref": "#/components/schemas/JsonNode" }, "milestone": { "$ref": "#/components/schemas/JsonNode" }, "scoreboard": { "$ref": "#/components/schemas/JsonNode" }, "scoreboardPreview": { "$ref": "#/components/schemas/JsonNode" } } }, "GameInfoRestObject": { "properties": { "attendance": { "type": "integer", "format": "int32", "description": "Number of fans at the stadium as recorded by the club." }, "delayDurationMinutes": { "type": "integer", "format": "int32", "description": "Amount of timet he game was delayed (in seconds)." }, "firstPitch": { "type": "string", "format": "date-time", "description": "Time that the first pitch was thrown." }, "gameDurationMinutes": { "type": "integer", "format": "int32", "description": "Amount of time the game lasted (in seconds)." } } }, "GameMediaRestObject": { "properties": { "enhancedGame": { "type": "boolean", "description": "Whether or not the game is enhanced" }, "epg": { "$ref": "#/components/schemas/JsonNode", "description": "Lists the title and items for media content. Format: Title - Extended Highlights, Items - additional fields for all relevant items" }, "epgAlternate": { "$ref": "#/components/schemas/JsonNode", "description": "Lists the title and items for media content. Format: Title - Extended Highlights, Items - additional fields for all relevant items" }, "featuredMedia": { "$ref": "#/components/schemas/JsonNode" }, "freeGame": { "type": "boolean", "description": "Whether or not the game is free" }, "milestones": { "$ref": "#/components/schemas/JsonNode" } } }, "GameNotesRestObject": { "properties": { "notes": { "$ref": "#/components/schemas/JsonNode" } } }, "GameStatusRestObject": { "properties": { "abstractGameState": { "type": "string", "description": "Format: Preview, Live or Final" }, "codedGameState": { "type": "string", "description": "Single digit/letter status. Format: I = In Progress, F = Final" }, "detailedState": { "type": "string", "description": "Description of game state. Format: Delayed: Rain" }, "startTimeTBD": { "type": "boolean", "description": "Whether or not the start time is TBD" }, "statusCode": { "type": "string", "description": "Expanded version of coded game state. Format: IR = In Progress and Rain Delay" } } }, "IFeedRestObject": {}, "JsonNode": {}, "LeadersRestObject": { "properties": { "leaderCategory": { "type": "string" }, "league": { "$ref": "#/components/schemas/LeagueRestObject" }, "season": { "type": "string" }, "statGroup": { "type": "string" }, "team": { "$ref": "#/components/schemas/TeamRestObject" } } }, "League": {}, "LeagueRestObject": { "properties": { "abbreviation": { "type": "string", "description": "Shortened version of short name. Format: ALE, SFG" }, "conferencesInUse": { "type": "boolean", "description": "Whether or not the League has Conferences" }, "divisionsInUse": { "type": "boolean", "description": "Whether or not the League has Divisions" }, "hasPlayoffPoints": { "type": "boolean", "description": "True if a league uses points for standings" }, "hasSplitSeason": { "type": "boolean", "description": "Whether or not there is a split season" }, "hasWildCard": { "type": "boolean", "description": "Whether or not there is a wildcard" }, "id": { "type": "integer", "format": "int32", "description": "Unique Identifier" }, "link": { "type": "string", "description": "Link to full resource" }, "name": { "type": "string", "description": "Unique Name" }, "nameShort": { "type": "string", "description": "Shortened version of name. Format: AL East, SF Giants" }, "numGames": { "type": "integer", "format": "int32", "description": "The number of regular season games" }, "numTeams": { "type": "integer", "format": "int32", "description": "The number of teams" }, "numWildcardTeams": { "type": "integer", "format": "int32", "description": "The number of wildcard teams" }, "orgCode": { "type": "string", "description": "Deprecated Field" }, "season": { "type": "string", "description": "Season of play" }, "seasonDateInfo": { "$ref": "#/components/schemas/SeasonRestObject", "description": "Dates of specific points in a season" }, "seasonState": { "type": "string", "description": "The status of the season. Format: offseason" }, "timeZone": { "$ref": "#/components/schemas/TimeZoneRestObject", "description": "Time zone the venue is located in" } } }, "LocationRestObject": { "properties": { "state": { "type": "string", "description": "State where the venue is located. Format: Ohio" }, "stateAbbrev": { "type": "string", "description": "State abbrevation where the venue is located. Format: OH" } } }, "OfficialRestObject": { "properties": { "official": { "$ref": "#/components/schemas/PersonRestObject" }, "officialType": { "type": "string" } } }, "OtherNamesRestObject": { "properties": { "firstInitialLastName": { "type": "string" }, "lastFirstName": { "type": "string" }, "lastNameFirstInitial": { "type": "string" }, "phoneticName": { "type": "string" }, "slug": { "type": "string" } } }, "Person": {}, "PersonRestObject": { "properties": { "active": { "type": "boolean", "description": "Whether or not a player is active" }, "additionalBio": { "$ref": "#/components/schemas/AdditionalBioRestObject" }, "alternateCaptain": { "type": "boolean", "description": "Whether or not a player is an alternate captain" }, "awards": { "type": "array", "items": { "$ref": "#/components/schemas/AwardRestObject" }, "description": "All of the details of a player's awards" }, "birthCity": { "type": "string", "description": "City the player was born in. Format: La Romana" }, "birthCountry": { "type": "string", "description": "Country the player was born in. Format: Dominican Republic" }, "birthDate": { "type": "string", "format": "date", "description": "Birth date of a player. Format: 1983-01-07" }, "birthStateProvince": { "type": "string", "description": "State or Province the player was born in. Format: NY" }, "boxscoreName": { "type": "string", "description": "Name that shows up in the box score. Last name or last name and first initial" }, "captain": { "type": "boolean", "description": "Whether or not a player is a captain" }, "currentAge": { "type": "integer", "format": "int32", "description": "Current age of a player. Format: 34" }, "currentTeam": { "$ref": "#/components/schemas/TeamRestObject", "description": "All of the details of a player's current team" }, "deathCity": { "type": "string", "description": "City the player died in. Format: La Romana" }, "deathCountry": { "type": "string", "description": "Country the player died in. Format: Dominican Republic" }, "deathDate": { "type": "string", "format": "date", "description": "Death date of a player. Format: 1983-01-07" }, "deathStateProvince": { "type": "string", "description": "State or Province the player died in. Format: NY" }, "draft": { "type": "array", "items": { "$ref": "#/components/schemas/PlayerDraftInfoRestObject" }, "description": "All of the details of the draft a player was drafted in" }, "draftYear": { "type": "integer", "format": "int32", "description": "Year the player was drafted. Format: 2000" }, "education": { "$ref": "#/components/schemas/EducationRestObject", "description": "All of the details of a player's education" }, "firstName": { "type": "string", "description": "First name of a player" }, "fullName": { "type": "string", "description": "Full name of a player. Format: Edwin Encarnacion" }, "height": { "type": "string", "description": "Height of a player. Format: 6' 1" }, "id": { "type": "integer", "format": "int32", "description": "Unique Player Identifier. Format: 434538, 429665, etc" }, "lastName": { "type": "string", "description": "Last name of a player" }, "lastPlayedDate": { "type": "string", "format": "date", "description": "Date of last game played. Format: 1983-01-07" }, "link": { "type": "string", "description": "Link to full resource" }, "middleName": { "type": "string", "description": "Middle name of a player" }, "nationality": { "type": "string" }, "nickName": { "type": "string", "description": "Nick nme for a player. Example: The Freak" }, "otherNames": { "$ref": "#/components/schemas/OtherNamesRestObject", "description": "All of the details of a player's other names" }, "photos": { "type": "array", "items": { "$ref": "#/components/schemas/PhotoRestObject" }, "description": "Links to images of person." }, "primaryNumber": { "type": "string", "description": "The jersey number a player wears" }, "primaryPosition": { "$ref": "#/components/schemas/PositionRestObject", "description": "All of the details of a player's primary position" }, "pronunciation": { "type": "string", "description": "Pronunciation guide for a player's name" }, "rookie": { "type": "boolean", "description": "Whether or not a player is a rookie" }, "rosterEntries": { "type": "array", "items": { "$ref": "#/components/schemas/RosterEntryRestObject" } }, "social": { "$ref": "#/components/schemas/SocialMediaRestObject", "description": "All of the details of a player's social media" }, "stats": { "type": "array", "items": { "$ref": "#/components/schemas/StatContainerRestObject" }, "description": "All of the details of a player's stats" }, "useName": { "type": "string", "description": "Name a player uses" }, "weight": { "type": "integer", "format": "int32", "description": "Weight of a player. Format: 230" } } }, "PhotoRestObject": {}, "Play": {}, "PlayRestObject": { "properties": { "play": { "$ref": "#/components/schemas/Play", "description": "Includes all details of a play" } } }, "PlayerDraftInfoRestObject": { "properties": { "pickInRound": { "type": "integer", "format": "int32" }, "pickOverall": { "type": "integer", "format": "int32" }, "round": { "type": "string" }, "team": { "$ref": "#/components/schemas/TeamRestObject" }, "year": { "type": "integer", "format": "int32" } } }, "PositionRestObject": { "properties": { "abbreviation": { "type": "string", "description": "Position abbreviation. Format: SS, P, 1B, etc" }, "code": { "type": "string", "description": "Position number. Format: 1, 2, 3, etc" }, "name": { "type": "string", "description": "Position name. Format: First base, Shortstop, Pitcher, etc" }, "type": { "type": "string", "description": "Position type. Format: Infielder, Pitcher, etc" } } }, "PromotionRestObject": { "properties": { "altPageUrl": { "type": "string" }, "description": { "type": "string" }, "displayIfPast": { "type": "boolean" }, "distribution": { "type": "string" }, "imageUrl": { "type": "string" }, "name": { "type": "string" }, "offerId": { "type": "integer", "format": "int32" }, "offerType": { "type": "string" }, "order": { "type": "integer", "format": "int32" }, "other": { "type": "string" }, "presentedBy": { "type": "string" }, "sortKey": { "type": "string" }, "teamId": { "type": "integer", "format": "int32" }, "thumbnailUrl": { "type": "string" }, "tlink": { "type": "string" } } }, "RosterEntryRestObject": { "properties": { "isActiveFortyMan": { "type": "boolean" }, "jerseyNumber": { "type": "string", "description": "Jersey number that a player wears. Format: 16, 34, etc" }, "person": { "$ref": "#/components/schemas/PersonRestObject", "description": "All of the details of a player" }, "position": { "$ref": "#/components/schemas/PositionRestObject", "description": "All of the details of a player's position" }, "stats": { "$ref": "#/components/schemas/Stats", "description": "Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes" } } }, "RosterRestObject": { "properties": { "link": { "type": "string", "description": "Link to full resource" }, "roster": { "type": "array", "items": { "$ref": "#/components/schemas/RosterEntryRestObject" }, "description": "All of the details of a roster" }, "rosterType": { "type": "string", "description": "Type of roster. Available types in /api/v1/rosterTypes" }, "teamId": { "type": "integer", "format": "int32", "description": "Unique Team Identifier. Format: 141, 147, etc" } } }, "ScheduleItemRestObject": { "properties": { "atBatPromotions": { "type": "array", "items": { "$ref": "#/components/schemas/PromotionRestObject" }, "description": "All of the promotional details" }, "atBatTickets": { "type": "array", "items": { "$ref": "#/components/schemas/TicketRestObject" }, "description": "All of the ticket details" }, "broadcasts": { "type": "array", "items": { "$ref": "#/components/schemas/BroadcastRestObject" }, "description": "All of the broadcast details" }, "content": { "$ref": "#/components/schemas/GameContentRestObject", "description": "All of the details of game content" }, "decisions": { "$ref": "#/components/schemas/DecisionRestObject", "description": "All the details about the decisions of a game. Includes, Winner, Loser, and Save" }, "endDateTime": { "type": "string", "format": "date-time", "description": "Format: YYYY-MM-DDTHH:MM:SSZ" }, "gameDate": { "type": "string", "format": "date-time", "description": "Date of Game. Format: MM/DD/YYYY" }, "gameInfo": { "$ref": "#/components/schemas/GameInfoRestObject" }, "gameNumber": { "type": "integer", "format": "int32" }, "gamePk": { "type": "integer", "format": "int32", "description": "Unique Primary Key Representing a Game" }, "gameType": { "type": "string", "description": "Type of Game. Available types in /api/v1/gameTypes" }, "isDefaultGame": { "type": "boolean" }, "isFeaturedGame": { "type": "boolean" }, "isTie": { "type": "boolean" }, "link": { "type": "string", "description": "Link to full resource" }, "officials": { "type": "array", "items": { "$ref": "#/components/schemas/OfficialRestObject" } }, "promotions": { "type": "array", "items": { "$ref": "#/components/schemas/PromotionRestObject" }, "description": "All of the promotional details" }, "publicFacing": { "type": "boolean" }, "radioBroadcasts": { "type": "array", "items": { "$ref": "#/components/schemas/BroadcastRestObject" }, "description": "All of the radio broadcast details" }, "rescheduleDate": { "type": "string", "format": "date-time" }, "rescheduledFrom": { "type": "string", "format": "date-time" }, "resumeDate": { "type": "string", "format": "date-time" }, "resumedFrom": { "type": "string", "format": "date-time" }, "scoringPlays": { "type": "array", "items": { "$ref": "#/components/schemas/PlayRestObject" } }, "season": { "type": "string", "description": "Season of play" }, "seriesStatus": { "$ref": "#/components/schemas/SeriesStatusRestObject" }, "seriesSummary": { "$ref": "#/components/schemas/TournamentSeriesSummaryRestObject" }, "sortNumber": { "type": "integer", "format": "int32" }, "sponsorships": { "type": "array", "items": { "$ref": "#/components/schemas/PromotionRestObject" }, "description": "All of the sponsorship details" }, "status": { "$ref": "#/components/schemas/GameStatusRestObject", "description": "Status and state of the game. Available types in /api/v1/gameStatus" }, "tickets": { "type": "array", "items": { "$ref": "#/components/schemas/TicketRestObject" }, "description": "All of the ticket details" }, "venue": { "$ref": "#/components/schemas/VenueRestObject", "description": "All of the details of a venue" }, "weather": { "$ref": "#/components/schemas/WeatherRestObject" }, "xrefIds": { "type": "array", "items": { "$ref": "#/components/schemas/XrefIdRestObject" } } } }, "ScheduleRestObject": {}, "SchoolRestObject": {}, "SeasonRestObject": { "properties": { "allStarDate": { "type": "string", "format": "date", "description": "Date of the all-star game. Format: YYYY-MM-DD" }, "firstDate2ndHalf": { "type": "string", "format": "date", "description": "Date of the first day of the second half of the regular season. Format: YYYY-MM-DD" }, "lastDate1stHalf": { "type": "string", "format": "date", "description": "Date of the last day of the first half of the regular season. Format: YYYY-MM-DD" }, "postSeasonEndDate": { "type": "string", "format": "date", "description": "Date the postseason ends. Format: YYYY-MM-DD" }, "postSeasonStartDate": { "type": "string", "format": "date", "description": "Date the postseason starts. Format: YYYY-MM-DD" }, "preSeasonEndDate": { "type": "string", "format": "date", "description": "Date the preseason ends. Format: YYYY-MM-DD" }, "preSeasonStartDate": { "type": "string", "format": "date", "description": "Date the preseason starts. Format: YYYY-MM-DD" }, "regularSeasonEndDate": { "type": "string", "format": "date", "description": "Date the regular season ends. Format: YYYY-MM-DD" }, "regularSeasonStartDate": { "type": "string", "format": "date", "description": "Date the regular season starts. Format: YYYY-MM-DD" }, "seasonId": { "type": "string", "description": "Season of play" } } }, "SeriesStatusRestObject": { "properties": { "description": { "type": "string" }, "gameNumber": { "type": "integer", "format": "int32" }, "isOver": { "type": "boolean" }, "isTied": { "type": "boolean" }, "losingTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "losses": { "type": "integer", "format": "int32" }, "result": { "type": "string" }, "shortDescription": { "type": "string" }, "shortName": { "type": "string" }, "ties": { "type": "integer", "format": "int32" }, "totalGames": { "type": "integer", "format": "int32" }, "winningTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "wins": { "type": "integer", "format": "int32" } } }, "SocialMediaRestObject": { "properties": { "facebook": { "type": "array", "items": { "type": "string" }, "description": "The player's username and ID. Format: Username - georgekontos70, ID - 242731055756840" }, "googleplus": { "type": "array", "items": { "type": "string" } }, "hashtags": { "type": "array", "items": { "type": "string" } }, "instagram": { "type": "array", "items": { "type": "string" }, "description": "The player's username. Format: joepanik, hunterpence, etc" }, "periscope": { "type": "array", "items": { "type": "string" } }, "pinterest": { "type": "array", "items": { "type": "string" } }, "snapchat": { "type": "array", "items": { "type": "string" } }, "tumblr": { "type": "array", "items": { "type": "string" } }, "twitter": { "type": "array", "items": { "type": "string" }, "description": "The player's handle. Format: @Bbelt9, @bcraw35, etc" }, "vine": { "type": "array", "items": { "type": "string" } }, "website": { "type": "array", "items": { "type": "string" } }, "youtube": { "type": "array", "items": { "type": "string" } } } }, "SportRestObject": { "properties": { "abbreviation": { "type": "string", "description": "Shortened version of short name. Format: ALE, SFG" }, "code": { "type": "string" }, "deviceProperties": { "$ref": "#/components/schemas/JsonNode" }, "id": { "type": "integer", "format": "int32", "description": "Top level organization of a sport" }, "link": { "type": "string", "description": "Link to full resource" }, "name": { "type": "string", "description": "Name of a sport's league. Format: Major League Baseball" } } }, "StatContainerRestObject": { "properties": { "player": { "$ref": "#/components/schemas/Person" }, "season": { "type": "string" }, "splits": { "type": "array", "items": { "$ref": "#/components/schemas/StatSplitsRestObject" }, "description": "All of the details of stat splits" }, "splitsTiedWithLimit": { "type": "array", "items": { "$ref": "#/components/schemas/StatSplitsRestObject" } }, "splitsTiedWithOffset": { "type": "array", "items": { "$ref": "#/components/schemas/StatSplitsRestObject" } }, "stats": { "$ref": "#/components/schemas/StatDataRestObject" }, "team": { "$ref": "#/components/schemas/Team" }, "totalSplits": { "type": "integer", "format": "int32" } } }, "StatDataRestObject": {}, "StatSplitsRestObject": { "properties": { "awayTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "date": { "type": "string", "format": "date", "description": "Date of Game. Format: MM/DD/YYYY" }, "dayOfWeek": { "type": "integer", "format": "int32" }, "gameType": { "type": "string", "description": "Type of Game. Available types in /api/v1/gameTypes" }, "group": { "type": "string" }, "homeTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "isHome": { "type": "boolean" }, "isWin": { "type": "boolean" }, "league": { "$ref": "#/components/schemas/LeagueRestObject", "description": "The league the division belongs to" }, "month": { "type": "integer", "format": "int32" }, "numOccurrences": { "type": "integer", "format": "int32" }, "numTeams": { "type": "integer", "format": "int32" }, "opponent": { "$ref": "#/components/schemas/TeamRestObject", "description": "All of the details of an opponent" }, "opponentConference": { "$ref": "#/components/schemas/ConferenceRestObject" }, "opponentDivision": { "$ref": "#/components/schemas/DivisionRestObject" }, "player": { "$ref": "#/components/schemas/PersonRestObject", "description": "All of the details of a player" }, "rank": { "type": "integer", "format": "int32" }, "scheduleItemRestObject": { "$ref": "#/components/schemas/ScheduleItemRestObject", "description": "All of the details of a schedule" }, "season": { "type": "string", "description": "Season of play" }, "split": { "$ref": "#/components/schemas/DynamicEnumRestObject" }, "sport": { "$ref": "#/components/schemas/SportRestObject", "description": "The sport the league belongs to" }, "stat": { "$ref": "#/components/schemas/StatDataRestObject", "description": "Type of statistics. Format: Individual, Team, Career, etc. Available types in /api/v1/statTypes" }, "team": { "$ref": "#/components/schemas/TeamRestObject", "description": "All of the details of a team" }, "type": { "type": "string" }, "venue": { "$ref": "#/components/schemas/VenueRestObject" } } }, "Stats": {}, "StreakRestObject": { "properties": { "streakCode": { "type": "string" }, "streakNumber": { "type": "integer", "format": "int32" }, "streakType": { "type": "string" } } }, "Team": {}, "TeamContentCms": {}, "TeamPlayoffs": {}, "TeamRestObject": { "properties": { "abbreviation": { "type": "string", "description": "Shortened version of short name. Format: ALE, SFG" }, "conference": { "$ref": "#/components/schemas/ConferenceRestObject", "description": "All the details of a conference" }, "content": { "$ref": "#/components/schemas/TeamContentCms" }, "deviceProperties": { "$ref": "#/components/schemas/JsonNode" }, "division": { "$ref": "#/components/schemas/DivisionRestObject", "description": "All of the details of a division" }, "fileCode": { "type": "string", "description": "Unique File Code. Format: tor, nyy, etc" }, "firstYearOfPlay": { "type": "string", "description": "The first year of play. Format: 1903" }, "franchise": { "$ref": "#/components/schemas/FranchiseRestObject", "description": "All of the details of a franchise" }, "id": { "type": "integer", "format": "int32", "description": "Unique Team Identifier. Format: 141, 147, etc" }, "isActive": { "type": "boolean" }, "isPlaceholder": { "type": "boolean" }, "league": { "$ref": "#/components/schemas/LeagueRestObject", "description": "The league the division belongs to" }, "link": { "type": "string", "description": "Link to full resource" }, "locationName": { "type": "string", "description": "Unique Team Location. Toronto, Bronx, etc" }, "name": { "type": "string", "description": "Unique Full Team Name. Format: Toronto Blue Jays, New York Yankees, etc" }, "nextGameSchedule": { "$ref": "#/components/schemas/ScheduleRestObject" }, "nextSchedule": { "$ref": "#/components/schemas/ScheduleRestObject" }, "parentOrgId": { "type": "integer", "format": "int32" }, "parentOrgName": { "type": "string" }, "playoffInfo": { "$ref": "#/components/schemas/TeamPlayoffs" }, "previousGameSchedule": { "$ref": "#/components/schemas/ScheduleRestObject" }, "previousSchedule": { "$ref": "#/components/schemas/ScheduleRestObject" }, "record": { "$ref": "#/components/schemas/TeamStandingsRecordRestObject", "description": "All of the details of a team's record" }, "roster": { "$ref": "#/components/schemas/RosterRestObject", "description": "All of the details of a roster" }, "season": { "type": "integer", "format": "int32", "description": "Season of play" }, "shortName": { "type": "string", "description": "Shortened version of name. Format: AL East, SF Giants" }, "social": { "$ref": "#/components/schemas/SocialMediaRestObject", "description": "All of the details of a player's social media" }, "sport": { "$ref": "#/components/schemas/SportRestObject", "description": "The sport the league belongs to" }, "springVenue": { "$ref": "#/components/schemas/VenueRestObject", "description": "All of the details of a venue" }, "teamCode": { "type": "string", "description": "Unique Team Code. Format: tor, nya, etc" }, "teamLeaders": { "type": "array", "items": { "$ref": "#/components/schemas/LeadersRestObject" }, "description": "All of the details of team leaders" }, "teamName": { "type": "string", "description": "Unique Team Name. Blue Jays, Yankees, etc" }, "teamStats": { "type": "array", "items": { "$ref": "#/components/schemas/StatContainerRestObject" }, "description": "All of the details of a player's stats" }, "triCode": { "type": "string", "description": "Three letter abbreviation that will be adjusted for different languages" }, "venue": { "$ref": "#/components/schemas/VenueRestObject", "description": "All of the details of a venue" } } }, "TeamStandingsRecordRestObject": { "properties": { "clinchIndicator": { "type": "string" }, "conference": { "$ref": "#/components/schemas/Conference", "description": "All the details of a conference" }, "conferenceGamesBack": { "type": "string" }, "conferenceRank": { "type": "string" }, "division": { "$ref": "#/components/schemas/Division", "description": "All of the details of a division" }, "divisionGamesBack": { "type": "string" }, "divisionRank": { "type": "string" }, "gamesBack": { "type": "string" }, "gamesPlayed": { "type": "integer", "format": "int32" }, "league": { "$ref": "#/components/schemas/League", "description": "The league the division belongs to" }, "leagueGamesBack": { "type": "string" }, "leagueRank": { "type": "string" }, "leagueRecord": { "$ref": "#/components/schemas/WinLossRecordRestObject" }, "season": { "type": "string" }, "sportGamesBack": { "type": "string" }, "sportRank": { "type": "string" }, "springLeagueGamesBack": { "type": "string" }, "springLeagueRank": { "type": "string" }, "streak": { "$ref": "#/components/schemas/StreakRestObject" }, "team": { "$ref": "#/components/schemas/TeamRestObject", "description": "All of the details of a team" }, "wildCardGamesBack": { "type": "string" }, "wildCardRank": { "type": "string" } } }, "TicketRestObject": { "properties": { "ticketLink": { "type": "string" }, "ticketType": { "type": "string" } } }, "TimeZoneRestObject": { "properties": { "id": { "type": "string", "description": "Format: America/Detroit" }, "offset": { "type": "integer", "format": "int32", "description": "The offset in hours from UTC. Format: -5" } } }, "TournamentSeriesSummaryRestObject": {}, "TransactionRestObject": { "properties": { "date": { "type": "string", "format": "date-time" }, "description": { "type": "string" }, "effectiveDate": { "type": "string", "format": "date-time" }, "fromTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "id": { "type": "integer", "format": "int32" }, "isConditional": { "type": "boolean" }, "person": { "$ref": "#/components/schemas/PersonRestObject" }, "resolutionDate": { "type": "string", "format": "date-time" }, "toTeam": { "$ref": "#/components/schemas/TeamRestObject" }, "type": { "type": "string" } } }, "VenueRestObject": { "properties": { "city": { "type": "string", "description": "City where the venue is located. Format: Cleveland" }, "id": { "type": "integer", "format": "int32", "description": "Unique Identifier" }, "link": { "type": "string", "description": "Link to full resource" }, "location": { "$ref": "#/components/schemas/LocationRestObject", "description": "Location details about the venue" }, "name": { "type": "string", "description": "Unique Name" }, "timeZone": { "$ref": "#/components/schemas/TimeZoneRestObject", "description": "Time zone the venue is located in" } } }, "WeatherRestObject": { "properties": { "condition": { "type": "string" }, "temp": { "type": "string" }, "wind": { "type": "string" } } }, "WinLossRecordRestObject": { "properties": { "losses": { "type": "integer", "format": "int32" }, "pct": { "type": "string" }, "ties": { "type": "integer", "format": "int32" }, "type": { "type": "string" }, "wins": { "type": "integer", "format": "int32" } } }, "XrefIdRestObject": {}, "ConferencesRestObject": { "properties": { "conferences": { "type": "array", "items": { "$ref": "#/components/schemas/ConferenceRestObject" } } } }, "BaseballStatsTypeRestObject": { "properties": { "isCounting": { "type": "boolean" }, "label": { "type": "string" }, "lookupParam": { "type": "string" }, "name": { "type": "string" }, "orgTypes": { "type": "array", "items": { "type": "string" } }, "statGroups": { "type": "array", "items": { "type": "string" } } } }, "GeneralLookupRestObject": { "properties": { "code": { "type": "string" }, "description": { "type": "string" } } }, "IGameStatus": {}, "IPosition": {}, "JobTypeRestObject": { "properties": { "code": { "type": "string" }, "job": { "type": "string" }, "sortOrder": { "type": "integer", "format": "int32" } } }, "PerformerType": {}, "RestObject": {}, "ScheduleEventTypeRestObject": {}, "SituationCodeRestObject": { "properties": { "batting": { "type": "boolean" }, "code": { "type": "string" }, "description": { "type": "string" }, "fielding": { "type": "boolean" }, "navigationMenu": { "type": "string" }, "pitching": { "type": "boolean" }, "sortOrder": { "type": "integer", "format": "int32" }, "team": { "type": "boolean" } } }, "DivisionsRestObject": { "properties": { "divisions": { "type": "array", "items": { "$ref": "#/components/schemas/DivisionRestObject" } } } }, "BaseballDraftLatestRestObject": {}, "BaseballDraftListRestObject": {}, "ProspectListRestObject": {}, "Boxscore": { "properties": { "officials": { "type": "array", "items": { "$ref": "#/components/schemas/OfficialRestObject" } } } }, "GameContextRestObject": { "properties": { "awayTeamWinProbability": { "type": "number", "format": "double", "description": "Away team winning probability" }, "game": { "$ref": "#/components/schemas/ScheduleItemRestObject", "description": "Schedule information about the game" }, "homeTeamWinProbability": { "type": "number", "format": "double", "description": "Home team winning probability" } } }, "GameDataGameRestObject": { "properties": { "pk": { "type": "integer", "format": "int32", "description": "Unique Primary Key Representing a Game" }, "type": { "type": "string", "description": "Type of Game. Available types in /api/v1/gameTypes" } } }, "GameDataRestObject": { "properties": { "datetime": { "$ref": "#/components/schemas/GameDateTimeRestObject", "description": "Summary all date time details" }, "game": { "$ref": "#/components/schemas/GameDataGameRestObject", "description": "Schedule information about the game" }, "status": { "$ref": "#/components/schemas/GameStatusRestObject", "description": "Status and state of the game. Available types in /api/v1/gameStatus" }, "venue": { "$ref": "#/components/schemas/VenueRestObject", "description": "All of the details of a venue" } } }, "GameDateTimeRestObject": { "properties": { "dateTime": { "type": "string", "format": "date-time", "description": "Format: YYYY-MM-DDTHH:MM:SSZ" }, "endDateTime": { "type": "string", "format": "date-time", "description": "Format: YYYY-MM-DDTHH:MM:SSZ" } } }, "GameLiveDataRestObject": { "properties": { "decisions": { "$ref": "#/components/schemas/DecisionRestObject", "description": "All the details about the decisions of a game. Includes, Winner, Loser, and Save" }, "plays": { "$ref": "#/components/schemas/PlayByPlayRestObject", "description": "Includes all details about all the plays of a game" } } }, "GameMetaDataRestObject": { "properties": { "timeStamp": { "type": "string", "description": "Use this parameter to return a snapshot of the data at the specified time. Format: YYYYMMDD_HHMMSS" }, "wait": { "type": "integer", "format": "int32", "description": "Enter an integer for wait time" } } }, "GameRestObject": { "properties": { "gameData": { "$ref": "#/components/schemas/GameDataRestObject", "description": "All the data that doesn't change during a game" }, "gamePk": { "type": "integer", "format": "int32", "description": "Unique Primary Key Representing a Game" }, "link": { "type": "string", "description": "Link to full resource" }, "liveData": { "$ref": "#/components/schemas/GameLiveDataRestObject", "description": "All the data that changes during a game" }, "metaData": { "$ref": "#/components/schemas/GameMetaDataRestObject", "description": "Change list of each version" } } }, "Linescore": {}, "PlayByPlayRestObject": { "properties": { "plays": { "type": "array", "items": { "$ref": "#/components/schemas/PlayRestObject" }, "description": "Includes all details about all the plays of a game" } } }, "ResponseEntity": {}, "Duration": {}, "GamePaceRestObject": { "properties": { "hitsPer9Inn": { "type": "number", "format": "double" }, "hitsPerGame": { "type": "number", "format": "double" }, "hitsPerRun": { "type": "number", "format": "double" }, "inningsPlayedPerGame": { "type": "number", "format": "double" }, "league": { "$ref": "#/components/schemas/LeagueRestObject" }, "pitchersPerGame": { "type": "number", "format": "double" }, "pitchesPer9Inn": { "type": "number", "format": "double" }, "pitchesPerGame": { "type": "number", "format": "double" }, "pitchesPerPitcher": { "type": "number", "format": "double" }, "plateAppearancesPer9Inn": { "type": "number", "format": "double" }, "plateAppearancesPerGame": { "type": "number", "format": "double" }, "runsPer9Inn": { "type": "number", "format": "double" }, "runsPerGame": { "type": "number", "format": "double" }, "season": { "type": "string" }, "sport": { "$ref": "#/components/schemas/SportRestObject" }, "team": { "$ref": "#/components/schemas/TeamRestObject" }, "timePer77PlateAppearances": { "$ref": "#/components/schemas/Duration" }, "timePer7InnGame": { "$ref": "#/components/schemas/Duration" }, "timePer7InnGameWithoutExtraInn": { "$ref": "#/components/schemas/Duration" }, "timePer9Inn": { "$ref": "#/components/schemas/Duration" }, "timePerGame": { "$ref": "#/components/schemas/Duration" }, "timePerHit": { "$ref": "#/components/schemas/Duration" }, "timePerPitch": { "$ref": "#/components/schemas/Duration" }, "timePerPlateAppearance": { "$ref": "#/components/schemas/Duration" }, "timePerRun": { "$ref": "#/components/schemas/Duration" }, "total7InnGames": { "type": "integer", "format": "int32" }, "total7InnGamesCompletedEarly": { "type": "integer", "format": "int32" }, "total7InnGamesScheduled": { "type": "integer", "format": "int32" }, "total7InnGamesWithoutExtraInn": { "type": "integer", "format": "int32" }, "total9InnGames": { "type": "integer", "format": "int32" }, "total9InnGamesCompletedEarly": { "type": "integer", "format": "int32" }, "total9InnGamesScheduled": { "type": "integer", "format": "int32" }, "total9InnGamesWithoutExtraInn": { "type": "integer", "format": "int32" }, "totalExtraInnGames": { "type": "integer", "format": "int32" }, "totalExtraInnTime": { "$ref": "#/components/schemas/Duration" }, "totalGameTime": { "$ref": "#/components/schemas/Duration" }, "totalGames": { "type": "integer", "format": "int32" }, "totalHits": { "type": "integer", "format": "int32" }, "totalInningsPlayed": { "type": "number", "format": "double" }, "totalPitchers": { "type": "integer", "format": "int32" }, "totalPitches": { "type": "integer", "format": "int32" }, "totalPlateAppearances": { "type": "integer", "format": "int32" }, "totalRuns": { "type": "integer", "format": "int32" } } }, "GamePaceWrapperRestObject": { "properties": { "leagues": { "type": "array", "items": { "$ref": "#/components/schemas/GamePaceRestObject" } }, "sports": { "type": "array", "items": { "$ref": "#/components/schemas/GamePaceRestObject" } }, "teams": { "type": "array", "items": { "$ref": "#/components/schemas/GamePaceRestObject" } } } }, "HighLowContainerRestObject": { "properties": { "combinedStats": { "type": "boolean" }, "season": { "type": "string" }, "sortStat": { "$ref": "#/components/schemas/BaseballStatsTypeRestObject" } } }, "HighLowWrapperRestObject": { "properties": { "highLowResults": { "type": "array", "items": { "$ref": "#/components/schemas/HighLowContainerRestObject" } } } }, "BaseballHitDataRestObject": { "properties": { "hardness": { "type": "string" }, "hitProbability": { "type": "number", "format": "double" }, "isBarrel": { "type": "boolean" }, "launchAngle": { "type": "number", "format": "double" }, "launchSpeed": { "type": "number", "format": "double" }, "location": { "type": "string" }, "totalDistance": { "type": "number", "format": "double" }, "trajectory": { "type": "string" } } }, "CoordinatesRestObject": { "properties": { "x": { "type": "number", "format": "double" }, "y": { "type": "number", "format": "double" }, "z": { "type": "number", "format": "double" } } }, "HitSegmentRestObject": { "properties": { "landingData": { "$ref": "#/components/schemas/StartEndDataRestObject" }, "lastMeasuredData": { "$ref": "#/components/schemas/StartEndDataRestObject" }, "launchData": { "$ref": "#/components/schemas/LaunchDataRestObject" }, "reducedConfidence": { "type": "array", "items": { "type": "string" } }, "trajectoryData": { "$ref": "#/components/schemas/HitTrajectoryDataRestObject" } } }, "HitTrajectoryDataRestObject": { "properties": { "hitPositionAt110Feet": { "$ref": "#/components/schemas/CoordinatesRestObject" }, "maxHeightPosition": { "$ref": "#/components/schemas/CoordinatesRestObject" }, "measuredTimeInterval": { "type": "array", "items": { "type": "number", "format": "double" } }, "reducedConfidence": { "type": "array", "items": { "type": "string" } }, "trajectoryPolynomialX": { "type": "array", "items": { "type": "number", "format": "double" } }, "trajectoryPolynomialY": { "type": "array", "items": { "type": "number", "format": "double" } }, "trajectoryPolynomialZ": { "type": "array", "items": { "type": "number", "format": "double" } }, "validTimeInterval": { "type": "array", "items": { "type": "number", "format": "double" } } } }, "HomeRunDerbyBatterHitRestObject": { "properties": { "hitData": { "$ref": "#/components/schemas/HitSegmentRestObject" }, "isBonusTime": { "type": "boolean" }, "isHomeRun": { "type": "boolean" }, "isTieBreaker": { "type": "boolean" }, "tieBreakerNum": { "type": "integer", "format": "int32" }, "timeRemaining": { "type": "string" } } }, "HomeRunDerbyMatchupRestObject": { "properties": { "bottomSeed": { "$ref": "#/components/schemas/HomeRunDerbyRoundBatterRestObject" }, "topSeed": { "$ref": "#/components/schemas/HomeRunDerbyRoundBatterRestObject" } } }, "HomeRunDerbyRestObject": { "properties": { "info": { "$ref": "#/components/schemas/ScheduleEventRestObject" }, "players": { "type": "array", "items": { "$ref": "#/components/schemas/PersonRestObject" } }, "rounds": { "type": "array", "items": { "$ref": "#/components/schemas/HomeRunDerbyRoundRestObject" } }, "status": { "$ref": "#/components/schemas/HomeRunDerbyStatusRestObject" } } }, "HomeRunDerbyRoundBatterRestObject": { "properties": { "hits": { "type": "array", "items": { "$ref": "#/components/schemas/HomeRunDerbyBatterHitRestObject" } }, "isComplete": { "type": "boolean" }, "isStarted": { "type": "boolean" }, "isWinner": { "type": "boolean" }, "numHomeRuns": { "type": "integer", "format": "int32" }, "player": { "$ref": "#/components/schemas/PersonRestObject" }, "seed": { "type": "integer", "format": "int32" }, "topDerbyHitData": { "$ref": "#/components/schemas/BaseballHitDataRestObject" } } }, "HomeRunDerbyRoundRestObject": { "properties": { "batters": { "type": "array", "items": { "$ref": "#/components/schemas/HomeRunDerbyRoundBatterRestObject" } }, "matchups": { "type": "array", "items": { "$ref": "#/components/schemas/HomeRunDerbyMatchupRestObject" } }, "numBatters": { "type": "integer", "format": "int32" }, "round": { "type": "integer", "format": "int32" } } }, "HomeRunDerbyStatusRestObject": { "properties": { "bonusTime": { "type": "boolean" }, "clockStopped": { "type": "boolean" }, "currentBatter": { "$ref": "#/components/schemas/PersonRestObject" }, "currentRound": { "type": "integer", "format": "int32" }, "currentRoundInProgress": { "type": "boolean" }, "currentRoundTimeLeft": { "type": "string" }, "inTieBreaker": { "type": "boolean" }, "scheduledRounds": { "type": "integer", "format": "int32" }, "state": { "type": "string" }, "tieBreakerNum": { "type": "integer", "format": "int32" } } }, "LaunchDataRestObject": { "properties": { "angle": { "type": "number", "format": "double" }, "direction": { "type": "number", "format": "double" }, "speed": { "type": "number", "format": "double" }, "spinAxis": { "type": "number", "format": "double" }, "spinRate": { "type": "number", "format": "double" } } }, "ScheduleEventRestObject": {}, "StartEndDataRestObject": { "properties": { "bearing": { "type": "number", "format": "double" }, "distance": { "type": "number", "format": "double" }, "speed": { "type": "number", "format": "double" } } }, "CopyrightResponseEntity": {}, "AdditionalBiosRestObject": {}, "BaseballTeamRestObject": {}, "FreeAgentListRestObject": { "properties": { "freeAgents": { "type": "array", "items": { "$ref": "#/components/schemas/FreeAgentRestObject" } }, "season": { "type": "string" } } }, "FreeAgentRestObject": { "properties": { "dateDeclared": { "type": "string", "format": "date-time" }, "dateSigned": { "type": "string", "format": "date-time" }, "newTeam": { "$ref": "#/components/schemas/BaseballTeamRestObject" }, "notes": { "type": "string" }, "originalTeam": { "$ref": "#/components/schemas/BaseballTeamRestObject" }, "player": { "$ref": "#/components/schemas/BaseballPersonRestObject" }, "position": { "$ref": "#/components/schemas/PositionRestObject" }, "sortOrder": { "type": "integer", "format": "int32" }, "url": { "type": "string" } } }, "PeopleRestObject": { "properties": { "people": { "type": "array", "items": { "$ref": "#/components/schemas/PersonRestObject" } } } }, "StatsRestObject": { "properties": { "stats": { "type": "array", "items": { "$ref": "#/components/schemas/StatContainerRestObject" } } } }, "PostseasonScheduleRestObject": {}, "SeasonsRestObject": { "properties": { "seasons": { "type": "array", "items": { "$ref": "#/components/schemas/SeasonRestObject" } } } }, "SportsRestObject": { "properties": { "sports": { "type": "array", "items": { "$ref": "#/components/schemas/SportRestObject" } } } }, "StandingsRestObject": { "properties": { "lastUpdated": { "type": "string", "format": "date-time" }, "records": { "type": "array", "items": { "$ref": "#/components/schemas/TeamStandingsRecordContainerRestObject" } } } }, "TeamStandingsRecordContainerRestObject": { "properties": { "aggregateRecord": { "$ref": "#/components/schemas/TeamStandingsRecordRestObject" }, "conference": { "$ref": "#/components/schemas/ConferenceRestObject" }, "division": { "$ref": "#/components/schemas/DivisionRestObject" }, "lastUpdated": { "type": "string", "format": "date-time" }, "league": { "$ref": "#/components/schemas/LeagueRestObject" }, "organization": { "$ref": "#/components/schemas/TeamRestObject" }, "sport": { "$ref": "#/components/schemas/SportRestObject" }, "standingsType": { "type": "string" }, "teamRecords": { "type": "array", "items": { "$ref": "#/components/schemas/TeamStandingsRecordRestObject" } } } }, "LeagueLeaderContainerRestObject": { "properties": { "leagueLeaders": { "type": "array", "items": { "$ref": "#/components/schemas/LeadersRestObject" } } } }, "StatStreaksRestObject": {}, "StolenBaseFootIncrementRestObject": {}, "StolenBaseProbabilityRestObject": { "properties": { "endColor": { "type": "string" }, "footMarkers": { "type": "array", "items": { "$ref": "#/components/schemas/StolenBaseFootIncrementRestObject" } }, "startColor": { "type": "string" } } }, "TeamLeaderContainerRestObject": { "properties": { "teamLeaders": { "type": "array", "items": { "$ref": "#/components/schemas/LeadersRestObject" } } } }, "TeamsRestObject": { "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamRestObject" } } } }, "CopyrightResponseEntity_AttendanceRestObject_": {}, "CopyrightResponseEntity_AwardsRestObject_": {}, "Collection_string_": {}, "CopyrightResponseEntity_GameContentRestObject_": {}, "CopyrightResponseEntity_ScheduleRestObject_": {}, "CopyrightResponseEntity_GamePaceWrapperRestObject_": {}, "CopyrightResponseEntity_RosterRestObject_": {}, "CopyrightResponseEntity_AdditionalBiosRestObject_": {}, "CopyrightResponseEntity_PeopleRestObject_": {}, "CopyrightResponseEntity_StatsRestObject_": {}, "CopyrightResponseEntity_StolenBaseProbabilityRestObject_": {}, "CopyrightResponseEntity_TeamsRestObject_": {} } } }