API Reference

Authors

API reference for Author endpoints — list, search, and retrieve authors with their metadata and quotes.

The Authors endpoints let you browse and search author profiles. Each author includes metadata like nationality, birth and death years, category associations, and quote counts.

List Authors

GET /api/v1/authors
ParameterTypeDefaultDescription
searchstringCase-insensitive partial name match
categoriesstringComma-separated category slugs. Matches any (OR logic)
limitnumber20Results per page (max 100)
offsetnumber0Pagination offset
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/authors?search=einstein&limit=5"
{
  "data": [
    {
      "id": "xyz789",
      "name": "Albert Einstein",
      "description": "Theoretical physicist, developer of the theory of relativity.",
      "imageUrl": "https://...",
      "nationality": "German",
      "birthYear": 1879,
      "deathYear": 1955,
      "categories": ["science", "philosophy"],
      "likeCount": 512,
      "quoteCount": 38
    }
  ],
  "pagination": { "total": 2, "limit": 5, "offset": 0, "hasMore": false }
}
FieldTypeDescription
data[].idstringUnique author identifier
data[].namestringDisplay name
data[].descriptionstringShort biography
data[].imageUrlstring | nullProfile image URL
data[].nationalitystring | nullNationality
data[].birthYearnumber | nullBirth year
data[].deathYearnumber | nullDeath year, or null if still alive
data[].categoriesstring[]Category slugs
data[].likeCountnumberTotal likes across all quotes
data[].quoteCountnumberNumber of approved quotes

Get Author by ID

Returns a single author. Pass include_quotes=true to embed their quotes in the response.

GET /api/v1/authors/:id
ParameterTypeDefaultDescription
include_quotesbooleanfalseEmbed the author's quotes in the response
languagestringPreferred language for quote texts (applies when include_quotes=true)
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/authors/xyz789?include_quotes=true&language=en"
{
  "data": {
    "id": "xyz789",
    "name": "Albert Einstein",
    "description": "Theoretical physicist, developer of the theory of relativity.",
    "imageUrl": "https://...",
    "nationality": "German",
    "birthYear": 1879,
    "deathYear": 1955,
    "categories": ["science", "philosophy"],
    "likeCount": 512,
    "quoteCount": 38,
    "quotes": [
      {
        "id": "abc123",
        "text": "Imagination is more important than knowledge.",
        "language": "en",
        "categories": ["science", "wisdom"],
        "likeCount": 89
      }
    ]
  }
}

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

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

Examples

Author profile page

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

  if (response.status === 404) throw new Error('Author not found')
  if (!response.ok) throw new Error(`API error ${response.status}`)

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

Search-as-you-type autocomplete

async function searchAuthors(apiKey, query) {
  if (query.length < 2) return []

  const response = await fetch(
    `https://quotegallery.nl/api/v1/authors?search=${encodeURIComponent(query)}&limit=10`,
    { headers: { 'X-API-Key': apiKey } }
  )

  const { data } = await response.json()
  return data.map((a) => ({ id: a.id, name: a.name, quoteCount: a.quoteCount }))
}
Copyright © 2026