Skip to main content
GET
/
projects
/
{project_id}
/
playlists
/
{id}
Get playlist
curl --request GET \
  --url https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id} \
  --header 'X-Api-Key: <api-key>'
import requests

url = "https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}"

headers = {"X-Api-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};

fetch('https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-Api-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}")
.header("X-Api-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.beyondwords.io/v1/projects/{project_id}/playlists/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": 1,
  "title": "My playlist",
  "enabled": true,
  "type": "manual",
  "content_limit": 25,
  "content": [
    {
      "id": "d7dfd636-098c-4b1b-83e5-15a3cba5a0bd",
      "status": "processed",
      "title": "Content title",
      "source_id": "example-source-id",
      "source_url": "https://example.com/some-article",
      "author": "John Smith",
      "image_url": "https://example.com/image.jpeg",
      "metadata": {
        "key": "value"
      },
      "audio": [
        {
          "id": 1,
          "content_type": "application/vnd.apple.mpegurl",
          "url": "https://example.com/audio.m3u8",
          "duration": 10000
        },
        {
          "id": 2,
          "content_type": "audio/mpeg,",
          "url": "https://example.com/audio.mp3",
          "duration": 10000
        }
      ],
      "video": [
        {
          "id": 1,
          "content_type": "video/mp4",
          "url": "https://example.com/waveform-video.mp4",
          "duration": 10000
        }
      ],
      "ads_enabled": true,
      "created": "2023-01-01 00:00:00 UTC",
      "updated": "2023-01-01 00:00:05 UTC"
    }
  ],
  "settings": null,
  "created": "2023-01-01 00:00:00 UTC",
  "updated": "2023-01-01 00:00:05 UTC"
}

Authorizations

X-Api-Key
string
header
required

Path Parameters

project_id
string
required

The numeric ID of your project

id
string
required

The numeric ID of your playlist

Query Parameters

filter[content.title]
string

filter by content title

Response

200 - application/json

OK

id
integer

Unique identifier for the object

title
string

The title of the playlist

enabled
boolean

Whether the playlist can be played in the BeyondWords player

type
enum<string>

The type of playlist. The project type is generated automatically. The manual and auto can set content and rules respectively

Available options:
project,
manual,
auto
rules_version
enum<string> | null
Available options:
1
rules
object[]

The rules that will be used to find content for auto playlists

content_limit
integer

The maximum number of content items that will appear in the playlist

content
object[]

The content of the playlist (a reduced set of fields are returned). Only the id field is returned for the playlists index endpoint

created
string<date-time>

Time at which the object was created (ISO 8601)

settings
object | null
updated
string<date-time>

Time at which the object was updated (ISO 8601)