# Streaming API

## Streaming API

{% hint style="info" %}
The infrastructure is cloud-based, therefore the IP address behind our hostname will change over time without prior notice. If your network rules require any sort of whitelisting then we suggest using our hostname for dynamic address resolution.
{% endhint %}

{% hint style="danger" %}
It is imperative that all calls to the Streaming API are made client side - this is so that we can check the client's IP and ensure that we are correctly applying any geo-restrictions to the content.
{% endhint %}

## Stream

<mark style="color:blue;">`GET`</mark> `https://api.livestreaming.srarena.io/api/v2/streaming/events/{id}/stream` \
(was: `https://api.livestreaming.imgarena.com/api/v2/streaming/events/{id}/stream`)

This endpoint allows you to request playback URLs for events that are available on the Arena Live Console. These playback URLs will then need to be passed to a player client-side for successful playback.

#### Query Parameters

| Name           | Type    | Description                                                                                                                                                                                               |
| -------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| operatorId     | integer | Your company's identifier. This is provided to you by the integrations team.                                                                                                                              |
| auth           | string  | The API token for this request. Please see chapter "Authentication" for more information on how to generate a token.                                                                                      |
| timestamp      | integer | The timestamp linked to the API token for this request. The timestamp value is the number of milliseconds since the Unix epoch, i.e the number of milliseconds since midnight (UTC) on January 1st, 1970. |
| suppressErrors | boolean | If set to "true", this will wrap all API errors in a HTTP 200 OK response.                                                                                                                                |
| format         | string  | Can be "xml" or "json" based on the output format required. Default is JSON.                                                                                                                              |
| thumbnail      | boolean | If set to "true", the response will also return a thumbnail URL for the event.                                                                                                                            |

{% tabs %}
{% tab title="200 A 200 response will successfully return the event ID. If the event is live it will also return an HLS playback URL that can be used by players for successful playback." %}
{% tabs %}
{% tab title="No Params" %}

```javascript
{
    "eventId": 140898,
    "hlsUrl": "https://dice-gaming-live-sa.akamaized.net/hls/live/2000290/140898-142985/playlist.m3u8?hdnea=st=1580410608~exp=1580410648~acl=/hls/live/2000290/140898-142985/playlist.m3u8!*_*_728*!*_*_412*!*media_*~id=22ec5624-ab31-4f45-81f0-225cc6d981bf~data=22ec5624-ab31-4f45-81f0-225cc6d981bf~hmac=20f607fba457f1529b918d0423f6fd91fc1c2fd7b285adaab9dd5df0b2d221b5&evId=140898&opId=86&cc=GB&dge=false&ua=UG9zdG1hblJ1bnRpbWUvNy4yMC4x&scId=142985",
    "statusCode": 200
}
```

{% endtab %}

{% tab title="With Thumbnail Param" %}

```javascript
{
    "eventId": 140898,
    "hlsUrl": "https://dice-gaming-live-sa.akamaized.net/hls/live/2000290/140898-142985/playlist.m3u8?hdnea=st=1580410713~exp=1580410753~acl=/hls/live/2000290/140898-142985/playlist.m3u8!*_*_728*!*_*_412*!*media_*~id=88938913-13c5-4835-97a9-297ae9f66960~data=88938913-13c5-4835-97a9-297ae9f66960~hmac=3903d36f0a5211f2dcc3d83357e7609a9804a03fe03f2d4bc803e704816bafa2&evId=140898&opId=86&cc=GB&dge=false&ua=UG9zdG1hblJ1bnRpbWUvNy4yMC4x&scId=142985",
    "thumbnailUrl": "https://img.dge-prod.dicelaboratory.com/thumbnails/140898/original/latest.jpg",
    "statusCode": 200
}
```

{% endtab %}

{% tab title="With XML Param" %}

```markup
<streamInfo>
    <eventId>140898</eventId>
    <hlsUrl>https://dice-gaming-live-sa.akamaized.net/hls/live/2000290/140898-142985/playlist.m3u8?hdnea=st=1580410736~exp=1580410776~acl=/hls/live/2000290/140898-142985/playlist.m3u8!*_*_412*!*_*_728*!*media_*~id=243f4e7c-b97a-4961-9706-025436b3f62f~data=243f4e7c-b97a-4961-9706-025436b3f62f~hmac=fa1cb0f81e4f1c7329cef4526726a544ca56b87b7b5b4a70f5a73842de0abcbf&amp;evId=140898&amp;opId=86&amp;cc=GB&amp;dge=false&amp;ua=UG9zdG1hblJ1bnRpbWUvNy4yMC4x&amp;scId=142985</hlsUrl>
    <thumbnailUrl>https://img.dge-prod.dicelaboratory.com/thumbnails/140898/original/latest.jpg</thumbnailUrl>
    <statusCode>200</statusCode>
</streamInfo>
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="400 A 400 will be returned if there are any invalid or missing parameters in the request." %}

```javascript
{
    "statusCode": 400,
    "statusText": "Bad Request",
    "message": null
}
```

{% endtab %}

{% tab title="401 For more information on why a 401 may be returned, please see the " %}

```javascript
{
    "statusCode": 401,
    "statusText": "Unauthorized",
    "message": null
}
```

{% endtab %}

{% tab title="403 A 403 will be returned from the Streaming API if the event is geo-blocked in the location from where the request was made." %}

```javascript
{
    "statusCode": 403,
    "statusText": "Forbidden",
    "message": null
}
```

{% endtab %}

{% tab title="404 A 404 will be returned if the event is no longer on the platform. The most common occurrence is if an event has been deleted from the platform because it has been cancelled." %}

```javascript
{
    "statusCode": 404,
    "statusText": "Not Found",
    "message": null
}
```

{% endtab %}

{% tab title="500 If you see a 500 response from this API, please contact our support team." %}

```javascript
{
    "statusCode": 500,
    "statusText": "Internal Server Error",
    "message": null
}
```

{% endtab %}

{% tab title="503 If you se a 503 response from this API, please contact our support team." %}

```javascript
{
    "statusCode": 503,
    "statusText": "Service Unavailable",
    "message": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sportradar.com/streaming-integration/apis/streaming-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
