Pagination is a crucial feature in API integration that helps manage and navigate through large datasets by dividing them into smaller, more manageable segments. This method ensures efficient data handling and prevents overwhelming both the API and your application with too much data at once.

In Superjoin’s CustomAPI, we currently support offset-based pagination, which is a common method used to incrementally retrieve data without loading everything simultaneously, which you can configure under the “data preview” section.

Configuring offset based pagination

When setting up offset-based pagination in Superjoin’s Custom API, you’ll encounter a few specific fields that help define how data is fetched in segmented ways.

Here’s a simplified explanation of each field to help you understand and configure pagination efficiently, even if you’re not deeply familiar with API mechanics:

FieldRequiredDescription
Offset should be set throughyesThis field determines where the offset value should be placed in your API request. You have three options: in the query parameters, in the headers, or in the body of the request.
Offset should be set as the property nameyesHere, you specify the exact name of the field that the API expects for the offset value.

For example, it could be simply offset, start, skip, or any other parameter name defined by the API.
No. of records per pagenoThis field allows you to define the number of records to fetch in each page.
Append offset in first API request as wellnoTypically, the initial API request does not include the offset parameter, starting from the very first record.

This field, which is set to false by default, allows you to decide whether to include the offset in the first request.