NBA Player Info widget displays comprehensive player statistics and information specifically designed for NBA basketball. It provides detailed per-game averages with visual bullet bar charts comparing player performance to league leaders, biographical information, and key efficiency metrics. The widget features an interactive player selector dropdown for quick comparison between teammates, visual progress bars showing points, rebounds, and assists relative to league-leading averages, and calculated efficiency ratings. Statistics combine both regular season and playoff data for complete performance overview. This widget is essential for NBA player profile pages, team rosters, player comparison features, and fantasy basketball applications.
Shows the default view of the NBA Player Info widget.
See the NBA Player Info widget demo.
player.basketball.infoThe widget requires three parameters for full functionality.
Required parameters:
See Getting Identifiers.
Environment Requirements
Supported Sports
The NBA Player Info widget supports the following sports:
| Sport | Sport ID |
|---|---|
| Basketball | 2 |
This widget only works with NBA. The widget includes validation that checks if the tournament is NBA and displays an error if used with other leagues: "Only NBA is supported".
| Property | Type | Default | Description |
|---|---|---|---|
playerId | number | Required | NBA player identifier. |
seasonId | number | Required | NBA season identifier for statistics context. |
teamUid | number | Required | Team unique identifier. |
Illustrations of main feature variants with relevant property values below.
Shows the default view of the NBA Player Info widget.
See NBA Player Info widget demo
Properties do not always transfer from the above table directly into integration code. Properties must be transformed differently for each integration method:
SIR() callcardVariant: "compact"In javascript integration, the properties go into an object which is passed as the 4th argument of the call ti SIR() function. Please see Global SIR API
data-sr- prefixcardVariant → data-sr-card-variantSample Configuration:
string|numberstring|numberstring|numberfilters.sport.hidden → Complex objects must be passed as JSON stringsIn HTML integration, the properties go into the parent HTML object as object properties, prefixed with data-sr- as explained above.
This method supports only simple (base) properties and does not support properties that require functions.
In all examples replace sportradar in the widgetloader URL path with your clientId.
Example if your clientId is client1:
https://widgets.sir.sportradar.com/sportradar/widgetloaderhttps://widgets.sir.sportradar.com/client1/widgetloaderInitialize the widget programmatically using the JavaScript API. The widget renders in the specified container element.
(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/sportradar/widgetloader","SIR", {
language: 'en'
});
SIR('addWidget', '#sr-widget', 'player.basketball.info', {
playerId: 1,
seasonId: 2,
teamUid: 3
});<div id="sr-widget"></div>Insert the following HTML code at the target widget location. Complex object properties must be passed as JSON-encoded strings.
<div id="sr-widget"
data-sr-widget="player.basketball.info"
data-sr-player-id="1"
data-sr-season-id="2"
data-sr-team-uid="3">
</div>
<script type="application/javascript"
src="https://widgets.sir.sportradar.com/sportradar/widgetloader"
async>
</script>