Stats v2.0

Summary
Stats
Resource
StatsPlayers stats by timeframe and period.
Change Log
January 15, 2013
HTTP Methods
GETRetrieve stats for a specified timeframe and period.
Exceptions
Following list of exceptions will be returned.
Example
Retrieve Stats
XML field definitions
/player_statsA container element for the list of players whose stats are returned.
/player_stats/playerA container element for a player’s stats.
/player_stats/player/@idThe ID of the player.
/player_stats/player/statsA container element for the list of the player’s stats.
/player_stats/player/stats/statAn individual stat for the player.
/player_stats/player/stats/stat/@abbrThe abbreviation of the stats category.

Resource

Stats

Description

Players stats by timeframe and period.

Change Log

January 15, 2013

  • Rename param player_ids to player_id
  • Change multiple player_id from ‘:’ delimited list to comma-delimited list
  • Add exceptions

HTTP Methods

GET

Retrieve stats for a specified timeframe and period.

URL

http://api.cbssports.com/fantasy/stats?version=2.0

Parameters

response_format(optional) Specifies the format in which the requested resource should be returned.  Valid values are XML and JSON.  The default is XML.
timeframeYear for which stats are being requested.  Timeframe can be any year from 1997 to current year in the YYYY format.
periodPeriod for which stats are being requested Period can be one of the following values.
  • ytd (Year-to-Date)
  • 3yr (Last 3 Years Average)
  • any period number for current year
  • projections
  • any date in YYYYMMDD format
player_idA list of ‘,’ delimited player IDs whose stats are being requested (optional - defaults to all players)

Exceptions

Following list of exceptions will be returned.

  • type: invalid_parameter, msg: Invalid timeframe: <timeframe>
  • type: invalid_parameter, msg: Invalid period: <period>
  • type: invalid_player_id, msg: Invalid player_id <player_id>

Example

Retrieve Stats

Sample URL

http://api.cbssports.com/fantasy/stats?version=2.0&timeframe=2012&period=season&player_id=223571,132668

XML Response

<?xml version="1.0"?>
<result uriAlias="/stats" uri="/stats" statusCode="200" statusMessage="OK">
  <body><player_stats>
