---
title: "Authors"
description: "API reference for Author endpoints - list, search, and retrieve authors with their metadata and quotes."
canonical_url: "https://docs.quotegallery.nl/docs/api/authors"
---
# 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

```text
GET /api/v1/authors
```

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

</tabs-item>

<tabs-item label="JavaScript">

```js
const response = await fetch(
  'https://quotegallery.nl/api/v1/authors?search=einstein&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/authors',
    headers={'X-API-Key': os.environ['QUOTE_GALLERY_API_KEY']},
    params={'search': 'einstein', 'limit': 5}
)

data = response.json()
```

</tabs-item>
</tabs>

```json
{
  "data": [
    {
      "id": "xyz789",
      "name": "Albert Einstein",
      "description": "Theoretical physicist, developer of the theory of relativity.",
      "imageUrl": "https://...",
      "imageAttribution": "Photographer name",
      "imageLicense": "CC BY-SA 4.0",
      "imageSourceUrl": "https://commons.wikimedia.org/wiki/File:...",
      "descriptionSource": "Wikipedia",
      "descriptionSourceUrl": "https://en.wikipedia.org/wiki/Albert_Einstein",
      "nationality": "German",
      "birthYear": 1879,
      "deathYear": 1955,
      "categories": ["wisdom", "philosophy"],
      "likeCount": 512,
      "quoteCount": 38
    }
  ],
  "pagination": { "total": 2, "limit": 5, "offset": 0, "hasMore": false }
}
```

<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 author 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>
      Short biography
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].imageUrl
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Profile image URL
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].imageAttribution
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Credit line for the profile image (photographer or artist)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].imageLicense
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      License of the profile image, for example <code>
        CC BY-SA 4.0
      </code>
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].imageSourceUrl
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Link to the original image page with its full license details
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].descriptionSource
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Where <code>
        description
      </code>
      
       was taken from, for example <code>
        Wikipedia
      </code>
      
      . <code>
        null
      </code>
      
       when no source is recorded. Some older descriptions were taken from Wikipedia before this field existed; treat text of that kind as CC BY-SA 4.0
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].descriptionSourceUrl
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Link to the page <code>
        description
      </code>
      
       was taken from
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].nationality
      </code>
    </td>
    
    <td>
      <code>
        string | null
      </code>
    </td>
    
    <td>
      Nationality
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].birthYear
      </code>
    </td>
    
    <td>
      <code>
        number | null
      </code>
    </td>
    
    <td>
      Birth year
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].deathYear
      </code>
    </td>
    
    <td>
      <code>
        number | null
      </code>
    </td>
    
    <td>
      Death year. Empty for a living person or when unknown
    </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 on the author
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        data[].quoteCount
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      Number of approved quotes
    </td>
  </tr>
</tbody>
</table>

A field with no value can be `null` or left out of the response.

<callout icon="i-lucide-triangle-alert">

When you show an author’s image or description, show the credit fields with it: `imageAttribution`, `imageLicense` and a link to `imageSourceUrl` for the image, and `descriptionSource` with a link to `descriptionSourceUrl` for the text. See [Terms of use and attribution](https://docs.quotegallery.nl/docs/guides/terms-and-attribution).

</callout>

## Get Author by ID

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

```text
GET /api/v1/authors/: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 50 of the author’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/authors/xyz789?include_quotes=true&language=en"
```

</tabs-item>

<tabs-item label="JavaScript">

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

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

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

</tabs-item>

<tabs-item label="Python">

```python
import requests, os

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

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

</tabs-item>
</tabs>

```json
{
  "data": {
    "id": "xyz789",
    "name": "Albert Einstein",
    "description": "Theoretical physicist, developer of the theory of relativity.",
    "imageUrl": "https://...",
    "imageAttribution": "Photographer name",
    "imageLicense": "CC BY-SA 4.0",
    "imageSourceUrl": "https://commons.wikimedia.org/wiki/File:...",
    "descriptionSource": "Wikipedia",
    "descriptionSourceUrl": "https://en.wikipedia.org/wiki/Albert_Einstein",
    "nationality": "German",
    "birthYear": 1879,
    "deathYear": 1955,
    "categories": ["wisdom", "philosophy"],
    "likeCount": 512,
    "quoteCount": 38,
    "quotes": [
      {
        "id": "abc123",
        "quoteNumber": 1043,
        "url": "https://quotegallery.nl/quotes/1043-imagination-is-more-important-than-knowledge",
        "text": "Imagination is more important than knowledge.",
        "language": "en",
        "categories": ["wisdom", "truth"],
        "likeCount": 89
      }
    ]
  }
}
```

The author fields are the same as in the list response, including the credit fields above. The `quotes` field is only present when `include_quotes=true`. Each quote object includes `id`, `quoteNumber`, `url`, `text`, `language`, `categories`, and `likeCount`.

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

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

## Examples

### Author profile page

```js
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

```js
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 }))
}
```


## Sitemap

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