Pagination
How to page through the list endpoints of the Jobiflow API
Pagination
The list endpoints of the Jobiflow API page by offset: you ask for a page number and a page size, and each answer has the items and the page numbers.
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 0 | Zero-based page index; a negative value counts as 0 |
size | integer | 20 | Items per page, 1 to 100; a value outside is clamped into that range |
Example: the second page of job listings, 10 per page:
GET /public/v1/job-listings?page=1&size=10
X-API-Key: <your_key>Response
Every list endpoint answers the same way:
{
"data": [ /* the items on this page */ ],
"pagination": {
"page": 1,
"size": 10,
"totalElements": 47,
"totalPages": 5
}
}| Field | Description |
|---|---|
data | The items on this page |
pagination.page | The page index (zero-based) |
pagination.size | The page size |
pagination.totalElements | All matching items |
pagination.totalPages | The number of pages at this size |
Iterating All Pages
async function fetchAllListings(apiKey: string) {
const results = [];
let page = 0;
while (true) {
const res = await fetch(
`https://api.jobiflow.com/public/v1/job-listings?page=${page}&size=100`,
{ headers: { 'X-API-Key': apiKey } }
);
const body = await res.json();
results.push(...body.data);
if (page + 1 >= body.pagination.totalPages) break;
page++;
}
return results;
}Endpoints that page
GET /public/v1/job-listingsGET /public/v1/applicationsGET /public/v1/candidates
The other lists (webhooks, sectors, tags) answer a plain array.