API Reference

Quotes

API reference for Quote endpoints — list, search, filter, and retrieve quotes.

The Quotes endpoints let you retrieve, search, and filter approved public quotes. All responses wrap data in a data field and include a pagination object on list endpoints.

List Quotes

GET /api/v1/quotes
ParameterTypeDefaultDescription
languagestringFilter by language code (en, nl, tr, …)
categoriesstringComma-separated category slugs. Matches any (OR logic)
author_idstringFilter by a specific author ID
playlist_idstringFilter by a specific playlist ID
limitnumber20Results per page (max 100)
offsetnumber0Pagination offset
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/quotes?language=en&categories=wisdom,success&limit=10"
{
  "data": [
    {
      "id": "abc123",
      "text": "The only way to do great work is to love what you do.",
      "language": "en",
      "categories": ["wisdom", "success"],
      "likeCount": 42,
      "author": { "id": "xyz789", "name": "Steve Jobs" },
      "createdAt": 1704067200000
    }
  ],
  "pagination": { "total": 150, "limit": 10, "offset": 0, "hasMore": true }
}
FieldTypeDescription
data[].idstringUnique quote identifier
data[].textstringQuote text
data[].languagestringLanguage code
data[].categoriesstring[]Category slugs
data[].likeCountnumberNumber of likes
data[].author.idstringAuthor identifier
data[].author.namestringAuthor display name
data[].createdAtnumberUnix timestamp (ms)
pagination.totalnumberTotal matching quotes
pagination.hasMorebooleanWhether more pages exist

Random Quote

Returns a single random approved quote. Useful for quote-of-the-day features and loading screens.

GET /api/v1/quotes/random
ParameterTypeDescription
languagestringFilter by language code
categoriesstringComma-separated category slugs
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/quotes/random?language=en"
{
  "data": {
    "id": "abc123",
    "text": "Stay hungry, stay foolish.",
    "language": "en",
    "categories": ["inspirational"],
    "likeCount": 128,
    "author": { "id": "xyz789", "name": "Steve Jobs" },
    "createdAt": 1704067200000
  }
}

Get Quote by ID

Returns a single quote with full detail, including all available translations.

GET /api/v1/quotes/:id
ParameterTypeDescription
languagestringPreferred language for the primary text field
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/quotes/abc123?language=en"
{
  "data": {
    "id": "abc123",
    "text": "The only way to do great work is to love what you do.",
    "language": "en",
    "categories": ["wisdom", "success"],
    "likeCount": 42,
    "author": { "id": "xyz789", "name": "Steve Jobs", "imageUrl": "https://..." },
    "translations": [
      { "language": "en", "text": "The only way to do great work is to love what you do." }
    ],
    "createdAt": 1704067200000
  }
}

The translations array contains all available language versions of the quote. The top-level text field reflects the language requested via the language param, or the default language if omitted.

StatusDescription
404Quote ID not found or not publicly approved
401Missing or invalid API key

Examples

Quote of the day with caching

async function getQuoteOfTheDay(apiKey) {
  const cacheKey = `qotd-${new Date().toISOString().slice(0, 10)}`
  const cached = cache.get(cacheKey)
  if (cached) return cached

  const response = await fetch(
    'https://quotegallery.nl/api/v1/quotes/random?language=en',
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data: quote } = await response.json()
  cache.set(cacheKey, quote, 86400)
  return quote
}

All quotes from a playlist

async function getPlaylistQuotes(apiKey, playlistId) {
  const response = await fetch(
    `https://quotegallery.nl/api/v1/quotes?playlist_id=${playlistId}&limit=100`,
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data } = await response.json()
  return data
}
Copyright © 2026