From 6886315a447ea68c1c0a18106ddfcb62dc347235 Mon Sep 17 00:00:00 2001 From: ZacxDev Date: Mon, 13 Jul 2026 16:51:14 -0500 Subject: [PATCH] docs(creators): note totalItems/totalPages are lower bounds on ?query= search MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The /api/v1/creators search path (civitai #3097) dropped the pathological exact COUNT (username LIKE '%q%' ∩ has-models: ~800ms-1.4s per keystroke request) in favour of a take+1 hasMore probe. On the query path totalItems/totalPages are now monotonic lower bounds (exact on the final page); nextPage is the authoritative next-page signal. The unfiltered listing keeps its exact cached count. Document this for external API consumers. --- site/reference/creators.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/site/reference/creators.md b/site/reference/creators.md index 8bc1e28..185567a 100644 --- a/site/reference/creators.md +++ b/site/reference/creators.md @@ -55,12 +55,20 @@ endpoint. - `modelCount` is only included when greater than zero; creators with no published models are excluded from the listing entirely. - `image` is null when the creator has no avatar. +- When a `query` is supplied, `metadata.totalItems` and `metadata.totalPages` + are **lower bounds**, not exact counts. They grow monotonically as you page + and are exact only once you reach the final page. Treat the presence of + `metadata.nextPage` as the authoritative "another page exists" signal rather + than comparing `currentPage` against `totalPages`. The unfiltered listing (no + `query`) still returns an exact `totalItems`/`totalPages`. ### Notes - For very deep traversals, scope with `?query=` rather than paging linearly — the listing is sorted alphabetically by username, so `query=A`, `query=B`, - ... is a reliable way to walk the full set. + ... is a reliable way to walk the full set. Page within each `query` by + following `metadata.nextPage` until it is absent (on the search path the total + counts are lower bounds — see the note above). ### Examples