0

List of all NFL players

I'm trying to get a list of all NFL players in the Yahoo Fantasy Sports database, but it only seems to return 25 players, even if I use YQL's pagination mechanisms (LIMIT, OFFSET, etc.). For example, if I set OFFSET to 26 and LIMIT to 10, it returns 0 results. Anything after the 25th result is not returned. Is it just not possible to get the entire list of players or am I missing something?

Thanks.

by
5 Replies
  • Kevin,
    Did you ever figure this out?  I'm trying to work through the same problem.

    Thanks,
    Tim
    0
  • Change the start location and loop through from 0...5000 or so.

    http://fantasysports.yahooapis.com/fantasy/v2/league/<ID>/players;start={$start}/stats

    0
  • Anyone else ever figure this out?  Couldn't get this to work using 'start', which brought me to this discussion.  Had the same issue using 'count'.  Only got 25 results, regardless of how many requested.

    http://fantasysports.yahooapis.com/fantasy/v2/league/<ID>/players;start=50

    http://fantasysports.yahooapis.com/fantasy/v2/league/<ID>/players;count=500
    0
  • There's some annoying legal stuff that forces us to only let you get 25 players at a time. So the way you'd paginate through it would be to increment your start value by 25 each time. Of course, if you just need to pull out a certain list of top players, it would probably make more sense to make use of the sort and filter parameters.

    http://developer.yahoo.com/fantasysports/guide/players-collection.html
    0
  • This is great stuff to know, and I think it's an important detail to add in the docs describing the players container.

    0

Recent Posts

in Fantasy Sports API