Pagination

List endpoints return paginated results. The API uses two pagination patterns depending on the endpoint.

Response Format

Since version 2026-01, all list endpoints return results wrapped in an object:

{
  "results": [...],
  "total": 42
}

Search endpoints also include a cursor for efficient pagination:

{
  "results": [...],
  "total": 42,
  "cursor": "eyJhIjpbIjE3NjUyNjIxODYuMjgyIiw2NCw2NF19"
}

In versions before 2026-01, some endpoints returned bare arrays instead of wrapper objects. If you are upgrading from an older version, update your code to read from the results property.

Cursor-Based Pagination

Cursor pagination is used by endpoints that may return large or frequently changing result sets, such as Search Publications.

Pass the cursor from the previous response as the ?after parameter to get the next page:

# First request
curl -s "https://server.livingdocs.io/api/2026-01/publications/search?limit=10" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Response includes: "cursor": "eyJhIjpb..."

# Next page
curl -s "https://server.livingdocs.io/api/2026-01/publications/search?limit=10&after=eyJhIjpb..." \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Continue passing the cursor until the response returns fewer results than the limit, or an empty results array.

Offset-Based Pagination

Offset pagination is used by list endpoints such as Latest Publications. Use ?limit and ?offset to control the page:

# First page (default: limit=100, offset=0)
curl -s "https://server.livingdocs.io/api/2026-01/documents/latestPublications?limit=50" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Second page
curl -s "https://server.livingdocs.io/api/2026-01/documents/latestPublications?limit=50&offset=50" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

The maximum offset is 10000. For larger datasets, prefer range-based filters like ?id.gt or ?publishedAt.gte instead:

# Fetch documents with id > 1000
curl -s "https://server.livingdocs.io/api/2026-01/documents/latestPublications?id.gt=1000&limit=100" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Event Pagination

Publication Events use id-based range filters for pagination. Fetch a page, take the last event's id, then request the next page with ?id.gt:

# First page
curl -s "https://server.livingdocs.io/api/2026-01/publicationEvents?limit=1000" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

# Response includes events with ids up to e.g. 5000

# Next page
curl -s "https://server.livingdocs.io/api/2026-01/publicationEvents?limit=1000&id.gt=5000" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Quick Reference

PatternParameterMaxUsed by
Cursor?afterSearch endpoints
Offset?offset10000List endpoints
Range filter?id.gt, ?publishedAt.gteList and event endpoints

Next Steps

⌘ K to search