The Octogen search endpoint returns results one page at a time. When more products match your query than fit on a single page, the response includes aDocumentation Index
Fetch the complete documentation index at: https://www.octogen.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
nextCursor field you pass back to fetch the next page. This cursor-based model ensures you can iterate through a full result set consistently, even as the underlying catalog updates.
How cursor-based pagination works
EachPOST /v1/products/search response contains:
items— the current page of products (up tolimititems)nextCursor— a string token encoding the engine’s continuation state, ornullif you have reached the last page
nextCursor value passed as cursor. Keep repeating until nextCursor is null.
The pagination pattern
Send your initial search request
Issue
POST /v1/products/search with your filters and an optional limit (1–100, default 50). Do not include a cursor on the first request.Check nextCursor in the response
If
nextCursor is null, the response is the only (or last) page — you are done. If nextCursor is a non-null string, there are more results.Send the next request with cursor
Repeat the same request, passing the
nextCursor value as cursor. Keep all other parameters — catalog, q, facets, price_min, price_max, limit — identical to the original request.Complete pagination loop
The examples below collect all matching products into a list. For large catalogs, consider processing each page as it arrives rather than accumulating everything in memory.The limit parameter
Setlimit to control how many items the API returns per page. The valid range is 1–100 and the default is 50.
Smaller page sizes reduce response latency for interactive use cases. Larger page sizes reduce the total number of round trips for batch jobs. Keep limit consistent across pages: changing it mid-iteration does not cause an error, but it may produce unexpected page boundaries.