Introduction

The Sportradar AudioVisual API is an API used to integrate video streams from events covered by the AudioVisual unit of Sportradar into a web application or a mobile app.
This document describes how to integrate the API and is intended for developers.

Table of contents

New concepts compared to the Live Channel Online API

(only relevant for clients which integrated the Live Channel Online API)

The AudioVisual API is a completely new API. If you have already integrated the Live Channel Online API, we strongly recommend you to move to the new AudioVisual API in order to benefit from all of its new features and improvements. The AudioVisual API introduces new concepts in comparison to the Live Channel Online API, and it therefore requires a new integration. Below is a list of the main new concepts:

  • New and simpler authentication mechanism: Bearer token instead of JWT token.
  • No need to pass the “client ID” as “cid” parameter in the API URL: the Bearer token is now used to identify the client.
  • Support for all AudioVisual products: Live Channel Online, Live Channel Retail Flex, Live Channel Trading, etc.
  • AudioVisual events instead of “matches”: the Live Channel Online API was centered around the concept of Sportradar matches (with “match IDs”, also known in the Sportradar terminology as “sport events”). The new AudioVisual API is centered around the concept of AudioVisual events which are not necessarily associated to a Sportradar sport event. It provides more flexibility and clarity, access to more content, as well as support for a better data structure. Please note, however, that AudioVisual events for betting products such as Live Channel Online, Live Channel Retail Flex and Live Channel Trading will almost constantly be associated to a Sportradar sport event.
  • A same event contains one or multiple contents (videos). There is always one content marked as “main” content for a given event. The main content is generally the stream of the full duration of the event.
  • Support for Live and Video on demand (VOD).
  • The properties “isActive” and “isLive” from the /streamed-matches endpoint of the Live Channel Online API have been replaced respectively by “event_status” (on event level) and “stream_status” (on stream level). See below in this documentation the section related to the GET /events endpoint for more details.
  • No more support for SMIL files: SMIL format was used as a manifest for multi-bitrate RTMP streaming in the Live Channel Online API. The AudioVisual API does not support this format any more.
  • Additional filter parameters. See below in this documentation the sections related to GET /events endpoint for more details.
  • New URN-style IDs as ID scheme (see dedicated section below).
  • Support for geo-restrictions on country subdivisions such as US states (support to be activated soon).

Please note that support for new features and technologies will be added only to the AudioVisual API. If you are using the Live Channel Online API, we urge you to integrate the new AudioVisual API instead.

Access

The API is available via the HTTP protocol and must be called from the server(s) of the client and not from a frontend application.
Access to the API is restricted by IP. In order to access the API, Sportradar needs to whitelist the IP(s) of the client server(s) from which the API will be called.

Please note: In case you need to whitelist Sportradar's servers on your firewall, the following hostname must be used in the firewall rules: av-api.betradar.com
If your firewall does not support whitelisting of hostnames or if there are any further questions please contact the integration team of Sportradar's Audiovisual unit.

URL

The API is hosted on https://av-api.betradar.com/.
The URLs of the endpoints follow the following pattern: https://av-api.betradar.com/<version>/<endpoint_path>?<query_parameters>
Example of URL: https://av-api.betradar.com/v1/events
Setting the version in the URL is optional. If it is omitted, the latest version of the API will be used.
The latest version of the API is “v1”.

Response formats

The API supports at the moment only JSON as response format. The support for XML will come soon.
The response format is defined via the “Accept” HTTP header. For JSON, use “application/json”. For XML, it will be “application/xml”. If no “Accept” HTTP header is sent, the API will use JSON by default.

Authentication

Authentication is required for all of the endpoints of the API. The authentication scheme used by the API is Bearer authentication (also called token authentication). To authenticate, an API key (bearer token) must be sent in the “Authorization” HTTP header when making requests to the API. The string “Bearer ” must be included before the API key, as follows:
Authorization: Bearer <api-key>

The API key is provided by Sportradar as part of an AudioVisual product. If you already have an API key with the Live Channel Online API, it is not possible to re-use it with the AudioVisual API. Please contact us if you need a new API key.