<player id="132668">
<stats>
<stat abbr="SB-CS">9</stat>
<stat abbr="BB">16</stat>
<stat abbr="E">3</stat>
<stat abbr="BARISP">.217</stat>
<stat abbr="RPA">0.176211453744493</stat>
<stat abbr="RBI">15</stat>
<stat abbr="RP">40</stat>
<stat abbr="TB">78</stat>
<stat abbr="GPMI">55</stat>
<stat abbr="MLBST">ACT</stat>
<stat abbr="SDT">53</stat>
<stat abbr="OBP">0.295081967213115</stat>
<stat abbr="SH">2</stat>
<stat abbr="ABRISP">46</stat>
<stat abbr="SBPCT">90.9090909090909</stat>
<stat abbr="COM">-12</stat>
<stat abbr="HR">3</stat>
<stat abbr="H">56</stat>
<stat abbr="SF">1</stat>
<stat abbr="LOB">64</stat>
<stat abbr="G">55</stat>
<stat abbr="AB">227</stat>
<stat abbr="ID">ROL582770</stat>
<stat abbr="FC">217</stat>
<stat abbr="OPS">0.638694302014877</stat>
<stat abbr="RdAB">0.123348017621145</stat>
<stat abbr="BP">88</stat>
<stat abbr="DPT">38</stat>
<stat abbr="PO">73</stat>
<stat abbr="GPSS">55</stat>
<stat abbr="RBI-HR">12</stat>
<stat abbr="PPos">SS</stat>
<stat abbr="SLG">0.343612334801762</stat>
<stat abbr="DT">11</stat>
<stat abbr="1B">42</stat>
<stat abbr="KO">38</stat>
<stat abbr="FPCT">0.986175115207373</stat>
<stat abbr="XBH">14</stat>
<stat abbr="AST">141</stat>
<stat abbr="PP">0.638694302014877</stat>
<stat abbr="2B">9</stat>
<stat abbr="HRISP">10</stat>
<stat abbr="SN">2012</stat>
<stat abbr="CS">1</stat>
<stat abbr="TM">SEASON</stat>
<stat abbr="BPA">246</stat>
<stat abbr="GDP">3</stat>
<stat abbr="BA">0.246696035242291</stat>
<stat abbr="R">28</stat>
<stat abbr="IB">1</stat>
<stat abbr="SB">10</stat>
<stat abbr="TPA">0.885390337257168</stat>
<stat abbr="GST">54</stat>
<stat abbr="3B">2</stat>
</stats>
</player>
<player id="223571">
<stats>
<stat abbr="SB-CS">3</stat>
<stat abbr="BB">19</stat>
<stat abbr="E">2</stat>
<stat abbr="BARISP">.289</stat>
<stat abbr="GP3B">1</stat>
<stat abbr="RPA">0.213333333333333</stat>
<stat abbr="RBI">31</stat>
<stat abbr="RP">48</stat>
<stat abbr="TB">93</stat>
<stat abbr="GPDH">3</stat>
<stat abbr="MLBST">ACT</stat>
<stat abbr="SDT">47</stat>
<stat abbr="OBP">0.299595141700405</stat>
<stat abbr="ABRISP">45</stat>
<stat abbr="SBPCT">100</stat>
<stat abbr="COM">-7</stat>
<stat abbr="HR">8</stat>
<stat abbr="H">55</stat>
<stat abbr="SF">3</stat>
<stat abbr="LOB">66</stat>
<stat abbr="G">57</stat>
<stat abbr="AB">225</stat>
<stat abbr="GPCI">55</stat>
<stat abbr="ID">PUJ404041</stat>
<stat abbr="FC">524</stat>
<stat abbr="OPS">0.712928475033738</stat>
<stat abbr="RdAB">0.111111111111111</stat>
<stat abbr="BP">96</stat>
<stat abbr="DPT">40</stat>
<stat abbr="PO">469</stat>
<stat abbr="RBI-HR">23</stat>
<stat abbr="GP1B">54</stat>
<stat abbr="PPos">1B</stat>
<stat abbr="SLG">0.413333333333333</stat>
<stat abbr="DT">14</stat>
<stat abbr="1B">33</stat>
<stat abbr="KO">29</stat>
<stat abbr="FPCT">0.99618320610687</stat>
<stat abbr="XBH">22</stat>
<stat abbr="AST">53</stat>
<stat abbr="PP">0.712928475033738</stat>
<stat abbr="2B">14</stat>
<stat abbr="HRISP">13</stat>
<stat abbr="SN">2012</stat>
<stat abbr="TM">SEASON</stat>
<stat abbr="BPA">247</stat>
<stat abbr="BA">0.244444444444444</stat>
<stat abbr="GDP">6</stat>
<stat abbr="R">25</stat>
<stat abbr="IB">3</stat>
<stat abbr="SB">3</stat>
<stat abbr="TPA">0.957372919478183</stat>
<stat abbr="GST">57</stat>
</stats>
</player>
</player_stats></body>
</result>

JSON Response

{
   "body" : {
      "player_stats" : {
         "132668" : {
            "SB-CS" : 9,
            "BB" : "16",
            "E" : "3",
            "BARISP" : ".217",
            "RPA" : "0.176211453744493",
            "RBI" : "15",
            "RP" : 40,
            "TB" : 78,
            "GPMI" : 55,
            "MLBST" : "ACT",
            "SDT" : 53,
            "OBP" : "0.295081967213115",
            "SH" : "2",
            "ABRISP" : "46",
            "SBPCT" : "90.9090909090909",
            "COM" : -12,
            "HR" : "3",
            "H" : "56",
            "SF" : "1",
            "LOB" : "64",
            "G" : "55",
            "AB" : "227",
            "ID" : "ROL582770",
            "FC" : "217",
            "OPS" : "0.638694302014877",
            "RdAB" : "0.123348017621145",
            "BP" : 88,
            "DPT" : "38",
            "PO" : "73",
            "GPSS" : "55",
            "RBI-HR" : 12,
            "PPos" : "SS",
            "SLG" : "0.343612334801762",
            "DT" : 11,
            "1B" : 42,
            "KO" : "38",
            "FPCT" : "0.986175115207373",
            "XBH" : 14,
            "AST" : "141",
            "_" : 109,
            "PP" : "0.638694302014877",
            "2B" : "9",
            "HRISP" : "10",
            "SN" : "2012",
            "CS" : "1",
            "TM" : "SEASON",
            "BPA" : "246",
            "GDP" : "3",
            "BA" : "0.246696035242291",
            "R" : "28",
            "IB" : "1",
            "SB" : "10",
            "TPA" : "0.885390337257168",
            "GST" : "54",
            "3B" : "2"
         },
         "223571" : {
            "SB-CS" : 3,
            "BB" : "19",
            "E" : "2",
            "BARISP" : ".289",
            "GP3B" : "1",
            "RPA" : "0.213333333333333",
            "RBI" : "31",
            "RP" : 48,
            "TB" : 93,
            "GPDH" : "3",
            "MLBST" : "ACT",
            "SDT" : 47,
            "OBP" : "0.299595141700405",
            "ABRISP" : "45",
            "SBPCT" : 100,
            "COM" : -7,
            "HR" : "8",
            "H" : "55",
            "SF" : "3",
            "LOB" : "66",
            "G" : "57",
            "AB" : "225",
            "GPCI" : 55,
            "ID" : "PUJ404041",
            "FC" : "524",
            "OPS" : "0.712928475033738",
            "RdAB" : "0.111111111111111",
            "BP" : 96,
            "DPT" : "40",
            "PO" : "469",
            "RBI-HR" : 23,
            "GP1B" : "54",
            "PPos" : "1B",
            "SLG" : "0.413333333333333",
            "DT" : 14,
            "1B" : 33,
            "KO" : "29",
            "FPCT" : "0.99618320610687",
            "XBH" : 22,
            "AST" : "53",
            "_" : 108,
            "PP" : "0.712928475033738",
            "2B" : "14",
            "HRISP" : "13",
            "SN" : "2012",
            "TM" : "SEASON",
            "BPA" : "247",
            "BA" : "0.244444444444444",
            "GDP" : "6",
            "R" : "25",
            "IB" : "3",
            "SB" : "3",
            "TPA" : "0.957372919478183",
            "GST" : "57"
         }
      }
   },
   "uriAlias" : "/stats",
   "statusMessage" : "OK",
   "uri" : "/stats",
   "statusCode" : 200
}

