limit and offset parameters.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Results per page (1-100) |
offset | integer | 0 | Number of results to skip |
Response format
{
"data": [
{ "id": "...", "viewCount": 1250000 },
{ "id": "...", "viewCount": 980000 }
],
"pagination": {
"total": 147,
"limit": 20,
"offset": 0,
"has_more": true
}
}
| Field | Description |
|---|---|
total | Total number of results |
limit | Current page size |
offset | Current offset |
has_more | true if more results exist beyond this page |
Paginating through results
const API = 'https://api.reel25.com/api/v1';
const headers = { 'Authorization': 'Bearer reel25_sk_...' };
let offset = 0;
const limit = 20;
let allVideos = [];
while (true) {
const res = await fetch(
`${API}/videos?limit=${limit}&offset=${offset}`,
{ headers }
);
const { data, pagination } = await res.json();
allVideos.push(...data);
if (!pagination.has_more) break;
offset += limit;
}
console.log(`Fetched ${allVideos.length} videos`);
import requests
api = 'https://api.reel25.com/api/v1'
headers = {'Authorization': 'Bearer reel25_sk_...'}
offset = 0
limit = 20
all_videos = []
while True:
response = requests.get(
f'{api}/videos',
headers=headers,
params={'limit': limit, 'offset': offset}
)
result = response.json()
all_videos.extend(result['data'])
if not result['pagination']['has_more']:
break
offset += limit
print(f'Fetched {len(all_videos)} videos')
Which endpoints support pagination?
| Endpoint | Default limit |
|---|---|
GET /videos | 20 |
GET /accounts/:id/videos | 20 |
GET /folders/:id/videos | 30 |
GET /folders/:id/accounts | 30 |
GET /radar/history | 20 |