The API key should never be shared with a third-party and should never be exposed publicly. It is the responsibility of the client to keep it secret.

ID scheme

Like most of other APIs provided by Sportradar, the values for representing IDs are using URN-style IDs with the following format: “XXX:YYY:###”.

  • “XXX” is some kind of context and can be “sr” or “av”. “sr” refers to an entity which is part of the Sportradar world and which is globally used for other products in the Sportradar catalogue. “av” refers to an entity which is specific to the Sportradar AudioVisual products.
  • “YYY” is the name of the entity within the context. It is generally a string.
  • “###” is typically a raw identifier for that entity. It is generally an integer.

Expected workflow

The following workflow is recommended for integrating the AudioVisual Client API:

  1. The client server requests the GET /events endpoint to get the list of events and to have an overview of the different streams available for them.
  2. When an end user wants to play the video stream of a content (e.g. via the client’s web site), a request is made from the client server to the GET /streams endpoint to get the stream URL. The IP of the end user must be passed to the API via the “X-Real-IP” HTTP header.
  3. The stream URL returned in the response of the API should be passed on to the end user’s video player, which will then connect to a streaming server.
  4. The streaming server will validate the stream URL (by doing an IP validation among others) and play the stream back to the end user.

Special requirements for streaming in the USA, Canada and Mexico

When the end-user is located in one of these countries:

  1. Client is only permitted to send requests to the API endpoints which return stream URLs if the end-user is located in a territory which is defined as a whitelisted area according to the agreement with Sportradar.
  2. Additionally, two more HTTP headers must be sent in the request:
    • “Geo-Position”: comma-separated string containing the latitude and longitude values specifying the location of the end-user, in WGS84 format. For example: 40.714224,-73.961452.
    • “Geo-Position-Timestamp”: Unix timestamp of the latitude/longitude coordinates retrieval.

Based on this information, the API will perform a check to verify that the end-user is located in a territory which is allowed, and will make sure that the timestamp is not older than 1 minute ago. If this check fails, the stream URL will not be returned. Instead, an error will be returned in the response.

Please note that this check is not yet active in our API but clients which are streaming or planning to stream in these countries need to implement these two new HTTP headers in order to be able to use the API endpoints which return stream URLs properly once we activate the check on our side.

API endpoints

GET /events

HTTP method: GET
Path:
 /events

This endpoint returns the lists of booked events (booked manually via the Live Booking Calendar in betradar.com or booked automatically via a client package).

An event is defined by various properties described below and contains one or multiple “contents”. A content is a video in relation to the event. For instance, an event such as a football match will contain a video of the full duration of the match but can also contain videos for goal clips, highlights, interviews, etc.
A content itself contains one or multiple “streams”. Streams are distincted by AudioVisual product (Live Channel Online, Live Channel Retail Flex, Live Channel Trading, etc) and distribution (Live or VOD).

By using this endpoint, you will be able to retrieve only events in the time frame between now – 1 day and now + 14 days. Events out of this time frame are not available, whatever are the filtering parameters used.

Events are sorted by event start time.

Parameters as query parameters in the URL
The following parameters can be passed as query parameters in the URL. They are all optional. If none of these parameters are passed, the API will return by default the events which have a start time between now – 6 hours and now + 3 days or which have at least one stream with distribution type “Live” and broadcast status “On Air Broadcast”.

Name

Type

Optional?

Description

