NCAAMB Push Statistics retrieves detailed, real-time game stats at the team and player level for all live games.
Syntax
https://api.sportradar.us/ncaamb/{access_level}/stream/{language_code}/statistics/subscribe?api_key={your_api_key} |
Parameters
Parameter | Description |
---|---|
access_level | Defines the access level of your API keyproduction , trial |
language_code | Optional code for supported languagesen (English) |
your_api_key | Your API key |
Optional Query String Parameters
By default, a Push feed will provide all data available for all in progress games. If needed, you can filter the data returned by including query strings.
Optional query string parameters must be added after your API key with an ampersand (&
). If you are filtering for more than one result, separate the results with a comma (,
) and no spaces.
Parameter | Description |
---|---|
locale | Language returned expressed as a 2-letter codeen (English)Example: locale=en |
match | Match id Example: match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc |
player | Player id Example: players=sd:player:82643a21-c4ec-4725-b729-f4c65727c93d |
status | Game statusinprogress , created Example: status=inprogress |
stats_type | Statistic type Example: stats_type=player |
team | Team id expressed as: sd:team:{team_id}. Example: team=sd:team:2ed86226-3fff-4083-90fa-6b02307e6f73 |
Code Samples
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/statistics/subscribe?api_key={your_api_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
import requests
import json
r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe",
params = {'api_key': 'your_api_key'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/statistics/subscribe?api_key={your_api_key}'
Samples with Query String Params
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.us/ncaamb/trial/stream/en/events/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
import requests
import json
r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/events/subscribe",
params = {'api_key': 'your_api_key', 'status': 'inprogress', 'match': 'sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc'},
allow_redirects=False)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True)
for line in r.iter_lines():
# filter out keep-alive new lines
if line:
decoded_line = line.decode('utf-8')
print(json.loads(decoded_line))
curl -L GET 'api.sportradar.us/ncaamb/trial/stream/en/events/subscribe?api_key={your_api_key}&status=inprogress&match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc'
Response Sample
The above commands return json like this.
Data Points
Starters & Activity:
Attribute | Parent Element | Type | Description |
---|---|---|---|
active | player | Boolean | Signifies a player is on the active roster |
ejected | player | Boolean | Signifies a player is ejected from a game |
fouled_out | player | Boolean | Signifies a player is fouled out of a game |
not_playing_description | player | String | Text description of a "Not Playing" player ex. Left Hamstring; Strain |
on_court | player | Boolean | Signifies a player is currently on the court |
played | player | Boolean | Signifies a player played in a game |
starter | player | Boolean | Signifies a player started a game |
Game:
Attribute | Parent Element | Type | Description |
---|---|---|---|
coverage | game | String | Coverage level of a gamefull , extended_boxscore |
id | game | GUID | Unique ID of a game ex. 1f730a9a-8221-48ff-a259-ac2103fb58b0 |
status | game | String | The status of a gamescheduled , created , inprogress , halftime , complete , closed , cancelled , delayed , postponed , time-tbd , if-necessary , unnecessary Please see our FAQ section for a list of game status definitions |
title | game | String | Game title ex. South Regional - Elite Eight - Game 1 |
scheduled | game | dateTime | Scheduled date and time of a game ex. 2024-02-14T05:00:00Z |
away | game - time_zones | String | Time zone of the away team ex. US/Pacific |
home | game - time_zones | String | Time zone of the home team ex. US/Eastern |
venue | game - time_zones | String | Time zone of the venue ex. US/Eastern |
Player Statistics (Game):
Attribute | Parent Element | Type | Description |
---|---|---|---|
assists | player - statistics | Integer | Number of assists |
assists_turnover_ratio | player - statistics | Decimal | Assist to turnover ratio |
blocked_att | player - statistics | Integer | Number of blocked attempts |
blocks | player - statistics | Integer | Number of shots blocked |
defensive_rebounds | player - statistics | Integer | Number of defensive rebounds |
double_double | player - statistics | Boolean | Signifies a double-double |
effective_fg_pct | player - statistics | Decimal | Effective Field Goal Percentage (FG + 0.5 * 3P) / FGA |
efficiency | player - statistics | Decimal | Player Efficiency Rating (sPoints + sAssists + sBlocks+sSteals + sFoulsDrawn + sReboundsTotal) - (sTurnovers + sBlocksReceived + sFoulsPersonal + sFoulsTechnical + (sTwoPointersAttempted - sTwoPointersMade) + (sThreePointersAttempted - sThreePointersMade) + (sFreeThrowsAttempted - sFreeThrowsMade)) |
efficiency_game_score | player - statistics | Decimal | Player Efficiency Game Score sPoints + 0.4 sFieldGoalsMade - 0.7 sFieldGoalsAttempted - 0.4 ( sFreeThrowsAttempted - sFreeThrowsMade) + 0.7 sReboundsOffensive + 0.3 sReboundsDefensive + sSteals + 0.7 sAssists + 0.7 sBlocks - 0.4 sFoulsPersonal - sTurnovers |
field_goals_att | player - statistics | Integer | Number of field goal attempts |
field_goals_made | player - statistics | Integer | Number of field goals made |
field_goals_pct | player - statistics | Decimal | Field goal percentage ex. 56.5 |
flagrant_fouls | player - statistics | Integer | Number of flagrant fouls |
fouls_drawn | player - statistics | Integer | Number of fouls drawn |
free_throws_att | player - statistics | Integer | Number of free throw attempts |
free_throws_made | player - statistics | Integer | Number of free throws made |
free_throws_pct | player - statistics | Decimal | Free throw percentage ex. 100.0 |
minutes | player - statistics | String | Number of minutes played ex. 40:07 |
offensive_fouls | player - statistics | Integer | Number of offensive fouls |
offensive_rebounds | player - statistics | Integer | Number of offensive rebounds |
personal_fouls | player - statistics | Integer | Number of personal fouls |
pls_min | player - statistics | Integer | Plus/Minus (Team scoring while a player is on the court) ex. -1 or 12 |
points | player - statistics | Integer | Number of points |
points_in_paint | player - statistics | Integer | Number of points in the paint |
points_in_paint_att | player - statistics | Integer | Number of points in the paint attempts |
points_in_paint_made | player - statistics | Integer | Number of points in the paint baskets |
points_in_paint_pct | player - statistics | Decimal | Points in the paint percentage ex. 28.6 |
points_off_turnovers | player - statistics | Integer | Number of points off turnovers |
rebounds | player - statistics | Integer | Number of rebounds |
second_chance_pts | player - statistics | Integer | Number of second chance points |
steals | player - statistics | Integer | Number of steals |
tech_fouls | player - statistics | Integer | Number of technical fouls |
three_points_att | player - statistics | Integer | Number of 3-point attempts |
three_points_made | player - statistics | Integer | Number of 3-point baskets |
three_points_pct | player - statistics | Decimal | 3-point percentage ex. 100.0 |
triple_double | player - statistics | Boolean | Signifies a triple-double |
true_shooting_att | player - statistics | Decimal | Number of attempts used to determine true shooting percentage sFieldGoalsAttempted + (0.44 * sFreeThrowsAttempted) |
true_shooting_pct | player - statistics | Decimal | True Shooting Percentage 100 sPoints / (2 sTrueShootingAttempts ) |
turnovers | player - statistics | Integer | Number of turnovers |
two_points_att | player - statistics | Integer | Number of 2-point attempts |
two_points_made | player - statistics | Integer | Number of 2-point baskets |
two_points_pct | player - statistics | Decimal | 2-point percentage ex. 100.0 |
Team Statistics (Game):
Attribute | Parent Element | Type | Description |
---|---|---|---|
assists | team - statistics | Integer | Number of assists |
assists_turnover_ratio | team - statistics | Decimal | Assist to turnover ratio |
bench_points | team - statistics | Integer | Number of bench points |
biggest_lead | team - statistics | Integer | Largest lead in points for a team |
blocked_att | team - statistics | Integer | Number of blocked attempts |
blocks | team - statistics | Integer | Number of shots blocked |
coach_tech_fouls | team - statistics | Integer | Number of coach technical fouls |
defensive_rebounds | team - statistics | Integer | Number of defensive rebounds |
effective_fg_pct | team - statistics | Decimal | Effective Field Goal Percentage (FG + 0.5 * 3P) / FGA |
efficiency | team - statistics | Decimal | Player Efficiency Rating (sPoints+sAssists+sBlocks+sSteals+sFoulsDrawn+sReboundsTotal)-(sTurnovers+sBlocksReceived+sFoulsPersonal+sFoulsTechnical+(sTwoPointersAttempted-sTwoPointersMade)+(sThreePointersAttempted-sThreePointersMade)+(sFreeThrowsAttempted-sFreeThrowsMade)) |
efficiency_game_score | team - statistics | Decimal | Player Efficiency Game Score sPoints + 0.4 sFieldGoalsMade - 0.7 sFieldGoalsAttempted - 0.4 ( sFreeThrowsAttempted - sFreeThrowsMade) + 0.7 sReboundsOffensive + 0.3 sReboundsDefensive + sSteals + 0.7 sAssists + 0.7 sBlocks - 0.4 sFoulsPersonal - sTurnovers |
ejections | team - statistics | Integer | Number of ejections |
fast_break_pts | team - statistics | Integer | Number of fast break points |
field_goals_att | team - statistics | Integer | Number of field goal attempts |
field_goals_made | team - statistics | Integer | Number of field goals made |
field_goals_pct | team - statistics | Decimal | Field goal percentage ex. 56.5 |
flagrant_fouls | team - statistics | Integer | Number of flagrant fouls |
foulouts | team - statistics | Integer | Number of fouled out players |
fouls_drawn | team - statistics | Integer | Number of fouls drawn |
free_throws_att | team - statistics | Integer | Number of free throw attempts |
free_throws_made | team - statistics | Integer | Number of free throws made |
free_throws_pct | team - statistics | Decimal | Free throw percentage ex. 100.0 |
minutes | team - statistics | String | Number of minutes played ex. 4:25:00 |
most_unanswered_run_opp_points | team - statistics | Integer | Opponents score when a team's largest scoring run was attained |
most_unanswered_run_own_points | team - statistics | Integer | Team's score when its largest score run was attained |
most_unanswered_points | team - statistics | Integer | Longest streak of unanswered points |
offensive_fouls | team - statistics | Integer | Number of offensive fouls |
offensive_rebounds | team - statistics | Integer | Number of offensive rebounds |
personal_fouls | team - statistics | Integer | Number of personal fouls |
personal_rebounds | team - statistics | Integer | Total number of rebounds attributed to players Note: this appears under rebounds in previous API versions |
player_tech_fouls | team - statistics | Integer | Number of player technical fouls |
player_turnovers | team - statistics | Integer | Number of turnovers attributed to players Note: this appears under turnovers in previous API versions |
pls_min | team - statistics | Integer | Plus/Minus |
points | team - statistics | Integer | Number of points |
points_in_paint | team - statistics | Integer | Number of points in the paint |
points_in_paint_att | team - statistics | Integer | Number of points in the paint attempts |
points_in_paint_made | team - statistics | Integer | Number of points in the paint baskets |
points_in_paint_pct | team - statistics | Decimal | Points in the paint percentage ex. 28.6 |
points_off_turnovers | team - statistics | Integer | Number of points off turnovers |
second_chance_pts | team - statistics | Integer | Number of second chance points |
steals | team - statistics | Integer | Number of steals |
team_defensive_rebounds | team - statistics | Integer | Number of team defensive rebounds |
team_offensive_rebounds | team - statistics | Integer | Number of team offensive rebounds |
team_rebounds | team - statistics | Integer | Number of team rebounds |
team_tech_fouls | team - statistics | Integer | Number of team technical fouls |
team_turnovers | team - statistics | Integer | Number of team turnovers |
three_points_att | team - statistics | Integer | Number of 3-point attempts |
three_points_made | team - statistics | Integer | Number of 3-point baskets |
three_points_pct | team - statistics | Decimal | 3-point percentage ex. 80.0 |
total_fouls | team - statistics | Integer | Number of total fouls (team fouls + personal fouls) |
total_rebounds | team - statistics | Integer | Number of total rebounds (team rebounds + player rebounds) |
total_turnovers | team - statistics | Integer | Number of total team turnovers (player_turnovers + team_turnovers) |
true_shooting_att | team - statistics | Decimal | Number of attempts used to determine true shooting percentage sFieldGoalsAttempted + (0.44 * sFreeThrowsAttempted) |
true_shooting_pct | team - statistics | Decimal | True Shooting Percentage 100 sPoints / (2 sTrueShootingAttempts ) |
two_points_att | team - statistics | Integer | Number of 2-point attempts |
two_points_made | team - statistics | Integer | Number of 2-point baskets |
two_points_pct | team - statistics | Decimal | 2-point percentage ex. 100.0 |
Metadata:
Attribute | Parent Element | Type | Description |
---|---|---|---|
league | metadata | String | Alias of a league ex. NCAAM |
locale | metadata | String | Language code ex. en (English) |
match | metadata | GUID | Unique ID of a game ex. sd:match:0db78438-9663-470f-b3ae-1f9106298e47 |
operation | metadata | String | Operation of an updatecreate , update , delete |
players | metadata | GUID | Unique ID(s) of players associated with an event ex. sd:player:6897db83-b25f-4c54-832a-0ff0c3cb86ff,sd:player:481ffe40-392b-4a1b-89ec-0d9453495639 |
status | metadata | String | The status of a gamescheduled , created , inprogress , halftime , complete , closed , cancelled , delayed , postponed , time-tbd , if-necessary , unnecessary Please see our FAQ section for a list of game status definitions |
stats_type | metadata | String | Type of statistic ex. team or player |
team | metadata | GUID | Unique ID(s) of team(s) associated with an event ex. sd:team:bdc2561d-f603-4fab-a262-f1d2af462277 |
version | metadata | String | Version of the API ex. v7 |
Play-by-Play - Home/Away Teams:
Attribute | Parent Element | Type | Description |
---|---|---|---|
bonus | game - away | Boolean | Signifies the away team is in the bonus (available for full coverage games only) |
double_bonus | game - away | Boolean | Signifies the away team is in the double bonus (available for full coverage games only) |
points | game - away | Integer | Total points for the away team |
id | game - away | GUID | Unique ID of the away team ex. bdc2561d-f603-4fab-a262-f1d2af462277 |
market | game - away | String | Market name of the away team ex. Michigan |
name | game - away | String | Away team name ex. Wolverines |
remaining_timeouts | game - away | Integer | Remaining timeouts for the away team |
bonus | game - home | Boolean | Signifies the home team is in the bonus (available for full coverage games only) |
double_bonus | game - home | Boolean | Signifies the home team is in the double bonus (available for full coverage games only) |
points | game - home | Integer | Total points for the home team |
id | game - home | GUID | Unique ID of the home team ex. bdc2561d-f603-4fab-a262-f1d2af462277 |
market | game - home | String | Market name of the home team ex. Michigan |
name | game - home | String | Home team name ex. Wolverines |
remaining_timeouts | game - home | Integer | Remaining timeouts for the home team |
Player:
Attribute | Parent Element | Type | Description |
---|---|---|---|
first_name | player | String | First name of a player ex. Isaiah |
full_name | player | String | Full name of a player ex. Isaiah Livers |
id | player | GUID | Unique player ID ex. 34736ed7-c86a-472c-8c1c-683002de6487 |
jersey_number | player | Integer | Number of a player's jersey |
last_name | player | String | Last name of a player ex. Livers |
name_suffix | player | String | Suffix of a player ex. Jr. |
position | player | String | Position of a playerNA , C , C-F , F , F-C , F-G , G , G-F |
primary_position | player | String | Primary position of a playerNA , C , PF , PG , SF , SG |
Team:
Attribute | Parent Element | Type | Description |
---|---|---|---|
id | team | GUID | Unique ID of a team ex. bdc2561d-f603-4fab-a262-f1d2af462277 |
market | team | String | Market name of a team ex. Michigan |
name | team | String | Team name ex. Wolverines |