Skip to main content
Version: 1.0.0

Pagination

Some of our /GET endpoints support pagination to efficiently handle large sets of data. Pagination allows you to retrieve a subset of results based on specified criteria. Our implementation uses offset and limit parameters.

Parameters


offset Optional integer, default 0 : The number of records to skip before starting to return results. This is used to specify the starting point of the results to be fetched.

limit Optional integer, default 50 : The maximum number of records to return.


Example Request To fetch a subset of results with a specific offset and limit, include the offset and limit parameters in your query string:


const got = require('got');
const directoryArray = await got.get('https://api.ppd.iopole.fr//v1/directory?value=IOPOLE&offset=5000&limit=50',).json();

Handling Edge Cases

If the offset value exceeds the total number of records, an empty array will be returned in the data field.
If the limit value is not specified, the default value will be used.
If the offset or limit values are not valid integers, the server will return a 400 Bad Request response.

Notes

The maximum allowed value for limit is 100. Requests specifying a higher limit will be constrained to 100.
Using pagination helps in reducing the amount of data transferred and processed, thereby improving performance.