“from”StringYesLower bound of the event time frame in ISO-8601 format.
Has to be used in combination with “to” parameter.
“to”StringYesUpper bound of the event time frame in ISO-8601 format.
Has to be used in combination with “from” parameter.
“event”StringYesEvent ID.
Support both single value (event=) and multi-values (event[]=).
The ID scheme “av:event:<integer>” must be used.
Filter the list of events for the given event(s).
“client_event”StringYesClient event ID.
This parameter works only if a mapping exists between the Sportradar sport event ID and the client event ID.
Support both single value (client_event=) and multi-values (client_event[]=).
Does not use any ID scheme.
Filter the list of events for the given client event(s).
“sport_event”StringYesSportradar sport event ID.
Support both single value (sport_event=) and multi-values (sport_event[]=).
For now, the ID scheme “sr:match:<integer>” must be used. Some other ID schemes may be available in the future.
Filter the list of events for the given Sportradar sport event(s).
“event_status”StringYesEvent status ID.
Support both single value (event_status=) and multi-values (event_status[]=).
The ID scheme “av:event_status:<integer>” must be used.
Filter the events for the given event status(es).
Use GET /event-statuses endpoint to get the list of possible options.
See the section "Description of statuses" at the end of this document for more information.
“content”StringYesContent ID.
Support both single value (content=) and multi-values (content[]=).
The ID scheme “av:content:<integer>” must be used.
Filter the list of events/contents for the given content(s).
“content_type”StringYesContent type ID.
Support both single value (content_type=) and multi-values (content_type[]=).
The ID scheme “av:content_type:<integer>” must be used.
Filter the list of events/contents for the given content type(s).
Use GET /content-types endpoint to get the list of possible options.
“is_main_content”BooleanYesIs the content the main content of the event?
Possible values: 0, 1.
Filter the list of events/contents for the given value.
“stream”StringYesStream ID.
Support both single value (stream=) and multi-values (stream[]=).
The ID scheme “av:stream:<integer>” must be used.
Filter the list of events/contents/streams for the given stream(s).
“product”StringYesAudioVisual product ID.
Support both single value (product=) and multi-values (product[]=).
The ID scheme “av:product:<integer>” must be used.
Filter the list of events/contents/streams for the given product(s).
Use GET /products endpoint to get the list of possible options.
“distribution”StringYesDistribution ID.
Support both single value (distribution=) and multi-values (distribution[]=).
The ID scheme “av:distribution:<integer>” must be used.
Filter the list of events/contents/streams for the given distribution(s).
Use GET /distributions endpoint to get the list of possible options.
“stream_status”StringYesStream status ID.
Support both single value (stream_status=) and multi-values (stream_status[]=).
The ID scheme “av:stream_status:<integer>” must be used.
Filter the list of events/contents/streams for the given stream status(es).
Use GET /stream-statuses endpoint to get the list of possible options.
See the section "Description of statuses" at the end of this document for more information.

Example of response in JSON:

[  
   {  
      "id":"av:event:36852",
      "client_event_id": "ABCD-1234",
      "sport_event_id":"sr:match:17517635",
      "start_time":"2019-02-28T11:40:00+00:00",
      "end_time":null,
      "event_status":{  
         "id":"av:event_status:2",
         "name":"Confirmed"
      },
      "first_level_category":{  
         "id":"sr:sport:5",
         "name":"Tennis"
      },
      "second_level_category":{  
         "id":"sr:category:785",
         "name":"ITF Men"
      },
      "third_level_category":{  
         "id":"sr:competition:17630",
         "name":"ITF Portugal F2, Men Singles"
      },
      "competitors":[  
         {  
            "id":"sr:competitor:103625",
            "name":"GEERTS, MICHAEL",
            "qualifier":"home"
         },
         {  
            "id":"sr:competitor:153644",
            "name":"MONTEIRO, JOAO",
            "qualifier":"away"
         }
      ],
      "venue":{  
         "id":"sr:venue:27383",
         "name":"Court 1"
      },
      "contents":[  
         {  
            "id":"av:content:121364",
            "content_type":{  
               "id":"av:content_type:6",
               "name":"Full match"
            },
            "name":null,
            "is_main":true,
            "streams":[  
               {  
                  "id":"av:stream:107200",
                  "product":{  
                     "id":"av:product:1",
                     "name":"Live Channel Retail"
                  },
                  "distribution":{  
                     "id":"av:distribution:1",
                     "name":"Live"
                  },
                  "start_time":"2019-02-28T11:40:00+00:00",
                  "end_time":null,
                  "stream_status":{  
                     "id":"av:stream_status:2",
                     "name":"On Air Broadcast"
                  },
                  "languages":[],
                  "geo_restrictions":[  
                     {  
                        "device_category":{  
                           "id":"av:device_category:1",
                           "name":"Desktop"
                        },
                        "country_iso_alpha2_codes":"AT,NO"
                     }
                  ]
               },
               {  
                  "id":"av:stream:107202",
                  "product":{  
                     "id":"av:product:2",
                     "name":"Live Channel Online"
                  },
                  "distribution":{  
                     "id":"av:distribution:1",
                     "name":"Live"
                  },
                  "start_time":"2019-02-28T11:40:00+00:00",
                  "end_time":null,
                  "stream_status":{  
                     "id":"av:stream_status:2",
                     "name":"On Air Broadcast"
                  },
                  "languages":[],
                  "geo_restrictions":[  
                     {  
                        "device_category":{  
                           "id":"av:device_category:1",
                           "name":"Desktop"
                        },
                        "country_iso_alpha2_codes":"AT,NO,US",
                        "country_subdivision_iso_codes": {
                           "US": "US-NJ,US-NV"
                        }
                     },
                     {  
                        "device_category":{  
                           "id":"av:device_category:2",
                           "name":"Mobile"
                        },
                        "country_iso_alpha2_codes":"AT,NO,US",
                        "country_subdivision_iso_codes": {
                           "US": "US-NJ,US-NV"
                        }
                     }
                  ]
               }
            ]
         }
      ]
   }
]

