---
title: "Playlists"
description: "API reference for Playlist endpoints - list, search, and retrieve curated quote collections."
canonical_url: "https://docs.quotegallery.nl/docs/api/playlists"
---
# Playlists

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

Playlists are curated collections of quotes. They can be community-created or officially curated by the Quote Gallery team. Use these endpoints to browse, search, and fetch the quotes inside a playlist.

## List Playlists

```text
GET /api/v1/playlists
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        search
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Case-insensitive match on words of the name; the last word may be just its start. Ignored under 2 characters, and returns at most 200 matches
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        categories
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Comma-separated category slugs. Matches any (OR logic)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        limit
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        20
      </code>
    </td>
    
    <td>
      Results per page (max <code>
        100
      </code>
      
      )
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        offset
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <code>
        0
      </code>
    </td>
    
    <td>
      Pagination offset
    </td>
  </tr>
</tbody>
</table>

<tabs>
<tabs-item label="cURL">

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

</tabs-item>

<tabs-item label="JavaScript">

```js
const response = await fetch(
  'https://quotegallery.nl/api/v1/playlists?search=motivational&limit=5',
  { headers: { 'X-API-Key': process.env.QUOTE_GALLERY_API_KEY } }
)

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

</tabs-item>

<tabs-item label="Python">

```python
import requests, os

response = requests.get(
    'https://quotegallery.nl/api/v1/playlists',
    headers={'X-API-Key': os.environ['QUOTE_GALLERY_API_KEY']},
    params={'search': 'motivational', 'limit': 5}
)

data = response.json()
```

</tabs-item>
</tabs>

```json
{
  "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": 12, "limit": 5, "offset": 0, "hasMore": true }
}
```

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        data[].id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Unique playlist identifier
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].name
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Display name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].description
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Theme or purpose
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].iconUrl
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Icon image URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].bannerUrl
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Banner image URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].categories
      </code>
    </td>
    
    <td>
      <code>
        string[]
      </code>
    </td>
    
    <td>
      Category slugs
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].likeCount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Number of likes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].quoteCount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Number of quotes
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].creatorName
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Creator’s display name
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].isCurated
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      Officially curated by Quote Gallery
    </td>
  </tr>
</tbody>
</table>

## Get Playlist by ID

Returns a single playlist. Pass `include_quotes=true` to embed the quotes in the response.

```text
GET /api/v1/playlists/:id
```

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        include_quotes
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      <code>
        false
      </code>
    </td>
    
    <td>
      Embed up to 100 of the playlist’s quotes in the response
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        language
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      
    </td>
    
    <td>
      Preferred language for quote texts (applies when <code>
        include_quotes=true
      </code>
      
      )
    </td>
  </tr>
</tbody>
</table>

<tabs>
<tabs-item label="cURL">

```bash
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/playlists/playlist123?include_quotes=true&language=en"
```

</tabs-item>

<tabs-item label="JavaScript">

```js
const response = await fetch(
  `https://quotegallery.nl/api/v1/playlists/playlist123?include_quotes=true&language=en`,
  { headers: { 'X-API-Key': process.env.QUOTE_GALLERY_API_KEY } }
)

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

console.log(`${playlist.name} - ${playlist.quoteCount} quotes`)
playlist.quotes?.forEach((q) => console.log(`  "${q.text}" - ${q.author.name}`))
```

</tabs-item>

<tabs-item label="Python">

```python
import requests, os

response = requests.get(
    'https://quotegallery.nl/api/v1/playlists/playlist123',
    headers={'X-API-Key': os.environ['QUOTE_GALLERY_API_KEY']},
    params={'include_quotes': 'true', 'language': 'en'}
)

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

</tabs-item>
</tabs>

```json
{
  "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",
        "quoteNumber": 1043,
        "url": "https://quotegallery.nl/quotes/1043-the-only-way-to-do-great-work-is",
        "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" }
      }
    ]
  }
}
```

The `quotes` field is only present when `include_quotes=true`. Each quote includes `id`, `quoteNumber`, `url`, `text`, `language`, `categories`, `likeCount`, and `author`.

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        404
      </code>
    </td>
    
    <td>
      Playlist ID not found or not publicly visible
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        401
      </code>
    </td>
    
    <td>
      Missing or invalid API key
    </td>
  </tr>
</tbody>
</table>

## Examples

### Playlist slideshow

Fetch a playlist with quotes and cycle through them:

```js
async function createSlideshow(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 index = 0

  return {
    name: playlist.name,
    next: () => playlist.quotes[index++ % playlist.quotes.length],
    total: playlist.quotes.length,
  }
}
```

### Feature only curated playlists

The API doesn’t filter by `isCurated` directly, so filter client-side after fetching:

```js
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()
  return data.filter((p) => p.isCurated)
}
```

<callout type="tip">

For a no-code alternative, use the [Iframe Embed](https://docs.quotegallery.nl/docs/guides/iframe) to show a playlist as an animated slideshow: create an embed whose source is one of your playlists.

</callout>


## Sitemap

See the full [sitemap](https://docs.quotegallery.nl/sitemap.md) for all pages.
