Docs
Coverage MatrixDocumentationChange LogLog InContact Us
Docs

Push Statistics

Provides real-time team and player match-level statistics for all live games.

Syntax

https://api.sportradar.com/handball/{access_level}/stream/statistics/subscribe

Parameters

ParameterDescription
access_levelDefines the access level of your API key

production, trial
🔐

Authorization

Place your API key in the header for each request (x-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.

Each query string parameter can be added with a preceding ampersand (&).

URL ParametersDescription
channelChannel type

Example: channel=handball
competition_idCompetition id

Example: competition_id=sr:competition:1398
event_idEvent type

Example: event_id=score_change
formatFormat type

json, xml

Example: format=json
season_idSeason id

Example: season_id=sr:season:70242
sport_event_idSport event id

Example: sport_event_id=sr:sport_event:19115812
sport_idSport id

Example: sport_id=sr:sport:6


Code Samples

require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.sportradar.com/handball/trial/stream/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/handball/trial/stream/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/handball/trial/stream/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/handball/trial/stream/statistics/subscribe?&format=json&sport_event_id=sr:sport_event:19115812")

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/handball/trial/stream/statistics/subscribe",
params = {'format': 'json', 'sport_event_id': 'sr:sport_event:19115812'},
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/handball/trial/stream/events/subscribe?&format=json&sport_event_id=sr:sport_event:19115812'
-H 'x-api-key: {your_api_key}'


Response Sample

The above commands return json like this.



Data Points

Metadata
AttributeParent ElementTypeDescription
channelmetadataStringSport of the stream connection

ex. handball
competition_idmetadataStringUnique Id of a competition

ex. sr:competition:149
event_idmetadataStringType of timeline event. Reference enum_event_type in our Handball OpenAPI Spec for a complete list of event types

ex. match_started, score_change, shot_off_target
formatmetadataStringFormat type of the response

json, xml
season_idmetadataStringUnique Id of a season

ex. sr:season:106289
sport_event_idmetadataStringUnique Id of a sport event

ex. sr:sport_event_id:49324739
sport_idmetadataStringUnique Id of a sport

ex. sr:sport:6
fromheartbeatIntegerUnix timestamp of the beginning of a heartbeat message

ex. 1713804799
toheartbeatIntegerUnix timestamp of the end of a heartbeat message

ex. 1713804804
intervalheartbeatIntegerInterval of a heartbeat message in seconds
typeheartbeatStringType of heartbeat message

ex. events, statistics
packageheartbeatStringPackage of a heartbeat message

ex. handball-v2
Competitor
AttributeParent ElementTypeDescription
abbreviationcompetitorsStringAbbreviation for a competitor name

ex. RNL (Rhein-Neckar Lowen)
idcompetitorsStringUnique ID for a competitor

ex. sr:competitor:4004 (Rhein-Neckar Lowen)
namecompetitorsStringName for a competitor

ex. Rhein-Neckar Lowen
qualifiercompetitorsStringDesignation of a competitor for a season

home, away
Player
AttributeParent ElementTypeDescription
idplayersStringUnique ID of a player

ex. sr:player:2300047
nameplayersStringName of a player

ex. Grupe, Magnus
Period Scores
AttributeParent ElementTypeDescription
away_scoresport_event_status - period_scores - period_scoreIntegerAway team inning score
home_scoresport_event_status - period_scores - period_scoreIntegerHome team inning score
numbersport_event_status - period_scores - period_scoreIntegerPeriod number
typesport_event_status - period_scores - period_scoreStringPeriod type

regular_period, overtime, penalties, awaiting_penalties, 1st_half, 2nd_half, pause, 1st_extra, 2nd_extra, awaiting_extra, extra_time_halftime, interrupted
Sport Event Status
AttributeParent ElementTypeDescription
aggregate_away_scoresport_event_statusIntegerAggregate score (of multiple sport events) for the away team
aggregate_home_scoresport_event_statusIntegerAggregate score (of multiple sport events) for the home team
aggregate_winner_idsport_event_statusStringUnique ID of the aggregate score winner

ex. sr:competitor:44
away_normaltime_scoresport_event_statusIntegerScore for the away team in normal time
away_overtime_scoresport_event_statusIntegerScore for the away team in overtime
away_scoresport_event_statusIntegerTotal score for the away team in the match
home_normaltime_scoresport_event_statusIntegerScore for the home team in normal time
home_overtime_scoresport_event_statusIntegerScore for the home team in overtime
home_scoresport_event_statusIntegerTotal score for the home team in the match
decided_by_fedsport_event_statusBooleanSignifies a match result was decided by the federation when true. For example, incomplete due to crowd disruption
match_statussport_event_statusStringStatus within a match. Provides more detail on the state of a match when live than status

ex. not_started, 2nd_half, ended, awaiting_penalties

See our Handball OpenAPI under enum_sport_event_match_status for a complete list of statuses
match_tiesport_event_statusBooleanSignifies a match ended in a tie when true
scount_abandonedsport_event_statusBooleanSignifies a match was abandoned by a scout when true
statussport_event_statusStringStatus of a match

ex. not_started, live, ended, closed

See our FAQ for a complete list of statuses and their definitions.
winner_idsport_event_statusStringUnique ID of the match winner

ex. sr:competitor:7578
Match Stats (Team)
AttributeParent ElementTypeDescription
assistscompetitors - statisticsIntegerTotal team assists for a match
blockscompetitors - statisticsIntegerTotal team blocks for a match
field_goalscompetitors - statisticsIntegerTotal team field goals for a match
goals_concededcompetitors - statisticsIntegerTotal team goals conceded for a match
goals_scoredcompetitors - statisticsIntegerTotal team goals scored for a match
red_cardscompetitors - statisticsIntegerTotal team red cards for a match
savescompetitors - statisticsIntegerTotal team saves for a match
seven_m_goalscompetitors - statisticsIntegerTotal team 7-meter throw goals for a match
shot_accuracycompetitors - statisticsFloatTeam shot accuracy percentage for a match

ex. 63.04
shotscompetitors - statisticsIntegerTotal team shots for a match
shots_againstcompetitors - statisticsIntegerTotal team shots against for a match
shots_off_goalcompetitors - statisticsIntegerTotal team shots off goal for a match
shots_on_goalcompetitors - statisticsIntegerTotal team shots on goal for a match
stealscompetitors - statisticsIntegerTotal team steals for a match
suspensionscompetitors - statisticsIntegerTotal team suspensions for a match
technical_foulscompetitors - statisticsIntegerTotal team technical fouls for a match
yellow_cardscompetitors - statisticsIntegerTotal team yellow cards for a match
Match Stats (Player)
AttributeParent ElementTypeDescription
assistsplayers - statisticsIntegerPlayer assists for a match
blocksplayers - statisticsIntegerPlayer blocks for a match
field_goalsplayers - statisticsIntegerPlayer field goals for a match
goalkeeper_minutes_playedplayers - statisticsStringNumber of minutes played for a goalkeeper in a match

ex. 34:03
goals_concededplayers - statisticsIntegerNumber of goals conceded for a goalkeeper in a match
goals_scoredplayers - statisticsIntegerPlayer goals scored for a match
red_cardsplayers - statisticsIntegerPlayer red cards for a match
save_accuracyplayers - statisticsFloatSave percentage for a goalkeeper in a match

ex. 34.78
savesplayers - statisticsIntegerNumber of saves for a goalkeeper in a match
seven_m_goalsplayers - statisticsIntegerPlayer 7-meter goals for a match
seven_m_savesplayers - statisticsIntegerPlayer 7-meter throw saves in a match
shot_accuracyplayers - statisticsFloatPlayer shot accuracy percentage for a match

ex. 63.04
shotsplayers - statisticsIntegerPlayer shots for a match
shots_againstplayers - statisticsIntegerNumber of shots against for a goalkeeper in a match
shots_off_goalplayers - statisticsIntegerPlayer shots off goal for a match
shots_on_goalplayers - statisticsIntegerPlayer shots on goal for a match
stealsplayers - statisticsIntegerPlayer steals for a match
suspensionsplayers - statisticsIntegerPlayer suspensions for a match
technical_foulsplayers - statisticsIntegerPlayer technical fouls for a match
yellow_cardsplayers - statisticsIntegerPlayer yellow cards for a match