Integration GuidesReference Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Reference Docs

Push Events

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?api_key={your_api_key}

Parameters

ParameterDescription
access_levelDefines the access level of your API key

production, trial
language_codeOptional code for supported languages

en (English)
your_api_keyYour 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.

ParameterDescription
event_categoryEvent category

Example: event_category=shot
event_typeEvent type

Example: event_type=stoppage
localeLanguage returned expressed as a 2-letter code

en (English)

Example: locale=en
matchMatch id

Example: match=sd:match:d613a22d-91aa-451a-8148-fcff2a5970cc
statusGame status

inprogress, created

Example: status=inprogress
teamTeam 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/events/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/events/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/events/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

Game:
AttributeParent ElementTypeDescription
coveragegameStringCoverage level of a game
full, extended_boxscore
idgameGUIDUnique ID of a game
ex. 1f730a9a-8221-48ff-a259-ac2103fb58b0
statusgameStringThe status of a game
scheduled, 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
titlegameStringTitle of a game
ex. South Regional - Elite Eight - Game 1
scheduledgamedateTimeScheduled date and time of a game
ex. 2024-02-14T05:00:00Z
awaygame - time_zonesStringTime zone of the away team
ex. US/Pacific
homegame - time_zonesStringTime zone of the home team
ex. US/Eastern
venuegame - time_zonesStringTime zone of the venue
ex. US/Eastern
Metadata:
AttributeParent ElementTypeDescription
event_categorymetadataStringCategory of an event
ex. lineupchange or shot
event_typemetadataStringType of an event
ex. threepointmiss or rebound
leaguemetadataStringAlias of a league
ex. NCAAM
localemetadataStringLanguage code
ex. en (English)
matchmetadataGUIDUnique ID of a game
ex. sd:match:0db78438-9663-470f-b3ae-1f9106298e47
operationmetadataStringOperation of an update
create, update, delete
playersmetadataGUIDUnique ID(s) of players associated with an event
ex. sd:player:6897db83-b25f-4c54-832a-0ff0c3cb86ff,sd:player:481ffe40-392b-4a1b-89ec-0d9453495639
statusmetadataStringThe status of a game
scheduled, 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
teammetadataGUIDUnique ID(s) of team(s) associated with an event
ex. sd:team:bdc2561d-f603-4fab-a262-f1d2af462277
versionmetadataStringVersion of the API
ex. v7
Play-by-Play - Attribution & Possession:

Attribution is the team associated with the play-by-play event (i.e. the statistic associated with it). Possession is the team who currently has the possession of the ball as a result of that play-by-play event.

AttributeParent ElementTypeDescription
idevent - attributionGUIDUnique ID of a team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketevent - attributionStringMarket name of a team
ex. Michigan
nameevent - attributionStringTeam name
ex. Wolverines
team_basketevent - attributionStringThe basket the offensive team is shooting at in the arena. Direction is based on the TV broadcast's perspective.
left, right
idevent - possessionGUIDUnique ID of a team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketevent - possessionStringMarket name of a team
ex. Michigan
nameevent - possessionStringTeam name
ex. Wolverines
Play-by-Play - Home/Away Teams:
AttributeParent ElementTypeDescription
bonusgame - awayBooleanSignifies the away team is in the bonus (available for full coverage games only)
double_bonusgame - awayBooleanSignifies the away team is in the double bonus (available for full coverage games only)
pointsgame - awayIntegerTotal points for the away team
idgame - awayGUIDUnique ID of the away team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketgame - awayStringMarket name of the away team
ex. Michigan
namegame - awayStringAway team name
ex. Wolverines
remaining_timeoutsgame - awayIntegerRemaining timeouts for the away team
bonusgame - homeBooleanSignifies the home team is in the bonus (available for full coverage games only)
double_bonusgame - homeBooleanSignifies the home team is in the double bonus (available for full coverage games only)
pointsgame - homeIntegerTotal points for the home team
idgame - homeGUIDUnique ID of the home team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketgame - homeStringMarket name of the home team
ex. Michigan
namegame - homeStringHome team name
ex. Wolverines
remaining_timeoutsgame - homeIntegerRemaining timeouts for the home team
Play-by-Play - Event:
AttributeParent ElementTypeDescription
clock_decimaleventStringClock value in decimal form when the game clock is under 1:00. Otherwise it displays the same value as clock
ex. 00:21.70
createdeventdateTimeTimestamp of the creation of an event
ex. 2024-02-14T05:00:00Z
attempteventStringText description of a free throw attempt
ex. 1 of 2 or 2 of 2
away_pointseventIntegerTotal points for the away team after an event
clockeventStringClock value of an event
ex. 12:37
descriptioneventStringText description of an event
ex. Hunter Dickinson makes two point jump shot (Isaiah Livers assists)
event_typeeventStringType of event
ex. turnover or rebound

