Pagination
Every list endpoint returns the same envelope and accepts the same three query parameters. Learn it once, use it everywhere.
The envelope
every list response
{
"data": [ … ],
"pagination": {
"page": 1,
"limit": 20,
"total": 47,
"has_more": true
}
}total is the full result count across all pages. has_more is true when page × limit < total. Loop on it instead of computing page math yourself. Some endpoints (affiliates, content) add a sibling summary object with aggregate totals; the data/pagination shape never changes.
Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | 1-based page number. Default 1. |
| limit | integer | Items per page. Default 20, maximum 100. Values above 100 are clamped, not rejected. |
| offset | integer | Alternative to page. Converted internally to page = floor(offset / limit) + 1, so offsets that are not multiples of limit are rounded down to the containing page. |
Pass either page or offset, not both. When both are present, offset wins.
Worked example
request: page 2, 50 per page
curl "https://api.ugcroster.com/v1/campaigns?page=2&limit=50" \
-H "Authorization: Bearer rsk_your_key_here"response 200
{
"data": [
{
"id": "form_abc123",
"title": "Summer Skincare Launch",
"status": "live",
"campaign_type": "organic_ugc",
"applicant_count": 47,
"hired_count": 8,
"created_at": "2026-05-20T09:00:00Z"
}
],
"pagination": { "page": 2, "limit": 50, "total": 63, "has_more": false }
}Fetching everything
javascript
const BASE = 'https://api.ugcroster.com/v1';
const headers = { Authorization: 'Bearer rsk_your_key_here' };
async function fetchAll(path) {
const all = [];
let page = 1;
while (true) {
const res = await fetch(`${BASE}${path}?page=${page}&limit=100`, { headers });
const { data, pagination } = await res.json();
all.push(...data);
if (!pagination.has_more) return all;
page += 1;
}
}
const roster = await fetchAll('/roster');On metered data keys, remember that /v1/creators/search charges 10 credits per request regardless of limit. Always paginate searches at limit=100.