Pagination
How to paginate through list endpoints in the Jobiflow API
Pagination
All list endpoints in the Jobiflow API use offset-based pagination with a consistent data / pagination response envelope.
Request Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 0 | Zero-based page index |
size | integer | 20 | Number of items per page (max 100) |
Example — fetch the second page of job listings with 10 per page:
GET /public/v1/job-listings?page=1&size=10
X-API-Key: <your_key>Response Envelope
Every paginated endpoint returns the same envelope:
{
"data": [ /* array of items */ ],
"pagination": {
"page": 1,
"size": 10,
"totalElements": 47,
"totalPages": 5
}
}| Field | Description |
|---|---|
data | Array of result objects for this page |
pagination.page | Current (zero-based) page index |
pagination.size | Number of items requested per page |
pagination.totalElements | Total number of matching records |
pagination.totalPages | Total 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 support pagination
GET /public/v1/job-listingsGET /public/v1/applicationsGET /public/v1/candidates