Jobiflow LogoDocs

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

ParameterTypeDefaultDescription
pageinteger0Zero-based page index; a negative value counts as 0
sizeinteger20Items 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
  }
}
FieldDescription
dataThe items on this page
pagination.pageThe page index (zero-based)
pagination.sizeThe page size
pagination.totalElementsAll matching items
pagination.totalPagesThe 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-listings
  • GET /public/v1/applications
  • GET /public/v1/candidates

The other lists (webhooks, sectors, tags) answer a plain array.

On this page