The pagination object
Every list response includes a pagination object next to your data:
| Field | Meaning |
|---|---|
per_page | How many photos are on each page. You choose this on the first request with per_page (1–100, default 20). |
has_more | true if there is at least one more page after this one. |
next_cursor | The token to pass as cursor to get the next page. It is null when has_more is false. |
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 picture —
POST /api/v1/search/photos(an upload, or aphoto_id) - 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.Searching with photo_id instead of an upload pages the same way. The per-plan cap on
similar photos applies to it too, so on a capped plan you get one page and has_more is
false.cursor: facets, collections
and usage return their full list directly.