Live Streams API
The Live Streams API provides endpoints for discovering and retrieving information about your live events. This allows you to build “Live Now” directories and embed live players into your applications.
Get Active Live Streams
This is the primary endpoint for discovering streams that are currently “on-air”. It returns a list of only the streams that are actively receiving a signal from an encoder.
GET /live-streams/active
Parameters
This endpoint does not take any parameters. It will return all active streams for your account.
Example Request
GET /api/client/v1/live-streams/active
Host: https://your-app.com
Authorization: Bearer sk-your-api-key-here
Response: GET /live-streams/active
If streams are active, you will receive an array of LiveStream
objects. The status
will be active
and a manifest
object will be present.
{
"data": [
{
"id": "9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f",
"title": "Weekly Q&A Session",
"description": "Answering your questions live.",
"status": "active",
"manifest": {
"hls_url": "https://your-app.com/storage/live_media/live/9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f/adaptive/master.m3u8"
},
"metadata": {
"category": "Tech Talk",
"host": "Jane Doe"
},
"tags": ["live", "q&a"],
"created_at": "2024-08-01T10:00:00Z"
}
]
}
If no streams are currently active, the API will return an empty data array.
{
"data": []
}
Get All Live Streams
This endpoint provides a paginated directory of all live streams configured in your account, regardless of their current status (active or inactive). This is useful for building a schedule or a complete list of available channels.
GET /live-streams
Parameters
Name | Type | Required | Description |
---|---|---|---|
per_page | integer | Optional | The number of streams to return per page. Default: 15 , Max: 100 . |
Example Request
GET /api/client/v1/live-streams?per_page=2
Response: GET /live-streams
The response is a standard paginated list. The status
will be active
or inactive
, and the manifest
object will only be present for active streams.
{
"data": [
{
"id": "9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f",
"title": "Weekly Q&A Session",
"description": "Answering your questions live.",
"status": "active",
"manifest": {
"hls_url": "https://your-app.com/storage/live_media/live/9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f/adaptive/master.m3u8"
},
"metadata": {
"category": "Tech Talk"
},
"tags": ["live", "q&a"],
"created_at": "2024-08-01T10:00:00Z"
},
{
"id": "9c1a9e3e-1a2b-3c4d-5e6f-7g8h9i0j1k2l",
"title": "Upcoming Product Launch",
"description": "Join us for the big reveal.",
"status": "inactive",
"metadata": {
"category": "Product"
},
"tags": ["launch", "event"],
"created_at": "2024-07-25T15:00:00Z"
}
],
"links": {
"first": "https://your-app.com/api/client/v1/live-streams?page=1",
"last": "https://your-app.com/api/client/v1/live-streams?page=3",
"prev": null,
"next": "https://your-app.com/api/client/v1/live-streams?page=2"
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 3,
"path": "https://your-app.com/api/client/v1/live-streams",
"per_page": 2,
"to": 2,
"total": 6
}
}
Get a Single Live Stream
Retrieves the full details for one specific live stream by its ID. This is the endpoint you would call to get the necessary information to load a stream into a player.
GET /live-streams/{streamId}
Path Parameters
Name | Type | Description |
---|---|---|
streamId | uuid | Required. The unique identifier of the live stream. |
Example Request
GET /api/client/v1/live-streams/9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f
Response: GET /live-streams/{streamId}
The response is a single LiveStream
object. The manifest
will be included if the stream is active.
{
"data": {
"id": "9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f",
"title": "Weekly Q&A Session",
"description": "Answering your questions live.",
"status": "active",
"manifest": {
"hls_url": "https://your-app.com/storage/live_media/live/9c1a9e3e-7d8c-5g9b-9f1c-8a2b0c3d9e8f/adaptive/master.m3u8"
},
"metadata": {
"category": "Tech Talk",
"host": "Jane Doe"
},
"tags": ["live", "q&a"],
"created_at": "2024-08-01T10:00:00Z"
}
}