List endpoints return paginated results using cursor-based pagination.
Paginated responses include a pagination object alongside the data array:
{
"data": [
{ "id": "abc-123", "title": "..." },
{ "id": "def-456", "title": "..." }
],
"pagination": {
"has_more": true,
"next_cursor": "eyJpZCI6ImRlZi00NTYifQ==",
"total_count": 142
}
}
| Field | Description |
|---|
has_more | true if more results exist beyond this page |
next_cursor | Opaque cursor to pass as cursor query parameter for the next page. null if no more results. |
total_count | Total number of matching records |
Query parameters
| Parameter | Default | Max | Description |
|---|
limit | 25 | 100 | Number of results per page |
cursor | — | — | Cursor from a previous response’s pagination.next_cursor |
Cursors are opaque strings. Do not modify, decode, or construct cursors manually — they are subject to change without notice. Always use the next_cursor value exactly as returned.
Paginating through results
Fetch the first page
Make a request with your desired limit and no cursor parameter.curl "https://api.app.hrizn.io/v1/public/ideaclouds?limit=10" \
-H "X-API-Key: hzk_your_key_here"
Check for more results
Inspect pagination.has_more in the response. If true, there are more pages.
Fetch subsequent pages
Pass the next_cursor value as the cursor query parameter:curl "https://api.app.hrizn.io/v1/public/ideaclouds?limit=10&cursor=eyJpZCI6ImRlZi00NTYifQ==" \
-H "X-API-Key: hzk_your_key_here"
Repeat until done
Continue fetching pages until has_more is false or next_cursor is null.
Full iteration example
async function fetchAll(baseUrl: string, apiKey: string) {
const results = [];
let cursor: string | null = null;
do {
const url = new URL(baseUrl);
url.searchParams.set("limit", "100");
if (cursor) url.searchParams.set("cursor", cursor);
const res = await fetch(url, {
headers: { "X-API-Key": apiKey },
});
const json = await res.json();
results.push(...json.data);
cursor = json.pagination.next_cursor;
} while (cursor);
return results;
}