Api

Playlists

API reference for Playlist endpoints — list, search, and retrieve curated quote collections.

Playlists

The Playlists endpoints allow you to browse, search, and retrieve curated collections of quotes. Playlists can be community-created or officially curated by the Quote Gallery team.

List Playlists

Retrieve a paginated list of public playlists.

GET /api/v1/playlists

Query Parameters

ParameterTypeRequiredDefaultDescription
searchstringNoSearch playlists by name (case-insensitive partial match)
categoriesstringNoComma-separated list of categories to filter by
limitnumberNo20Number of results per page (max 100)
offsetnumberNo0Pagination offset

Example Request

curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/playlists?search=motivational&limit=5"

Example Response

{
  "data": [
    {
      "id": "playlist123",
      "name": "Motivational Mornings",
      "description": "Start your day with inspiration",
      "iconUrl": "https://...",
      "bannerUrl": "https://...",
      "categories": ["inspirational", "success"],
      "likeCount": 89,
      "quoteCount": 25,
      "creatorName": "quotefan",
      "isCurated": false
    }
  ],
  "pagination": {
    "total": 35,
    "limit": 5,
    "offset": 0,
    "hasMore": true
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of playlist objects
data[].idstringUnique identifier for the playlist
data[].namestringPlaylist display name
data[].descriptionstringDescription of the playlist's theme or purpose
data[].iconUrlstring | nullURL to the playlist's icon image, or null if not set
data[].bannerUrlstring | nullURL to the playlist's banner image, or null if not set
data[].categoriesstring[]List of category slugs associated with the playlist
data[].likeCountnumberNumber of likes the playlist has received
data[].quoteCountnumberNumber of quotes in the playlist
data[].creatorNamestringDisplay name of the user who created the playlist
data[].isCuratedbooleanWhether the playlist is officially curated by the Quote Gallery team
pagination.totalnumberTotal number of matching playlists
pagination.limitnumberNumber of results per page
pagination.offsetnumberCurrent offset
pagination.hasMorebooleanWhether more results are available

Get Playlist by ID

Retrieve a single playlist by its unique identifier. Optionally include the playlist's quotes in the response.

GET /api/v1/playlists/:id

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the playlist

Query Parameters

ParameterTypeRequiredDefaultDescription
include_quotesbooleanNofalseWhen true, includes the playlist's quotes in the response
languagestringNoPreferred language for quote texts (only applies when include_quotes=true)

Example Request

# Get playlist metadata only
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/playlists/playlist123"

# Get playlist with all quotes in English
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/playlists/playlist123?include_quotes=true&language=en"

Example Response

{
  "data": {
    "id": "playlist123",
    "name": "Motivational Mornings",
    "description": "Start your day with inspiration",
    "iconUrl": "https://...",
    "bannerUrl": "https://...",
    "categories": ["inspirational", "success"],
    "likeCount": 89,
    "quoteCount": 25,
    "creatorName": "quotefan",
    "isCurated": false,
    "quotes": [
      {
        "id": "abc123",
        "text": "The only way to do great work is to love what you do.",
        "language": "en",
        "categories": ["wisdom"],
        "likeCount": 42,
        "author": {
          "id": "xyz789",
          "name": "Steve Jobs"
        }
      }
    ]
  }
}

Response Fields

FieldTypeDescription
dataobjectThe playlist object
data.idstringUnique identifier for the playlist
data.namestringPlaylist display name
data.descriptionstringDescription of the playlist
data.iconUrlstring | nullURL to the playlist's icon image
data.bannerUrlstring | nullURL to the playlist's banner image
data.categoriesstring[]List of category slugs
data.likeCountnumberNumber of likes
data.quoteCountnumberNumber of quotes in the playlist
data.creatorNamestringDisplay name of the playlist creator
data.isCuratedbooleanWhether the playlist is officially curated
data.quotesarray | undefinedPlaylist's quotes (only present when include_quotes=true)
data.quotes[].idstringQuote's unique identifier
data.quotes[].textstringThe quote text
data.quotes[].languagestringLanguage code of the quote
data.quotes[].categoriesstring[]Categories the quote belongs to
data.quotes[].likeCountnumberNumber of likes on the quote
data.quotes[].authorobjectThe quote's author
data.quotes[].author.idstringAuthor's unique identifier
data.quotes[].author.namestringAuthor's display name

Error Responses

StatusDescription
404Playlist not found — the provided ID does not match any public playlist
401Unauthorized — missing or invalid API key

Use Cases

Here are some common patterns for working with the Playlists endpoints:

Curated Playlists Widget

Display only officially curated playlists in a featured section:

async function getCuratedPlaylists(apiKey) {
  const response = await fetch(
    'https://quotegallery.nl/api/v1/playlists?limit=100',
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data } = await response.json()

  // Filter for curated playlists on the client side
  return data.filter((playlist) => playlist.isCurated)
}

Playlist Slideshow

Build a slideshow that cycles through quotes from a specific playlist:

async function getPlaylistSlideshow(apiKey, playlistId) {
  const response = await fetch(
    `https://quotegallery.nl/api/v1/playlists/${playlistId}?include_quotes=true&language=en`,
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data: playlist } = await response.json()

  let currentIndex = 0

  return {
    playlist,
    next() {
      const quote = playlist.quotes[currentIndex]
      currentIndex = (currentIndex + 1) % playlist.quotes.length
      return quote
    },
    get total() {
      return playlist.quotes.length
    },
  }
}

Category-based Playlist Discovery

Help users find playlists related to specific topics:

async function discoverPlaylists(apiKey, category) {
  const response = await fetch(
    `https://quotegallery.nl/api/v1/playlists?categories=${encodeURIComponent(category)}&limit=20`,
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data, pagination } = await response.json()

  return {
    playlists: data,
    total: pagination.total,
  }
}

Export Playlist to Markdown

Download a playlist and format it as a readable Markdown document:

import requests
import os

api_key = os.environ['QUOTE_GALLERY_API_KEY']
playlist_id = 'playlist123'

response = requests.get(
    f'https://quotegallery.nl/api/v1/playlists/{playlist_id}',
    headers={'X-API-Key': api_key},
    params={'include_quotes': 'true', 'language': 'en'}
)

playlist = response.json()['data']

# Build Markdown output
lines = [
    f'# {playlist["name"]}',
    '',
    f'> {playlist["description"]}',
    '',
    f'*{playlist["quoteCount"]} quotes · {playlist["likeCount"]} likes*',
    '',
    '---',
    '',
]

for i, quote in enumerate(playlist.get('quotes', []), 1):
    lines.append(f'{i}. "{quote["text"]}" — **{quote["author"]["name"]}**')
    lines.append('')

print('\n'.join(lines))
Copyright © 2026