NCAAMB Push Events retrieves detailed, real-time information on every game event.
Syntax
https://api.sportradar.us/ncaamb/\{access_level}/stream/\{language_code}/events/subscribe |
Parameters
Parameter | Description |
---|---|
| Defines the access level of your API key |
| Optional code for supported languages |
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.
Each query string parameter can be added with a preceding ampersand (&
).
Parameter | Description |
---|---|
| Language returned expressed as a 2-letter code |
| Match id |
| Player id |
| Game status |
| Statistic type |
| Team id expressed as: sd:team:{team_id}. |
Code Samples
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe")
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)
request["x-api-key"] = "{your_api_key}" # Replace with your actual key
response = http.request(request)
puts response.read_body
import requests
import json
headers = {
'x-api-key': 'your_api_key' # Replace with your actual key
}
r = requests.get(
"https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe",
headers=headers,
allow_redirects=False
)
redirect_url = r.headers['Location']
r = requests.get(redirect_url, stream=True, headers=headers)
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 -X GET 'https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe' \
-H 'x-api-key: {your_api_key}'
Samples with Query String Params
require 'uri'
require 'net/http'
require 'openssl'
url = URI("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe?&status=inprogress&match=sd:match:76b2e680-7da7-461f-95ad-e7c34dbc4c56")
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)
request["x-api-key"] = "{your_api_key}" # Replace with your actual key
response = http.request(request)
puts response.read_body
import requests
import json
headers = {
'x-api-key': 'your_api_key' # Replace with your actual key
}
r = requests.get("https://api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe",
params = {'status': 'inprogress', 'match': 'sd:match:76b2e680-7da7-461f-95ad-e7c34dbc4c56'},
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 -X GET 'api.sportradar.com/ncaamb/trial/stream/en/statistics/subscribe?&status=inprogress&match=sd:match:76b2e680-7da7-461f-95ad-e7c34dbc4c56'
-H 'x-api-key: {your_api_key}'
Response Sample
The above commands return json like this.
Simulations
Check out our Simulations to replay actual games at any time, on your own schedule. Push simulations are available as well.
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 |
---|---|---|---|
|
| String | Coverage level of a game |
|
| GUID | Unique ID of a game |
|
| String | The status of a game |
|
| String | Game title |
|
| dateTime | Scheduled date and time of a game |
|
| String | Time zone of the away team |
|
| String | Time zone of the home team |
|
| String | Time zone of the venue |
Player Statistics (Game):
Attribute | Parent Element | Type | Description |
---|---|---|---|
|
| Integer | Number of assists |
|
| Decimal | Assist to turnover ratio |
|
| Integer | Number of blocked attempts |
|
| Integer | Number of shots blocked |
|
| Integer | Number of defensive rebounds |
|
| Boolean | Signifies a double-double |
|
| Decimal | Effective Field Goal Percentage |
|
| Decimal | Player Efficiency Rating |
|
| Decimal | Player Efficiency Game Score |
|
| Integer | Number of field goal attempts |
|
| Integer | Number of field goals made |
|
| Decimal | Field goal percentage |
|
| Integer | Number of flagrant fouls |
|
| Integer | Number of fouls drawn |
|
| Integer | Number of free throw attempts |
|
| Integer | Number of free throws made |
|
| Decimal | Free throw percentage |
|
| String | Number of minutes played |
|
| Integer | Number of offensive fouls |
|
| Integer | Number of offensive rebounds |
|
| Integer | Number of personal fouls |
|
| Integer | Plus/Minus (Team scoring while a player is on the court) |
|
| Integer | Number of points |
|
| Integer | Number of points in the paint |
|
| Integer | Number of points in the paint attempts |
|
| Integer | Number of points in the paint baskets |
|
| Decimal | Points in the paint percentage |
|
| Integer | Number of points off turnovers |
|
| Integer | Number of rebounds |
|
| Integer | Number of second chance points |
|
| Integer | Number of steals |
|
| Integer | Number of technical fouls |
|
| Integer | Number of 3-point attempts |
|
| Integer | Number of 3-point baskets |
|
| Decimal | 3-point percentage |
|
| Boolean | Signifies a triple-double |
|
| Decimal | Number of attempts used to determine true shooting percentage |
|
| Decimal | True Shooting Percentage |
|
| Integer | Number of turnovers |
|
| Integer | Number of 2-point attempts |
|
| Integer | Number of 2-point baskets |
|
| Decimal | 2-point percentage |
Team Statistics (Game):
Attribute | Parent Element | Type | Description |
---|---|---|---|
|
| Integer | Number of assists |
|
| Decimal | Assist to turnover ratio |
|
| Integer | Number of bench points |
|
| Integer | Largest lead in points for a team |
|
| Integer | Number of blocked attempts |
|
| Integer | Number of shots blocked |
|
| Integer | Number of coach technical fouls |
|
| Integer | Number of defensive rebounds |
|
| Decimal | Effective Field Goal Percentage |
|
| Decimal | Player Efficiency Rating |
|
| Decimal | Player Efficiency Game Score |
|
| Integer | Number of ejections |
|
| Integer | Number of fast break points |
|
| Integer | Number of field goal attempts |
|
| Integer | Number of field goals made |
|
| Decimal | Field goal percentage |
|
| Integer | Number of flagrant fouls |
|
| Integer | Number of fouled out players |
|
| Integer | Number of fouls drawn |
|
| Integer | Number of free throw attempts |
|
| Integer | Number of free throws made |
|
| Decimal | Free throw percentage |
|
| String | Number of minutes played |
|
| Integer | Opponents score when a team's largest scoring run was attained |
|
| Integer | Team's score when its largest score run was attained |
|
| Integer | Longest streak of unanswered points |
|
| Integer | Number of offensive fouls |
|
| Integer | Number of offensive rebounds |
|
| Integer | Number of personal fouls |
|
| Integer | Total number of rebounds attributed to players |
|
| Integer | Number of player technical fouls |
|
| Integer | Number of turnovers attributed to players |
|
| Integer | Plus/Minus |
|
| Integer | Number of points |
|
| Integer | Number of points in the paint |
|
| Integer | Number of points in the paint attempts |
|
| Integer | Number of points in the paint baskets |
|
| Decimal | Points in the paint percentage |
|
| Integer | Number of points off turnovers |
|
| Integer | Number of second chance points |
|
| Integer | Number of steals |
|
| Integer | Number of team defensive rebounds |
|
| Integer | Number of team offensive rebounds |
|
| Integer | Number of team rebounds |
|
| Integer | Number of team technical fouls |
|
| Integer | Number of team turnovers |
|
| Integer | Number of 3-point attempts |
|
| Integer | Number of 3-point baskets |
|
| Decimal | 3-point percentage |
|
| Integer | Number of total fouls (team fouls + |
|
| Integer | Number of total rebounds (team rebounds + player rebounds) |
|
| Integer | Number of total team turnovers (player_turnovers + team_turnovers) |
|
| Decimal | Number of attempts used to determine true shooting percentage |
|
| Decimal | True Shooting Percentage |
|
| Integer | Number of 2-point attempts |
|
| Integer | Number of 2-point baskets |
|
| Decimal | 2-point percentage |
Metadata:
Attribute | Parent Element | Type | Description |
---|---|---|---|
|
| String | Alias of a league |
|
| String | Language code |
|
| GUID | Unique ID of a game |
|
| String | Operation of an update |
|
| GUID | Unique ID(s) of players associated with an event |
|
| String | The status of a game |
|
| String | Type of statistic |
|
| GUID | Unique ID(s) of team(s) associated with an event |
|
| String | Version of the API |
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 |