Description of the properties

PropertyTypeCan be null/empty?Description
“id”StringNoEvent ID.
ID scheme is always “av:event:<integer>”.
“client_event_id”StringYesClient event ID.
This property is present only if a mapping exists between the Sportradar match ID and the client event ID.
Does not use any ID scheme. The client event ID is returned as it is.
“sport_event_id”StringYesSportradar sport event ID.
For now, ID scheme is always “sr:match:<integer>”. Some other ID schemes may be available in the future.
“start_time”StringNoStart time of the event in ISO-8601 format. Uses the UTC offset by default.
“end_time”StringYesEnd time of the event in ISO-8601 format. Uses the UTC offset by default.
“event_status”ObjectNoStatus of the event.
See the section "Description of statuses" at the end of this document for more information.

“id”StringNoEvent status ID.
ID scheme is always “av:event_status:<integer>”.
Use GET /event-statuses endpoint to get the list of possible values.
“name”StringNoName of the event status.
“first_level_category”ObjectNoFirst level category of the event.

“id”StringNoFirst level category ID.
Two ID schemes are possible:
  • “sr:sport:<integer>”: the property will contain the Sportradar sport ID.
  • “av:category:<integer>”: the property will contain the ID of the first level category (for Sportradar AudioVisual-only events).
“name”StringNoName of the first level category.
“second_level_category”ObjectNoSecond level category of the event.

“id”StringNoSecond level category ID.
Two ID schemes are possible:
  • “sr:category:<integer>”: the property will contain the Sportradar category ID.
  • “av:category:<integer>”: the property will contain the ID of the second level category (for Sportradar AudioVisual-only events).
“name”StringNoName of the second level category.
“third_level_category”ObjectNoThird level category of the event.

“id”StringNoThird level category ID.
Two ID schemes are possible:
  • “sr:tournament:<integer>”: the property will contain the Sportradar tournament ID.
  • “av:category:<integer>”: the property will contain the ID of the third level category (for Sportradar AudioVisual-only events).
“name”StringNoName of the third level category.
“competitors”ArrayYesArray of “competitor” objects.

“id”StringNoCompetitor ID.
Three ID schemes are possible:
  • “sr:competitor:<integer>”: the property will contain the Sportradar competitor ID.
  • “sr:simpleteam:<integer>”: the property will contain the Sportradar simple team ID (only if the Sportradar competitor ID is not available).
  • “av:competitor:<integer>”: the property will contain the ID of the competitor (for Sportradar AudioVisual-only events).
“name”StringNoName of the competitor.
“qualifier”StringNoDefines is the competitor is “home” or “away”.
“venue”ObjectYesVenue of the event.

