0

Where can I get public league keys?

Hi,

Can anyone provide me or tell me where to get public league keys for the various sports so I can check out the API?
I can only find keys for Football, and would like to have some for Baseball and Basketball.


Thank You.

by
  • DQ
  • Jan 17, 2011
6 Replies
  • QUOTE (David Queirós @ Jan 17 2011, 03:49 AM) <{POST_SNAPBACK}>
    Hi,

    Can anyone provide me or tell me where to get public league keys for the various sports so I can check out the API?
    I can only find keys for Football, and would like to have some for Baseball and Basketball.


    Thank You.

    Going to the leaderboard within the site is typically easiest. It'll be linked from the top navigation of the game as long as the game is in season. Examples for:

    NFL: http://football.fantasysports.yahoo.com/f1/leaderboard
    NBA: http://basketball.fantasysports.yahoo.com/nba/leaderboard
    NHL: http://hockey.fantasysports.yahoo.com/hockey/leaderboard

    The only teams/leagues that show up on the leaderboard will be public ones.
    0
  • Thanks!

    I can only find leagues with scoring type roto and head. What should I expect when it is a points league?
    0
  • There's no such thing as a "public" points league (as we only offer public leagues for the two most popular scoring types, head and roto), but they should look very similar to roto leagues in form, with the exceptions that there will not be per-category point scores at the team level, and there will be per-player points elements included when you ask for stats. A few other differences as well, but most of it generally follows from the structure of the scoring type, if you're familiar with it.

    Sample XML for a somewhat typical Basketball points league:

    CODE
    Request: http://fantasysports.yahooapis.com/fantasy/v2/league/nba.l.xxxx/teams;out=stats/roster/players;out=stats

    <?xml version="1.0" encoding="UTF-8"?>
    <fantasy_content xmlns="http://fantasysports.yahooapis.com/fantasy/v2/base.rng" xml:lang="en-US" yahoo:uri="http://fantasysports.yahooapis.com/fantasy/v2/league/nba.l.xxxx/teams;out=stats/roster/players;out=stats" xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" time="539.68811035156ms" copyright="Data provided by Yahoo! and STATS, LLC">
    <league>
    <league_key>249.l.xxxx</league_key>
    <league_id>xxxx</league_id>
    <name>XXXXXXXXXXXXXXX</name>
    <url>http://basketball.fantasysports.yahoo.com/nba/xxxx</url>
    <password>xxxxxxx</password>

    <draft_status>postdraft</draft_status>
    <num_teams>10</num_teams>
    <edit_key>2011-01-29</edit_key>
    <weekly_deadline/>
    <current_week>14</current_week>
    <start_week/>
    <end_week>24</end_week>

    <league_update_timestamp>1296201305</league_update_timestamp>
    <teams count="10">
    <team>
    <team_key>249.l.xxxx.t.1</team_key>
    <team_id>1</team_id>
    <name>XXXXXXXXXXX</name>
    <url>http://basketball.fantasysports.yahoo.com/nba/xxxx/1</url>

    <team_logos>
    <team_logo>
    <size>medium</size>
    <url>http://a323.yahoofs.com/coreid/49bc3df6if92zul1sp1/Pw6Q3FM1dKHJxbhOS7JeH3Q-/1/xxxxxxxxxxxx</url>
    </team_logo>
    </team_logos>
    <managers>
    <manager>

    <manager_id>1</manager_id>
    <nickname>XXXXXXXXX</nickname>
    <guid>XXXXXXXXXXXXXXXXXXXXXXXXx</guid>
    <is_commissioner>1</is_commissioner>
    </manager>
    </managers>
    <team_stats>

    <coverage_type>season</coverage_type>
    <season>2010</season>
    <stats>
    <stat>
    <stat_id>12</stat_id>
    <value>9302</value>
    </stat>

    <stat>
    <stat_id>13</stat_id>
    <value>712</value>
    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>2830</value>

    </stat>
    <stat>
    <stat_id>16</stat_id>
    <value>1829</value>
    </stat>
    <stat>
    <stat_id>17</stat_id>

    <value>485</value>
    </stat>
    <stat>
    <stat_id>18</stat_id>
    <value>229</value>
    </stat>
    <stat>

    <stat_id>19</stat_id>
    <value>1200</value>
    </stat>
    </stats>
    </team_stats>
    <team_points>
    <coverage_type>season</coverage_type>

    <season>2010</season>
    <total>15896.00</total>
    <stats>
    <stat>
    <stat_id>12</stat_id>
    <value>9302.00</value>
    </stat>

    <stat>
    <stat_id>13</stat_id>
    <value>178.00</value>
    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>2830.00</value>

    </stat>
    <stat>
    <stat_id>16</stat_id>
    <value>3658.00</value>
    </stat>
    <stat>
    <stat_id>17</stat_id>

    <value>970.00</value>
    </stat>
    <stat>
    <stat_id>18</stat_id>
    <value>458.00</value>
    </stat>
    <stat>

    <stat_id>19</stat_id>
    <value>-1500.00</value>
    </stat>
    </stats>
    </team_points>
    <roster>
    <coverage_type>date</coverage_type>

    <date>2011-01-28</date>
    <players count="16">
    <player>
    <player_key>249.p.4390</player_key>
    <player_id>4390</player_id>
    <name>
    <full>Russell Westbrook</full>

    <first>Russell</first>
    <last>Westbrook</last>
    <ascii_first>Russell</ascii_first>
    <ascii_last>Westbrook</ascii_last>
    </name>
    <editorial_player_key>nba.p.4390</editorial_player_key>

    <editorial_team_key>nba.t.25</editorial_team_key>
    <editorial_team_full_name>Oklahoma City Thunder</editorial_team_full_name>
    <editorial_team_abbr>OKC</editorial_team_abbr>
    <uniform_number>0</uniform_number>
    <display_position>PG</display_position>
    <image_url>http://l.yimg.com/a/i/us/sp/v/nba/players_l/20101116/4390.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=165&amp;hc=215&amp;q=100&amp;sig=1NkaRf.eUFNRMIOVwVmkyQ--</image_url>

    <is_undroppable>0</is_undroppable>
    <eligible_positions>
    <position>PG</position>
    <position>G</position>
    <position>Util</position>
    </eligible_positions>
    <has_player_notes>1</has_player_notes>

    <selected_position>
    <coverage_type>date</coverage_type>
    <date>2011-01-28</date>
    <position>PG</position>
    </selected_position>
    <player_stats>
    <coverage_type>season</coverage_type>

    <season>2010</season>
    <stats>
    <stat>
    <stat_id>12</stat_id>
    <value>1008</value>
    </stat>
    <stat>

    <stat_id>13</stat_id>
    <value>71</value>
    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>223</value>
    </stat>

    <stat>
    <stat_id>16</stat_id>
    <value>376</value>
    </stat>
    <stat>
    <stat_id>17</stat_id>
    <value>88</value>

    </stat>
    <stat>
    <stat_id>18</stat_id>
    <value>19</value>
    </stat>
    <stat>
    <stat_id>19</stat_id>

    <value>173</value>
    </stat>
    </stats>
    </player_stats>
    <player_points>
    <coverage_type>season</coverage_type>
    <season>2010</season>

    <total>1998.5</total>
    </player_points>
    </player>
    <player>
    <player_key>249.p.3843</player_key>
    <player_id>3843</player_id>
    <name>

    <full>Kevin Martin</full>
    <first>Kevin</first>
    <last>Martin</last>
    <ascii_first>Kevin</ascii_first>
    <ascii_last>Martin</ascii_last>
    </name>

    <editorial_player_key>nba.p.3843</editorial_player_key>
    <editorial_team_key>nba.t.10</editorial_team_key>
    <editorial_team_full_name>Houston Rockets</editorial_team_full_name>
    <editorial_team_abbr>Hou</editorial_team_abbr>
    <uniform_number>12</uniform_number>
    <display_position>SG</display_position>

    <image_url>http://l.yimg.com/a/i/us/sp/v/nba/players_l/20101116/3843.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=165&amp;hc=215&amp;q=100&amp;sig=F9aIgr8H.rVVFwK5oAwICw--</image_url>
    <is_undroppable>0</is_undroppable>
    <eligible_positions>
    <position>SG</position>

    <position>G</position>
    <position>Util</position>
    </eligible_positions>
    <has_player_notes>1</has_player_notes>
    <has_recent_player_notes>1</has_recent_player_notes>
    <selected_position>
    <coverage_type>date</coverage_type>

    <date>2011-01-28</date>
    <position>SG</position>
    </selected_position>
    <player_stats>
    <coverage_type>season</coverage_type>
    <season>2010</season>
    <stats>

    <stat>
    <stat_id>12</stat_id>
    <value>1071</value>
    </stat>
    <stat>
    <stat_id>13</stat_id>
    <value>17</value>

    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>138</value>
    </stat>
    <stat>
    <stat_id>16</stat_id>

    <value>106</value>
    </stat>
    <stat>
    <stat_id>17</stat_id>
    <value>39</value>
    </stat>
    <stat>

    <stat_id>18</stat_id>
    <value>7</value>
    </stat>
    <stat>
    <stat_id>19</stat_id>
    <value>100</value>
    </stat>

    </stats>
    </player_stats>
    <player_points>
    <coverage_type>season</coverage_type>
    <season>2010</season>
    <total>1392.25</total>
    </player_points>

    </player>
    <player>
    <player_key>249.p.3407</player_key>
    <player_id>3407</player_id>
    <name>
    <full>Jamal Crawford</full>
    <first>Jamal</first>

    <last>Crawford</last>
    <ascii_first>Jamal</ascii_first>
    <ascii_last>Crawford</ascii_last>
    </name>
    <editorial_player_key>nba.p.3407</editorial_player_key>
    <editorial_team_key>nba.t.1</editorial_team_key>

    <editorial_team_full_name>Atlanta Hawks</editorial_team_full_name>
    <editorial_team_abbr>Atl</editorial_team_abbr>
    <uniform_number>11</uniform_number>
    <display_position>PG,SG</display_position>
    <image_url>http://l.yimg.com/a/i/us/sp/v/nba/players_l/20101116/3407.jpg?x=46&amp;y=60&amp;xc=1&amp;yc=1&amp;wc=165&amp;hc=215&amp;q=100&amp;sig=gQaGvXs.u5u1uA2..ofLTw--</image_url>

    <is_undroppable>0</is_undroppable>
    <eligible_positions>
    <position>PG</position>
    <position>SG</position>
    <position>G</position>
    <position>Util</position>

    </eligible_positions>
    <selected_position>
    <coverage_type>date</coverage_type>
    <date>2011-01-28</date>
    <position>G</position>
    </selected_position>
    <player_stats>

    <coverage_type>season</coverage_type>
    <season>2010</season>
    <stats>
    <stat>
    <stat_id>12</stat_id>
    <value>646</value>
    </stat>

    <stat>
    <stat_id>13</stat_id>
    <value>12</value>
    </stat>
    <stat>
    <stat_id>15</stat_id>
    <value>76</value>

    </stat>
    <stat>
    <stat_id>16</stat_id>
    <value>140</value>
    </stat>
    <stat>
    <stat_id>17</stat_id>

    <value>34</value>
    </stat>
    <stat>
    <stat_id>18</stat_id>
    <value>8</value>
    </stat>
    <stat>

    <stat_id>19</stat_id>
    <value>79</value>
    </stat>
    </stats>
    </player_stats>
    <player_points>
    <coverage_type>season</coverage_type>

    <season>2010</season>
    <total>990.25</total>
    </player_points>
    </player>
    ...
    0
  • Ok, I get it now.

    Still, in the league settings, what is the value on the scoring_type xml parameter, head or roto?


    Thanks
    0
  • QUOTE (dqueiros@... @ Feb 1 2011, 01:14 AM) <{POST_SNAPBACK}>
    Ok, I get it now.

    Still, in the league settings, what is the value on the scoring_type xml parameter, head or roto?


    Thanks

    Possible values:

    head: standard H2H (for NBA, NHL, and MLB, this is H2H based on stat category wins. For NFL, this is basically H2H points)
    headone: Just like "head", but instead of earning stat category wins/losses per week, you just get one win/loss. ie, doesn't matter if you win 5-4 or 9-0, you still only get one more win in the standings columns.
    headpoint: H2H where the weekly winner is determined by how many points you earn in the week (based on stat modifiers on stat categories).
    roto: Rotisserie.
    point: Points-based (based on stat modifiers on stat categories)
    0

  • QUOTE(Sean Montgomery @ 21 Jan 2011 12:55 AM)
    Going to the leaderboard within the site is typically easiest. It'll be linked from the top navigation of the game as long as the game is in season.
    What can you do AFTER the season? Is there an easy way to collect public league keys from previous years? Thanks.
    0

Recent Posts

in Fantasy Sports API