Sample URL

http://api.cbssports.com/fantasy/stats?version=2.0&timeframe=2011&period=season&player_id=187741,1243187

XML Response

<?xml version="1.0"?>
<result uriAlias="/stats" uri="/stats" statusCode="200" statusMessage="OK">
  <body><player_stats>
<player id="1243187">
<stats>
<stat abbr="TotYd">1624</stat>
<stat abbr="RuLg">60</stat>
<stat abbr="TarPct">13.4</stat>
<stat abbr="GL">8</stat>
<stat abbr="DFTD">0</stat>
<stat abbr="Re20">2</stat>
<stat abbr="TF">1</stat>
<stat abbr="MXP">0</stat>
<stat abbr="Ru20">14</stat>
<stat abbr="RuFD">84</stat>
<stat abbr="RuTDY">49,8,2,11,10,1,2,13,33,1,2,1,2,1,9,1,33</stat>
<stat abbr="IPRTD"></stat>
<stat abbr="ReLg">26</stat>
<stat abbr="MFG">0</stat>
<stat abbr="IFRTD">0</stat>
<stat abbr="RuReYd">1624</stat>
<stat abbr="Tar">69</stat>
<stat abbr="ReFD">18</stat>
<stat abbr="ReYd">315</stat>
<stat abbr="CmpPct">0</stat>
<stat abbr="OPP">0</stat>
<stat abbr="TYdA">0</stat>
<stat abbr="ReTDY">7,5,2</stat>
<stat abbr="GS">15</stat>
<stat abbr="YAtt">0</stat>
<stat abbr="PenA">1</stat>
<stat abbr="IPRYd"></stat>
<stat abbr="ReFDPct">37.5</stat>
<stat abbr="DSTPA">0</stat>
<stat abbr="D">160</stat>
<stat abbr="RuFDPct">30.8</stat>
<stat abbr="RuAvgMin">4.8</stat>
<stat abbr="G">15</stat>
<stat abbr="ReTD">3</stat>
<stat abbr="Recpt">48</stat>
<stat abbr="RuAtt">273</stat>
<stat abbr="ID">0</stat>
<stat abbr="TK">2</stat>
<stat abbr="RuYd">1309</stat>
<stat abbr="IFRTDY"></stat>
<stat abbr="TP">120</stat>
<stat abbr="FL">1</stat>
<stat abbr="ReAvg">6.6</stat>
<stat abbr="ReAvgMin">6.6</stat>
<stat abbr="PaRuYd">1309</stat>
<stat abbr="PenYdA">10</stat>
<stat abbr="GW">7</stat>
<stat abbr="RuTD">17</stat>
<stat abbr="YDS">0</stat>
<stat abbr="IKRTD"></stat>
<stat abbr="STK">2</stat>
<stat abbr="IKRTDY"></stat>
<stat abbr="IKRYd"></stat>
<stat abbr="RuAvg">4.8</stat>
<stat abbr="PaFDPct">0</stat>
<stat abbr="TM">PHI</stat>
<stat abbr="TarOpp">515</stat>
<stat abbr="IPRTDY"></stat>
<stat abbr="STTD">0</stat>
<stat abbr="PaNetA">0</stat>
<stat abbr="DTD">0</stat>
</stats>
</player>
<player id="187741">
<stats>
<stat abbr="GL">3</stat>
<stat abbr="DFTD">0</stat>
<stat abbr="Pa40">14</stat>
<stat abbr="MXP">0</stat>
<stat abbr="PITD">1</stat>
<stat abbr="PaFD">261</stat>
<stat abbr="RuTDY">1,1,1</stat>
<stat abbr="IPRTD"></stat>
<stat abbr="RuReYd">109</stat>
<stat abbr="Rate">105.6</stat>
<stat abbr="OPP">0</stat>
<stat abbr="TYdA">0</stat>
<stat abbr="YAtt">8.6</stat>
<stat abbr="ReFDPct">0</stat>
<stat abbr="DSTPA">0</stat>
<stat abbr="D">160</stat>
<stat abbr="RuAvgMin">2.5</stat>
<stat abbr="RuAtt">43</stat>
<stat abbr="TK">0</stat>
<stat abbr="PaIntTD">1</stat>
<stat abbr="GW">13</stat>
<stat abbr="YDS">0</stat>
<stat abbr="PaInt">12</stat>
<stat abbr="YLS">173</stat>
<stat abbr="IKRTDY"></stat>
<stat abbr="IKRYd"></stat>
<stat abbr="RateMin">105.6</stat>
<stat abbr="PaCmp">401</stat>
<stat abbr="PaFDPct">65.1</stat>
<stat abbr="Sacked">32</stat>
<stat abbr="TM">NE</stat>
<stat abbr="PaTD">39</stat>
<stat abbr="PaNetA">0</stat>
<stat abbr="DTD">0</stat>
<stat abbr="RuLg">13</stat>
<stat abbr="TotYd">5344</stat>
<stat abbr="TarPct">0</stat>
<stat abbr="TF">6</stat>
<stat abbr="PaIntTDY">27</stat>
<stat abbr="PaLg">99</stat>
<stat abbr="PaNet">5062</stat>
<stat abbr="CmpPctMin">65.6</stat>
<stat abbr="RuFD">20</stat>
<stat abbr="MFG">0</stat>
<stat abbr="IFRTD">0</stat>
<stat abbr="CmpPct">65.6</stat>
<stat abbr="PaTDY">10,2,1,99,14,10,17,14,1,26,6,15,4,2,5,8,2,1,5,14,18,5,8,52,19,41,9,24,11,21,11,37,24,33,1,1,39,17,7</stat>
<stat abbr="GS">16</stat>
<stat abbr="IPRYd"></stat>
<stat abbr="PenA">4</stat>
<stat abbr="PaAtt">611</stat>
<stat abbr="Pa20">71</stat>
<stat abbr="OFR">3</stat>
<stat abbr="RuFDPct">46.5</stat>
<stat abbr="G">16</stat>
<stat abbr="ID">0</stat>
<stat abbr="RuYd">109</stat>
<stat abbr="IFRTDY"></stat>
<stat abbr="TP">252</stat>
<stat abbr="FL">2</stat>
<stat abbr="ReAvg">0</stat>
<stat abbr="PenYdA">25</stat>
<stat abbr="PaRuYd">5344</stat>
<stat abbr="IKRTD"></stat>
<stat abbr="RuTD">3</stat>
<stat abbr="RuAvg">2.5</stat>
<stat abbr="STTD">0</stat>
<stat abbr="IPRTDY"></stat>
<stat abbr="PaYd">5235</stat>
</stats>
</player>
</player_stats></body>
</result>