“id”StringNoVenue ID.
Two ID schemes are possible:
  • “sr:venue:<integer>”: the property will contain the Sportradar venue ID.
  • “av:venue:<integer>”: the property will contain the ID of the venue (for Sportradar AudioVisual-only events).
“name”StringNoName of the venue.
“contents”ArrayNoArray of “content” objects.

“id”StringNoContent ID.
ID scheme is always “av:content:<integer>”.
“content_type”ObjectNoType of the content.

“id”StringNoContent type ID.
ID scheme is always “av:content_type:<integer>”.
Use GET /content-types endpoint to get the list of possible values.
“name”StringNoName of the content type.
“name”StringYesName of the content.
“is_main”BooleanNoTrue if the content is the main content of the event.
For example, for a football match, the main content would be the video of the full duration of the match.
“streams”ArrayNoArray of “stream” objects.

“id”StringNoStream ID.
ID scheme is always “av:stream:<integer>”.
This is the ID to be sent when using the GET /streams/<stream_id>/<stream_type> endpoint.
“product”ObjectNoAudioVisual product of the stream.

“id”StringNoProduct ID.
ID scheme is always “av:product:<integer>”.
Use GET /products endpoint to get the list of possible values.
“name”StringNoName of the product.
“distribution”ObjectNoDistribution of the stream.

“id”StringNoDistribution ID.
ID scheme is always “av:distribution:<integer>”.
Use GET /distributions endpoint to get the list of possible values.
“name”StringNoName of the distribution.
“start_time”StringNoStart time of the stream in ISO-8601 format. Uses the UTC offset by default.
“end_time”StringYesEnd time of the stream in ISO-8601 format. Uses the UTC offset by default.
“stream_status”ObjectNoStatus of the stream.
See the section "Description of statuses" at the end of this document for more information.

“id”StringNoStream status ID.
ID scheme is always “av:stream_status:<integer>”.
Use GET /stream-statuses endpoint to get the list of possible values.
“name”StringNoName of the stream status.
“languages”ArrayYesArray of “language” objects.
Languages available as audio for the stream.
If this array is empty, it means that only one default language will be available as audio for the stream.

“id”StringNoSportradar language ID.
ID scheme is always “sr:language:<integer>”.
“name”StringNoName of the language.
“geo_restrictions”ArrayNoArray of “geo restriction” objects.

“device_categories”ObjectNoDevice category for which the geo restriction applies.

“id”StringNoDevice category ID.
ID scheme is always “av:device_category:<integer>”.
Use GET /device-categories endpoint to get the list of possible values.
“name”StringNoName of the device category.
“country_iso_alpha2_codes”StringNoString of coma-separated country ISO alpha-2 codes.
Countries allowed for the given stream and device category.
“country_subdivision_iso_codes”ObjectYes

Lists of coma-separated country subdivision ISO codes, grouped by country (where the key is the country ISO alpha-2 code).
Country subdivisions allowed for the given stream and device category.
If an allowed country has no subdivisions listed, it means that geo-restrictions are not handled on subdivision level for that country. Therefore all the subdivisions of that country are allowed. Please contact us to know which countries have their geo-restrictions handled on subdivision level.
If none of the allowed countries have their geo-restrictions handled on subdivision level, this property will be omitted.
This property is not supported in the current version of the API but support will come soon.

GET /events/<event_id>

HTTP method: GET
Path: 
/events/<event_id>

This endpoint returns the same response as the GET /events endpoint, but just for one event. The structure is the same except that the root element is an object instead of an array. Please see the documentation of GET /events endpoint for more information (note that the GET parameters from the GET /events endpoint do not apply to this endpoint).

Parameters in the path of the URL

Name

Type

Optional?

Description

“event_id”StringNoEvent ID.
The ID scheme “av:event:<integer>” must be used.

GET /streams/<stream_id>/<stream_type>

HTTP method: GET
Path: 
/streams/<stream_id>/<stream_type>

This endpoint returns the URL of a stream by stream ID for a given stream type.

Parameters in the path of the URL

Name

