ESPN Athletes Data
Athletes
Gettin’ to know your favorite players
-
The ESPN Athlete API allows you to get rosters of players for various sports, as well as biographical and statistical data for individual athletes.
This API is currently a version 1 (/v1/) release.
Availability Public Partner Premium Partner ESPN This API is great for:
- Player applications
- Head-to-head player comparisons
- Enhancing game applications
- Enhancing team applications
-
The ESPN Athletes API accepts a GET request.
Athlete information is available for most major sports.
Please refer to the Availability column in the documentation to confirm what team information and statistics are available to you, depending on your developer status (public, partner, or ESPN).
The format of an API request is as follows:
http://api.espn.com/:version/:resource/:method?apikey=:yourkeySample Athletes Requests
Action URI Description GET http://api.espn.com/v1/sports/baseball/mlb/athletes All MLB players for the current season. GET http://api.espn.com/v1/sports/baseball/mlb/athletes/teams/2 All MLB players for a specific team. Subject to access tier. GET http://api.espn.com/v1/sports/baseball/mlb/athletes?groups=1 All MLB players in a specific division. GET http://api.espn.com/v1/sports/baseball/mlb/athletes/3748 Data for a specific MLB athlete. GET http://api.espn.com/v1/sports/soccer/eng.1/athletes Data for a specific Barclay's Premier League athlete. GET http://api.espn.com/v1/sports/baseball/mlb/athletes/3748/dates/2011?enable=stats,competitors&seasontype=reg Specific athlete's full season stats and teams played on for the 2011 regular season. Subject to access tier. GET http://api.espn.com/v1/sports/baseball/mlb/athletes/3748/dates/2011?enable=stats,competitors&seasontype=reg&lang=es Specific athlete's full season stats and teams played on for the 2011 regular season, with optional Spanish translation enabled. Subject to access tier. -
Quick Navigation
Resources
Back to topResource Name Description
Availabilitypublic partner premium
partnerespn /sports/baseball/mlb Major League Baseball (MLB) /sports/basketball/mens-college-basketball NCAA Men's College Basketball /sports/basketball/nba National Basketball Association (NBA) /sports/basketball/wnba Women's National Basketball Association /sports/basketball/womens-college-basketball NCAA Women's College Basketball /sports/football/college-football NCAA College Football /sports/football/nfl National Football League (NFL) /sports/golf Professional golf /sports/golf/eur European Tour Golf /sports/golf/ntw Nationwide Golf Tour /sports/golf/pga Professional Golf Association /sports/golf/sga Senior Golf Association /sports/hockey/nhl National Hockey League (NHL) /sports/racing/f1 Formula 1 Racing /sports/racing/irl IndyCar Racing League /sports/racing/nascar NASCAR Racing /sports/soccer/:leagueName Specific professional soccer league. Use a helper API call for a complete list of supported soccer leagues. /sports/tennis Professional tennis /sports/tennis/atp Association of Tennis Professionals /sports/tennis/wta Women's Tennis Association Methods
Back to topURI Parameters
Back to top -
Quick Navigation
- Returned Data
- General Stats Extension
- College Basketball (Men) Stats Extension
- College Football Stats Extension
- College Football Recruiting Extension
- Golf Stats Extension
- MLB Stats Extension
- NBA Stats Extension
- NFL Stats Extension
- NHL Stats Extension
- Racing Stats Extension
- Soccer Stats Extension
- Tennis Stats Extension
- Sample Response
Returned Data
Requests to this API return the following information.
Back to topElement Description
Availabilitypublic partner premium
partnerespn sports A collection of sports associated with the request, e.g. "baseball." Contains a leagues collection and also has the following properties: name The name of the sport, e.g. "Baseball." id the ID of the sport in the ESPN API. leagues Collection within 'sports' that contains the following properties: id the ID of the sport in ESPN's meta-tagging system. groupId The ID, unique to the selected organizing body, of the conference/division being used. name the name of the league/conference/division, e.g. "American League East." shortName Shorter version of the league/conference/division name. abbreviation the abbreviation for the league/conference/division, e.g. "al" for "American League." athletes Collection of athlete objects within 'leagues' containing all the properties below: id The athlete's ID within that sport. alternateId The athlete's alternate ID within ESPN's systems. Not available for tennis or golf. firstName The athlete's first name. lastName The athlete's last name. fullName The athlete's full (proper) name. displayName The athlete's name as most commonly displayed. shortName Short version of the athlete's name, typically for display in box scores are other areas where space is limited. weight The athlete's weight in lbs. NCAAFB
NCAABBNCAAFB
NCAABBheight The athlete's height in inches. NCAAFB
NCAABBNCAAFB
NCAABBhand The athlete's dominant hand, i.e. "L" or "R". Not available for all sports. jersey The athlete's uniform number, if applicable. NCAAFB
NCAABBNCAAFB
NCAABBdateOfBirth The athlete's birthdate. NCAAFB
NCAABBNCAAFB
NCAABBage The athlete's current age. NCAAFB
NCAABBNCAAFB
NCAABBbirthPlace Object containing data on where the athlete was born. Properties include: NCAAFB
NCAABBNCAAFB
NCAABBcity City where the athlete was born, e.g. "Miami." NCAAFB
NCAABBNCAAFB
NCAABBstate State where the athlete was born, e.g. "Florida." NCAAFB
NCAABBNCAAFB
NCAABBcountry Country where the athlete was born, e.g. "USA." NCAAFB
NCAABBNCAAFB
NCAABBcountry Object containing data on the athlete's native country. Contains the following properties: id The unique ID for the country in ESPN's systems. abbreviation Text abbreviation for the country, e.g. "USA." flags If enabled, returns a collection of country flag images containing href, width, and height attributes. schools Object containing data on schools that the athlete attended/currently attends. Not available for all sports. Properties include: NCAAFB
NCAABBNCAAFB
NCAABBid ID of the school in ESPN's systems. NCAAFB
NCAABBNCAAFB
NCAABBname String representation of the school name. NCAAFB
NCAABBNCAAFB
NCAABBrookieYear The athlete's first professional year playing the sport. experience Number of full seasons the athlete has played at their competitive level (i.e. pro/college). Not available for tennis/racing/golf/soccer. athleteStatusId ID corresponding to the athlete's status on the team. Possible values are: 1 Active 2 Inactive/Retired 3 Disabled 4 Minors 5 Suspended 6 Bereavement 7 Not with team 8 Minors 9 Free Agent 10 Disabled/60 11 Non-roster invite athleteStatus Text representation of the athlete's current status. injuryStatusId ID corresponding to the athlete's specific injury, if applicable. Possibles values are: 0 Active 1 Probable 2 Questionable 3 Doubtful 4 Out 5 Injured reserve 6 Day-to-day 10 15-day disabled list 11 60-day disabled list injuryStatus Text representation of the athlete's current injury status, if applicable. headshots Collection of athlete headshots as specified below, each containing href, width, and height attributes. Soccer, recruiting, and WNBA not currently supported. Note: clients apps must be responsible for handling missing headshots as not every athlete has one. full 600x436 athlete headshot xlarge 350x254 athlete headshot large 65x90 athlete headshot medium 43x60 athlete headshot small 34x48 athlete headshot xsmall 28x38 athlete headshot fantasy 200x145 athlete headshot team Team object with basic properties (if athlete competes in a team sport) indicating their team for the time period selected. gamecast 120x90 athlete headshot positions Array of position objects containing data on what position the athlete plays (if a team sport). These are ranked in order of importance. Properties include: id ID corresponding the to athlete's position abbreviation Abbreviation used for the position, e.g. "SP" for starting pitcher in baseball. name Full text representation of the athlete's position, e.g. "Starting Pitcher." positionsPlayed Collection of position objects denoting the positions the athlete has played during the given season (if a team sport). Properties include: id ID corresponding the to athlete's position. abbreviation Abbreviation used for the position, e.g. "SP" for starting pitcher in baseball. name Full text representation of the athlete's position, e.g. "Starting Pitcher." links Collection of relevant API endpoints and canonical URLs for the athlete. The following tables outline the statistics returned for various sports when the "statistics" property is enabled.
General Stats Extension
Back to topCollege Football Stats Extension
Back to topCollege Football Recruiting Extension
The following data is enabled when a request is made to any of the /recruits methods.
Back to topGolf Stats Extension
Back to topMen's College Basketball Stats Extension
Back to topMLB Stats Extension
Back to topNBA Stats Extension
Back to topNFL Stats Extension
Back to topNHL Stats Extension
Back to topRacing Stats Extension
Back to topSoccer Stats Extension
Back to topTennis Stats Extension
Back to topStat Category Stat Name
Availabilitypublic partner premium
partnerespn generalStatistics Misc. statistics for the athlete. prizeMoney singlesTitles doublesTitles singlesWon singlesLost Sample Response
Back to topXMLThe following XML output was rendered with a public key calling:
http://api.espn.com/v1/sports/hockey/nhl/athletes/3114?_accept=text/xml&apikey=:yourkey.JSONThe following JSON output was rendered with a public key calling:
http://api.espn.com/v1/sports/hockey/nhl/athletes/3114?apikey=:yourkey. -
Sample Code
Coming soon.