Api

Authors

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

Authors

The Authors endpoints allow you to browse, search, and retrieve author profiles from the Quote Gallery catalog. Authors include rich metadata such as nationality, birth/death years, categories, and associated quotes.

List Authors

Retrieve a paginated list of approved authors.

GET /api/v1/authors

Query Parameters

ParameterTypeRequiredDefaultDescription
searchstringNoSearch authors 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/authors?search=einstein&limit=5"

Example Response

{
  "data": [
    {
      "id": "xyz789",
      "name": "Steve Jobs",
      "description": "Co-founder of Apple Inc.",
      "imageUrl": "https://...",
      "nationality": "American",
      "birthYear": 1955,
      "deathYear": 2011,
      "categories": ["technology", "leadership"],
      "likeCount": 256,
      "quoteCount": 45
    }
  ],
  "pagination": {
    "total": 80,
    "limit": 5,
    "offset": 0,
    "hasMore": true
  }
}

Response Fields

FieldTypeDescription
dataarrayArray of author objects
data[].idstringUnique identifier for the author
data[].namestringAuthor's display name
data[].descriptionstringShort biography or description of the author
data[].imageUrlstring | nullURL to the author's profile image, or null if not available
data[].nationalitystring | nullAuthor's nationality
data[].birthYearnumber | nullAuthor's birth year
data[].deathYearnumber | nullAuthor's death year, or null if still alive
data[].categoriesstring[]List of category slugs associated with the author
data[].likeCountnumberTotal number of likes across all the author's quotes
data[].quoteCountnumberNumber of approved quotes by this author
pagination.totalnumberTotal number of matching authors
pagination.limitnumberNumber of results per page
pagination.offsetnumberCurrent offset
pagination.hasMorebooleanWhether more results are available

Get Author by ID

Retrieve a single author by their unique identifier. Optionally include the author's quotes in the response.

GET /api/v1/authors/:id

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the author

Query Parameters

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

Example Request

# Get author without quotes
curl -H "X-API-Key: your_api_key_here" \
  "https://quotegallery.nl/api/v1/authors/xyz789"

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

Example Response

{
  "data": {
    "id": "xyz789",
    "name": "Steve Jobs",
    "description": "Co-founder of Apple Inc.",
    "imageUrl": "https://...",
    "nationality": "American",
    "birthYear": 1955,
    "deathYear": 2011,
    "categories": ["technology", "leadership"],
    "likeCount": 256,
    "quoteCount": 45,
    "quotes": [
      {
        "id": "abc123",
        "text": "Stay hungry, stay foolish.",
        "language": "en",
        "categories": ["inspirational"],
        "likeCount": 128
      }
    ]
  }
}

Response Fields

FieldTypeDescription
dataobjectThe author object
data.idstringUnique identifier for the author
data.namestringAuthor's display name
data.descriptionstringShort biography or description
data.imageUrlstring | nullURL to the author's profile image
data.nationalitystring | nullAuthor's nationality
data.birthYearnumber | nullAuthor's birth year
data.deathYearnumber | nullAuthor's death year, or null if still alive
data.categoriesstring[]List of category slugs
data.likeCountnumberTotal likes across all quotes
data.quoteCountnumberNumber of approved quotes
data.quotesarray | undefinedAuthor'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 text
data.quotes[].categoriesstring[]Categories the quote belongs to
data.quotes[].likeCountnumberNumber of likes on the quote

Error Responses

StatusDescription
404Author not found — the provided ID does not match any approved author
401Unauthorized — missing or invalid API key

Use Cases

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

Author Search Autocomplete

Build a search-as-you-type experience for finding authors:

async function searchAuthors(apiKey, query) {
  if (!query || 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((author) => ({
    id: author.id,
    name: author.name,
    nationality: author.nationality,
    quoteCount: author.quoteCount,
  }))
}

Author Profile with Quotes

Display a full author profile page with their quotes:

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.ok) {
    if (response.status === 404) {
      throw new Error('Author not found')
    }
    throw new Error(`API error: ${response.status}`)
  }

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

Browse Authors by Category

List all authors associated with a specific category:

async function getAuthorsByCategory(apiKey, category) {
  const authors = []
  let offset = 0
  const limit = 100

  while (true) {
    const response = await fetch(
      `https://quotegallery.nl/api/v1/authors?categories=${category}&limit=${limit}&offset=${offset}`,
      { headers: { 'X-API-Key': apiKey } }
    )

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

    if (!pagination.hasMore) break
    offset += limit
  }

  return authors
}

Author Statistics Dashboard

Aggregate author data for analytics:

import requests
import os

api_key = os.environ['QUOTE_GALLERY_API_KEY']
headers = {'X-API-Key': api_key}

# Fetch all authors
authors = []
offset = 0

while True:
    response = requests.get(
        'https://quotegallery.nl/api/v1/authors',
        headers=headers,
        params={'limit': 100, 'offset': offset}
    )

    data = response.json()
    authors.extend(data['data'])

    if not data['pagination']['hasMore']:
        break
    offset += 100

# Calculate statistics
total_quotes = sum(a['quoteCount'] for a in authors)
total_likes = sum(a['likeCount'] for a in authors)
top_authors = sorted(authors, key=lambda a: a['likeCount'], reverse=True)[:10]

print(f'Total authors: {len(authors)}')
print(f'Total quotes: {total_quotes}')
print(f'Total likes: {total_likes}')
print(f'\nTop 10 authors by likes:')
for i, author in enumerate(top_authors, 1):
    print(f'  {i}. {author["name"]} — {author["likeCount"]} likes, {author["quoteCount"]} quotes')
Copyright © 2026