Type

Optional?

Description

“stream_id”StringNoStream ID as provided in the GET /events endpoint.
The ID scheme “av:stream:<integer>” must be used.
“stream_type”StringNoType of stream.
Possible values:
  • “dash-manifest”: to get the DASH manifest URL. Available only for the products Live Channel Retail Flex, Live Channel Online and Third Party and only for a booking on the device category “Desktop” or “Mobile”.
  • “cmaf-manifest”: to get the CMAF manifest URL. Available only for the products Live Channel Retail Flex, Live Channel Online and Third Party and only for a booking on the device category “Desktop” or “Mobile”.
  • “hls”: to get the HLS stream URL. Available only for the products Live Channel Online and Third Party and only for a booking on the device category “Desktop” or “Mobile”.
  • “hls-manifest”: to get the HLS manifest URL. Available only for the products Live Channel Online and Third Party and only for a booking on the device category “Desktop” or “Mobile”.
  • “rtmp”: to get the RTMP stream URL. Available only for the products Live Channel Retail Flex, Live Channel Online and Third Party and only for a booking on the device category “Desktop”.

Parameters as query parameters in the URL

Name

Type

Optional?

Description

“device_category”StringYesID of the device category of the end-user who is going to play the stream.
The ID scheme “av:device_category:<integer>” must be used.
Use GET /device-categories endpoint to get the list of possible options.
Since the geo restrictions on a stream can be different by device category, it is important to pass this parameter so that the API can perform a correct geo location check based on the end-user IP passed in the “X-Real-IP” HTTP header.
If this parameter is not passed, a default value will be used, depending on the requested stream type:
  • “dash-manifest”: “Desktop”.
  • “cmaf-manifest”: “Desktop”.
  • “hls-manifest” / “hls”: “Mobile”.
  • “rtmp”: “Desktop”.
“language”StringYesSportradar language ID as provided in the GET /events endpoint.
The ID scheme “sr:language:<integer>” must be used.
Will return the stream URL, if there is one, for the given language.
“max_bitrate”IntegerYesMaximum bitrate of the stream in bps.
If the given value is lower than the lowest available bitrate, the URL of the stream with the lowest bitrate will be returned.
“label”StringYesUnique label identifier used to divide traffic from the main account.
This parameter will be forwarded and included (as a “label” query parameter) in the returned stream URL.
Allowed values are restricted. Please contact us if you want to add support for a new value for your account.
"csid"StringYesClient side ID.
Unique and consistent ID for the end user. For example a hash of a user name. The string passed should be anonymized, and should be consistent with end user IDs provided to other Sportradar systems.
This parameter will be forwarded and included (as a “csid” query parameter) in the returned stream URL.

Parameters as HTTP headers

Name

Type

Optional?

Description

“X-Real-IP”StringNoIP of the end user which is intended to play the stream.
“Geo-Position”StringYesComma-separated string containing the latitude and longitude values specifying the location of the end-user, in WGS84 format. For example: 40.714224,-73.961452.
Required only for streaming in the USA, Canada and Mexico, see section “Special requirements for streaming in the USA, Canada and Mexico” above.
“Geo-Position-Timestamp”IntegerYesUnix timestamp of the latitude/longitude coordinates retrieval.
Required only for streaming in the USA, Canada and Mexico, see section “Special requirements for streaming in the USA, Canada and Mexico” above.

Example of response in JSON:

{
   "url": "https://sportradar-lco.akamaized.net/24770/121364/dash/desktop/tennis_itf_men_itf_portugal_f2_men_singles_17517635.mpd?cid=24770&mid=17517635&ecid=121364&pid=2&dtid=1&sid=538435715117&hdnts=ip=92.62.38.2~exp=1551450105~acl=%2F24770%2F121364%2Fdash%2Fdesktop%2F%2A~hmac=03185324934d24d5c581af8f6ed1d7775eb92ac7467d2563915c708283f99ae6"
}

For “RTMP” streams, the response contains an additional property for the stream name:

