Players collection

Description

With the Players API, you can obtain information from a collection of players simultaneously. To obtains general players information, the players collection can be qualified in the URI by a particular game, league or team. To obtain specific league or team related information, the players collection is qualified by the relevant league or team. Each element beneath the Players Collection will be a Player Resource

HTTP Operations Supported

  • GET

URIs

URI Description Sample
http://fantasysports.yahooapis.com/fantasy/v2/league/{league_key}/players Fetch all players within a league.

http://fantasysports.yahooapis.com/fantasy/v2/league/223.l.431/players

http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys={league_key1},{league_key2}/players Fetch all players from the leagues {league_key1} and {league_key2}

http://fantasysports.yahooapis.com/fantasy/v2/leagues;league_keys=223.l.431,223.l.21821/players

http://fantasysports.yahooapis.com/fantasy/v2/team/{team_key}/players Fetch all players within a team.

http://fantasysports.yahooapis.com/fantasy/v2/team/223.l.431.t.1/players

http://fantasysports.yahooapis.com/fantasy/v2/teams;team_keys={team_key1},{team_key2}/players Fetch all players from the teams {team_key1} and {team_key2}

http://fantasysports.yahooapis.com/fantasy/v2/teams;team_keys=223.l.431.t.1,223.l.431.t.2/players

http://fantasysports.yahooapis.com/fantasy/v2/players;player_keys={player_key1},{player_key2} Fetch specific players {player_key1} and {player_key2}

http://fantasysports.yahooapis.com/fantasy/v2/players;player_keys=223.p.5479,223.p.1025

Any sub-resource valid for a player is a valid sub-resource under the players collection.

Any sub-resource for a collection of players is extracted using a URI like:

/players/{sub_resource}

OR

/players;player_keys={player_key1},{player_key2}/{sub_resource}

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

/players;out={sub_resource_1},{sub_resource_2}

OR

/players;player_keys={player_key1},{player_key2};out={sub_resource_1},{sub_resource_2}

Filters

The players collection can have filters such as the following to obtain a subset of a players collection that satisfy the filtering condition. The filters can be combined to obtain a more restricted list of players.

Filter parameter Filter parameter values Usage
position Valid player positions /players;position=QB

Note

Applied only in a league's context
status

A (all available players)

FA (free agents only)

W (waivers only)

T (all taken players)

K (keepers only)

/players;status=A

Note

Applied only in a league's context
search

player name

/players;search=smith

Note

Applied only in a league's context
sort

{stat_id}

NAME (last, first)

OR (overall rank)

AR (actual rank)

PTS (fantasy points)

/players;sort=60

Note

Applied only in a league's context
sort_type

season

date (baseball, basketball, and hockey only)

week (football only)

lastweek (baseball, basketball, and hockey only)

lastmonth

/players;sort_type=season

Note

Applied only in a league's context
sort_season

year

/players;sort_type=season;sort_season=2010

Note

Applied only in a league's context
sort_date (baseball, basketball, and hockey only)

YYYY-MM-DD

/players;sort_type=date;sort_date=2010-02-01

Note

Applied only in a league's context
sort_week (football only)

week

/players;sort_type=week;sort_week=10

Note

Applied only in a league's context
start Any integer 0 or greater /players;start=25
count Any integer greater than 0 /players;count=5

Table of Contents