Regarding pagination, what's the recommended way t...
# community-help
g
Regarding pagination, what's the recommended way to know if there's a next page?
j
The response will contain a
found
key with the total number of documents across all pages.
You’d use that along with the
per_page
and
page
search parameters to determine the total number of pages
g
Thanks, will do that. It only works though if
per_page
is always the same. One could want to have the first page have fewer items to load faster, and in that case it would involve a bit more math, so a
has_more
could be nice. But your suggestion will work for me.