{
   "url": "rtmp://cp508682.live.edgefcs.net/live/",
   "stream_name": "avup_single_81@s752670?auth=da_cbdZdob6bqbbaeaYdzbXbFb.adaFdwb1-bCD.60-E-xAwAEoJorBoCFEa-o8sakdlcm5&aifp=v1&cid=24770&mid=17517635&ecid=121364&pid=2&dtid=1&sid=287080384538"
}

Important note regarding RTMP stream URLs

Responses for RTMP stream URLs are special because the stream URL is divided into two different properties: “url” and “stream_name”. Depending on the video player you use, you will have to keep these two properties separated or you will have to join them into one single “full” URL, the latter being the most common case. If you need to join the “url” and “stream_name” properties into one single “full” URL, you have to make sure to always include the actual stream name before the query parameters because, depending on the streaming server used to deliver the stream, the query parameters can be either in the “url” property or in the “stream_name” property.

Example with the query parameters in the “stream_name” property: let’s “url” be rtmp://my.domain.com/path/ and “stream_name” be “my_stream_name?param1=value1”. The full URL to put in the player should then be “rtmp://my.domain.com/path/my_stream_name?param1=value1”.

Example with the query parameters in the “url” property: let’s “url” be “rtmp://my.otherdomain.com/otherpath/?otherparam1=othervalue1” and “stream_name” be “my_other_stream_name”. The full URL to put in the player should then be “rtmp://my.otherdomain.com/otherpath/my_other_stream_name?otherparam1=othervalue1”.

GET /contents/<content_id>/product/<product_id>/distribution/<distribution_id>/stream/<stream_type>

HTTP method: GET
Path:
 /contents/<content_id>/product/<product_id>/distribution/<distribution_id>/stream/<stream_type>

This endpoint returns the URL of a stream by content ID, product ID and distribution ID for a given stream type.

Parameters in the path of the URL

Name

Type

Optional?

Description

“content_id”StringNoContent ID as provided in the GET /events endpoint.
The ID scheme “av:content:<integer>” must be used.
“product_id”StringNoProduct ID.
The ID scheme “av:product:<integer>” must be used.
Use GET /products endpoint to get the list of possible options.
“distribution_id”StringNoDistribution ID.
The ID scheme “av:distribution:<integer>” must be used.
Use GET /products endpoint to get the list of possible options.
“stream_type”StringNoSame as for GET /streams/<stream_id>/<stream_type> endpoint.

Parameters as query parameters in the URL

Same as for GET /streams/<stream_id>/<stream_type> endpoint.

Parameters as HTTP headers

Same as for GET /streams/<stream_id>/<stream_type> endpoint.

Response

Same as for GET /streams/<stream_id>/<stream_type> endpoint.

GET /event-statuses

HTTP method: GET
Path:
 /event-statuses

This endpoint returns an array with the list of possible event statuses.
See the section "Description of statuses" at the end of this document for more information.

GET /content-types

HTTP method: GET
Path:
 /content-types

This endpoint returns an array with the list of possible content types.

GET /products

HTTP method: GET
Path:
 /products

This endpoint returns an array with the list of possible products.

GET /distributions

HTTP method: GET
Path:
 /distributions

This endpoint returns an array with the list of possible distributions.

GET /stream-statuses

HTTP method: GET
Path:
 /stream-statuses

This endpoint returns an array with the list of possible stream statuses.
See the section "Description of statuses" at the end of this document for more information.

GET /device-categories

HTTP method: GET
Path:
 /device-categories

This endpoint returns an array with the list of possible device categories.

Description of statuses

Event statuses

NameDescription
ConfirmedThe coverage of the event has been confirmed. Please check the status and the expected start time of the required stream to find out when Sportradar will make it available.
CancelledThe event has been cancelled. Therefore, it will not be available for streaming.
UnknownThere is currently no public information on the event status. It has neither been planned nor cancelled.

Stream statuses

Please note that the stream status can change several times even during a live event. Streams might be available again shortly after an error has occurred.