See our FAQ for a complete list of types
home_pointseventIntegerTotal points for the home team after an event
ideventGUIDUnique ID of an event
ex. a2b43bd2-1b79-4823-b76c-21a09eb1adea
action_areaevent - locationStringAction area of an event
underbasket, inthepaint, insiderightwing, insideright, insidecenter, insideleft, insideleftwing, outsideright, outsidecenter, outsideleft, outsideleftwing, backcourt
coord_xevent - locationIntegerX coordinate of an event. The court we use is 1128 by 600; the scale is in inches.
coord_yevent - locationIntegerY coordinate of an event. The court we use is 1128 by 600; the scale is in inches.
sequenceeventIntegerUNIX timestamp of the wall clock value. Use this value to help sequence play-by-play events (smallest to largest sequence number}.
ex. 1678835426293
turnover_typeeventStringType of turnover
ex. Traveling or Lane Violation
createdeventdateTimeTimestamp of the creation of an event
ex. 2024-02-14T05:00:00Z
updatedeventdateTimeTimestamp of the last update to an event
ex. 2024-02-14T05:00:00Z
wall_clockeventdateTimeTimestamp in UTC when the on-venue statistician began entry of a play-by-play event.
ex. 2024-02-14T05:00:00Z
Play-by-Play - Play Participants & Stats:
AttributeParent ElementTypeDescription
idevent - statistics - teamGUIDUnique ID of a team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketevent - statistics - teamStringMarket name of a team
ex. Michigan
nameevent - statistics - teamStringTeam name
ex. Wolverines
full_nameevent - statistics - playerStringFull name of a player
ex. Stephen Curry
idevent - statistics - playerGUIDUnique player ID
ex. 8ec91366-faea-4196-bbfd-b8fab7434795
jersey_numberevent - statistics - playerIntegerNumber of a player's jersey
madeevent - statisticsBooleanSignifies a made basket
pointsevent - statisticsIntegerNumber of points scored for an event
rebound_typeevent - statistics - reboundStringRebound type
defensive, offensive
shot_distanceevent - statisticsDecimalShot distance in feet from the basket
ex. 2.37
shot_typeevent - statisticsStringShot type
jump shot, layup, dunk, hook, tip
shot_type_descevent - statisticsStringText description of a shot type
ex. driving or alley-oop
See our FAQ for a complete list of descriptions
three_point_shotevent - statisticsBooleanSignifies a 3-point attempt
madeevent - statistics - freethrowBooleanSignifies a made free throw
free_throw_typeevent - statistics - freethrowStringType of free throw
ex. regular, technical, flagrant, clear path
Play-by-Play - On Court Participants:

On Court Participants is available for full coverage games only

AttributeParent ElementTypeDescription
full_nameevent - on_court - home / away - playersStringFull name of a player
ex. Isaiah Livers
idevent - on_court - home / away - playersGUIDUnique player ID
ex. 34736ed7-c86a-472c-8c1c-683002de6487
jersey_numberevent - on_court - home / away - playersIntegerNumber of a player's jersey
idevent - on_court - home / awayGUIDUnique ID of a team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketevent - on_court - home / awayStringMarket name of a team
ex. Michigan
nameevent - on_court - home / awayStringTeam name
ex. Wolverines
Half:
AttributeParent ElementTypeDescription
idperiodGUIDUnique ID of a half
ex. 1f18ca8c-6a96-43f7-b68c-4d1b333e059c
numberperiodIntegerNumber of a half
sequenceperiodIntegerSequential number of a half
typeperiodGUIDType of period
ex. half
Player:
AttributeParent ElementTypeDescription
full_nameplayerStringFull name of a player
ex. Isaiah Livers
idplayerGUIDUnique player ID
ex. 34736ed7-c86a-472c-8c1c-683002de6487
jersey_numberplayerIntegerNumber of a player's jersey
Team:
AttributeParent ElementTypeDescription
idteamGUIDUnique ID of a team
ex. bdc2561d-f603-4fab-a262-f1d2af462277
marketteamStringMarket name of a team
ex. Michigan
nameteamStringTeam name
ex. Wolverines