Widget Docs
Coverage MatrixDocumentationRelease LogLog In

Player Seasonal Statistics

us.season.mlb.playersStats displays seasonal statistics for MLB players.

All properties are optional. By default, the widget provides player statistics for the active season.

Parameters

Name Type Argument Default Description
seasonId number optional Season ID
seasonType string optional 'regular' Season type: regular / playoffs
category string optional 'hitting' Statistics mode: hitting / pitching
conference string optional Conference filter: al / nl
uniqueTeamId number optional Unique team ID filter.
qualifiesAsLeagueLeader boolean optional true When set to true enables statistical minimums to qualify a player for inclusion in a statistical category.
disableTitle boolean optional When set to true hides the widget title.
hideFilters boolean optional When set to true hides all filters / dropdown.
hittingColumns string optional Comma separated string of hitting table statistics column keys. Used for picking fewer columns and different order. Valid options are t, p, gp, gs, pa, ab, r, h, 2b, 3b, hr, rbi, bb, k, sb, cs, ba, obp, slg, ops, iso, babip, bbk, goao, xbh, abhr.
pitchingColumns string optional Comma separated string of pitching table statistics column keys. Used for picking fewer columns and different order. Valid options are t, p, gp, gs, w, l, era, sv, svo, ip, h, r, er, hra, bb, k, oba, whip, k9, kbb, goao, qs, cg, sho, hld.
hittingSortIdx string optional Overrides hitting table default sort statistics column index. 1, 2, 3...
pitchingSortIdx string optional Overrides pitching table default sort statistics column index. 1, 2, 3...
pageLength number optional 50 Number of players displayed per page.
border boolean optional When set to true the table is displayed with a border.
onItemClick function optional Function/event handler. Emits playerId, uniqueTeamId, seasonId, uniqueTournamentId on table row click or touch.

hittingColumns Option Descriptions

Option Description
t Team
p Position
gp Games Played
pa Plate Appearances
r Runs
ab At Bats
r Runs
h Hits
2b Doubles
3b Triples
hr Home Runs
rbi Runs Batted In
bb Walks
k Strikeouts
sb Stolen Bases
cs Caught Stealing
ba Batting Average
obp On Base Percentage
slg Slugging Percentage
ops On Base + Slugging Percentage
iso Isolate Power
babip Batting Average on Balls in Play
bbk Walk-to-Strikeout Ratio
gofo Ground Out/Fly Out Ration
goao Ground Out/Air Out Ratio
xbh Extra Base Hits
abhr At Bats per Home Run

pitchingColumns Option Descriptions

Option Description
t Team
p Position
gp Games Played
gs Games Started
w Wins
l Losses
era Earned Run Average
sv Saves/td>
svo Save Opportunities
ip Innings Pitched
h Hits Allowed
r Runs Allowed
er Earned Runs
hra Home Runs Allowed
bb Walks
k Strikeouts
oba Opponents' Batting Average
whip Walks + Hits Per Inning Pitched
k9 Strikeouts per Nine Innings
kbb Strikeout-to-Walk Ratio
gofo Ground Out/Fly Out Ratio
goao Ground Out/Air Out Ratio
qs Quality Starts
cg Complete Games
sho Shutouts
hld Holds

Examples

<div class="sr-widget" data-sr-widget="us.season.mlb.playersStats"></div>
<script type="application/javascript" src="https://widgets.media.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader" data-sr-language="en_us" async></script>
<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.sir.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.mlb.playersStats', {});
</script>
<div id="sr-widget"></div>
<script>
    (function(a,b,c,d,e,f,g,h,i){a[e]||(i=a[e]=function(){(a[e].q=a[e].q||[]).push(arguments)},i.l=1*new Date,i.o=f,
    g=b.createElement(c),h=b.getElementsByTagName(c)[0],g.async=1,g.src=d,g.setAttribute("n",e),h.parentNode.insertBefore(g,h)
    )})(window,document,"script","https://widgets.sir.sportradar.com/YOUR_CLIENT_ALIAS/widgetloader","SIR", {
        language: 'en_us'
    });
    SIR('addWidget', '#sr-widget', 'us.season.mlb.playersStats', {onItemClick: function(type, obj){alert('playerId: ' + playerId + ', uniqueTeamId: ' + obj.uniqueTeamId);}});
</script>
<div id="sr-widget"></div>