NameDescription
ApprovedThe distribution of the stream has been confirmed. Live streams will be made available by Sportradar prior to the expected start time.
On Air ReadyThe distribution of the stream has been prepared in Sportradar internal systems and will be publicly accessible in a short time. The playback URL of the stream cannot be retrieved at the moment.
On Air BroadcastThe distribution of the stream is available and publicly accessible. The playback URL of the stream can be retrieved.
ErrorDue to an error, the distribution of the stream is currently interrupted.
DeliveredThe distribution of the stream has ended and is not available any more.

Error responses

In case of errors, a response with the right HTTP code (4xx or 5xx) will be returned by the API and the body will contain an internal error code as well as a message with the description of the error.

CodeHTTP statusMessageEndpointsDescription
1000404The requested resource could not be found.When there is no route matching the request.
1001405The requested method is not allowed. Allowed methods are: <allowedMethods>.AllWhen the HTTP method is not allowed.
1002500The request failed due to an unexpected error.AllWhen an unexpected error occurred.
2000401‘Authorization’ HTTP header is required.AllWhen no “Authorization” HTTP header is passed.
2001401Invalid ‘Authorization’ HTTP header format (expected: Bearer <token>).AllWhen the “Authorization” HTTP header format is not correct.
2002401Invalid token.AllWhen the token is not valid.
2003401Invalid client.AllWhen the client is not valid.
3000400Error with GET parameters. ‘from’ and ‘to’ parameters must be provided together or not provided at all.GET /eventsWhen “from” GET parameter is passed without “to” or vice-versa.
3001400Error with GET parameters. Bad format for ‘from’ or ‘to’ parameter. Expected ISO-8601 format (e.g. <nowInUTC>). Got: <sentParameter>.GET /eventsWhen at least one of “from” or “to” GET parameters does not have the ISO-8601 format.
3002400Error with GET parameters. The ‘to’ date/time must be greater than the ‘from’ date/time.GET /eventsWhen the date/time of the “to” GET parameter is not greater than the date/time of the “from” GET parameter.
3003400Error with GET parameters. Bad format for ‘<parameterName>’. Expected: <rightFormat>. Got: <sentParameter>.AllWhen a GET parameter which is supposed to be passed with a certain format does not have that format.
3004400Error with parameters in the path. Bad format for ‘<parameterName>’. Expected: <rightFormat>. Got: <sentParameter>.AllWhen a parameter in the path which is supposed to be passed with a certain format does not have that format.
3005400Error with parameters in the path. Invalid stream type.Endpoints to get stream URLWhen the stream type passed in the path is not one of the possible values.
3006404Stream not available.Endpoints to get stream URLWhen there is no stream available for the requested stream ID, the requested stream type and the given GET parameters.
3007404The requested stream type is not available for the requested stream.Endpoints to get stream URLWhen the stream type is not supported for the requested stream ID.
3008403Device category not booked.Endpoints to get stream URLWhen the stream was booked but not for the requested device category.
3009400Error with HTTP headers. IP must be sent in the ‘X-Real-IP’ HTTP header.Endpoints to get stream URLWhen the “X-Real-IP” HTTP header was not sent.
3010400Error with HTTP headers. The value passed in the ‘X-Real-IP’ HTTP header is not a valid IP.Endpoints to get stream URLWhen the IP sent in the “X-Real-IP” HTTP header is not a valid IPv4 or IPv6 IP.
3011403The country <countryCode> associated to the IP <ip> is not authorized for the requested stream.Endpoints to get stream URLWhen the country associated to the IP passed in the “X-Real-IP” HTTP header is not authorized for the requested stream and stream type.
3012404Event not available./events/<event_id>When there is no event available for the requested event ID.
3014400Error with GET parameters. The device category passed in the “device_category” parameter is not supported for the requested stream type.Endpoints to get stream URLWhen the device category passed in the “device_category” GET parameter is not supported for the requested stream type.
3015403The IP <ip> is not authorized for the requested stream.Endpoints to get stream URLWhen the IP sent in the "X-Real-IP" HTTP header is not authorized.
3023403Stream URL generation not allowed.Endpoints to get stream URLWhen the stream is not allowed.