JSON Response

{
   "body" : {
      "player_stats" : {
         "1243187" : {
            "TotYd" : "1624",
            "RuLg" : "60",
            "TarPct" : "13.4",
            "GL" : 8,
            "DFTD" : 0,
            "Re20" : 2,
            "TF" : 1,
            "MXP" : 0,
            "Ru20" : 14,
            "RuFD" : 84,
            "RuTDY" : "49,8,2,11,10,1,2,13,33,1,2,1,2,1,9,1,33",
            "IPRTD" : null,
            "ReLg" : "26",
            "MFG" : 0,
            "IFRTD" : 0,
            "RuReYd" : "1624",
            "Tar" : 69,
            "ReFD" : 18,
            "ReYd" : "315",
            "CmpPct" : 0,
            "OPP" : 0,
            "TYdA" : 0,
            "ReTDY" : "7,5,2",
            "GS" : 15,
            "YAtt" : 0,
            "PenA" : 1,
            "IPRYd" : null,
            "ReFDPct" : "37.5",
            "DSTPA" : 0,
            "D" : "160",
            "RuFDPct" : "30.8",
            "RuAvgMin" : "4.8",
            "G" : 15,
            "ReTD" : 3,
            "Recpt" : 48,
            "RuAtt" : "273",
            "ID" : 0,
            "TK" : 2,
            "RuYd" : "1309",
            "IFRTDY" : "",
            "TP" : 120,
            "FL" : 1,
            "ReAvg" : "6.6",
            "ReAvgMin" : "6.6",
            "PaRuYd" : "1309",
            "PenYdA" : 10,
            "GW" : 7,
            "RuTD" : 17,
            "YDS" : 0,
            "IKRTD" : null,
            "STK" : 2,
            "IKRTDY" : null,
            "IKRYd" : null,
            "RuAvg" : "4.8",
            "PaFDPct" : 0,
            "TM" : "PHI",
            "TarOpp" : "515",
            "IPRTDY" : null,
            "STTD" : 0,
            "PaNetA" : 0,
            "DTD" : 0
         },
         "187741" : {
            "GL" : 3,
            "DFTD" : 0,
            "Pa40" : 14,
            "MXP" : 0,
            "PITD" : 1,
            "PaFD" : "261",
            "RuTDY" : "1,1,1",
            "IPRTD" : null,
            "RuReYd" : 109,
            "Rate" : "105.6",
            "OPP" : 0,
            "TYdA" : 0,
            "YAtt" : "8.6",
            "ReFDPct" : 0,
            "DSTPA" : 0,
            "D" : "160",
            "RuAvgMin" : "2.5",
            "RuAtt" : 43,
            "TK" : 0,
            "PaIntTD" : 1,
            "GW" : 13,
            "YDS" : 0,
            "PaInt" : 12,
            "YLS" : "173",
            "IKRTDY" : null,
            "IKRYd" : null,
            "RateMin" : "105.6",
            "PaCmp" : "401",
            "PaFDPct" : "65.1",
            "Sacked" : 32,
            "TM" : "NE",
            "PaTD" : 39,
            "PaNetA" : 0,
            "DTD" : 0,
            "RuLg" : "13",
            "TotYd" : "5344",
            "TarPct" : 0,
            "TF" : 6,
            "PaIntTDY" : "27",
            "PaLg" : "99",
            "PaNet" : "5062",
            "CmpPctMin" : "65.6",
            "RuFD" : 20,
            "MFG" : 0,
            "IFRTD" : 0,
            "CmpPct" : "65.6",
            "PaTDY" : "10,2,1,99,14,10,17,14,1,26,6,15,4,2,5,8,2,1,5,14,18,5,8,52,19,41,9,24,11,21,11,37,24,33,1,1,39,17,7",
            "GS" : 16,
            "IPRYd" : null,
            "PenA" : 4,
            "PaAtt" : "611",
            "Pa20" : 71,
            "OFR" : 3,
            "RuFDPct" : "46.5",
            "G" : 16,
            "ID" : 0,
            "RuYd" : 109,
            "IFRTDY" : "",
            "TP" : "252",
            "FL" : 2,
            "ReAvg" : 0,
            "PenYdA" : 25,
            "PaRuYd" : "5344",
            "IKRTD" : null,
            "RuTD" : 3,
            "RuAvg" : "2.5",
            "STTD" : 0,
            "IPRTDY" : null,
            "PaYd" : "5235"
         }
      }
   },
   "uriAlias" : "/stats",
   "statusMessage" : "OK",
   "uri" : "/stats",
   "statusCode" : 200
}

XML field definitions

/player_stats

A container element for the list of players whose stats are returned.

/player_stats/player

A container element for a player’s stats.

/player_stats/player/@id

The ID of the player.  You can use this ID to get more information about the player by requesting the Player Search, Player Outlook, or the Player Updates resources.

/player_stats/player/stats

A container element for the list of the player’s stats.

/player_stats/player/stats/stat

An individual stat for the player.  The name of the stat is specified by the abbr attribute, and the value of the stat is given as the content of the stat element.

/player_stats/player/stats/stat/@abbr

The abbreviation of the stats category.  To get a list of the stats category abbreviations, request the Stats Categories resource.