Player resource

Description

With the Player API, you can obtain the player (athlete) related information, such as their name, professional team, and eligible positions. The player is identified in the context of a particular game, and can be requested as the base of your URI by using the global player_key.

HTTP Operations Supported

  • GET

URIs

http://fantasysports.yahooapis.com/fantasy/v2/player/{player_key}

Any sub-resource under a player is extracted using a URI like:

http://fantasysports.yahooapis.com/fantasy/v2/player/{player_key}/{sub_resource}

Multiple sub-resources can be extracted from player in the same URI using a format like:

http://fantasysports.yahooapis.com/fantasy/v2/player/{player_key};out={sub_resource_1},{sub_resource_2}

Player key format

{game_key}.p.{player_id}

Example: pnfl.p.5479 or 223.p.5479

Sub-resources

Default sub-resource: metadata

Name Description URI Sample

metadata

Includes player key, id, name, editorial information, image, eligible positions, etc.

/fantasy/v2/player/{player_key}/metadata

Drew Brees's info in the 2009 season:

http://fantasysports.yahooapis.com/fantasy/v2/player/223.p.5479

stats Player stats and points (if in a league context).

Season stats: /fantasy/v2/player/{player_key}/stats

Week stats: /fantasy/v2/player/{player_key}/stats;type=week;week={week}

Here {week} is a non-zero integer.

Drew Brees's info and stats in the 2009 season:

http://fantasysports.yahooapis.com/fantasy/v2/player/223.p.5479/stats

ownership The player ownership status within a league (whether they're owned by a team, on waivers, or free agents). Only relevant within a league.

/fantasy/v2/league/{league_key}/players;player_keys={player_key}/ownership

http://fantasysports.yahooapis.com/fantasy/v2/league/223.l.431/players;player_keys=223.p.5479/ownership

percent_owned Data about ownership percentage of the player

/fantasy/v2/player/{player_key}/percent_owned

The percentage of leagues in which Drew Brees was owned in the 2009 game:

http://fantasysports.yahooapis.com/fantasy/v2/player/223.p.5479/percent_owned

draft_analysis Average pick, Average round and Percent Drafted.

/fantasy/v2/player/{player_key}/draft_analysis

Yahoo! fantasy draft information for Drew Brees in 2009:

http://fantasysports.yahooapis.com/fantasy/v2/player/223.p.5479/draft_analysis

Sample XML

http://fantasysports.yahooapis.com/fantasy/v2/league/223.l.431/players;player_keys=223.p.5479 - Player in a NFL league context

http://fantasysports.yahooapis.com/fantasy/v2/league/223.l.431/players;player_keys=223.p.5479/stats - Player season stats in a NFL league context

Table of Contents