The pagination object
Every list response includes a pagination object next to your data:
Fetching the next page
- Make your search as usual.
- Read
pagination.next_cursorfrom the response. - Repeat the same request, adding
cursor=<next_cursor>. - Stop when
has_moreisfalse(at that pointnext_cursorisnull).
Keep your query the same between pages. The cursor already remembers your search
text and filters, so you only need to add
cursor. Set per_page on the first
request; following pages keep that same page size.Which endpoints paginate?
Three search endpoints support cursor pagination:- Search photos by text —
GET /api/v1/search/photos - Search photos by image —
POST /api/v1/search/photos - Find similar photos —
GET /api/v1/photos/{photo_id}/similar
pagination.next_cursor and pass it back as cursor to
get the next page, stopping when has_more is false. (On some plans the number of similar
photos is capped to a single page — in that case has_more is false from the start.)
For image search, you only upload the image on the first request. To get the next
page, send the request again with just
cursor=<next_cursor> — no need to re-upload the
image. The cursor already remembers your image and filters.cursor: facets, collections
and usage return their full list directly.