Home App Docs Blog Github

What's the maximum limit allowed in a single content API call?

The maximum number of results returned in a single API call is 100, you can paginate results through the offset param,

something like this would make multiple api requests to get all the content from builder:

// pseudo code
const limit = 100;
let offset = 0;
const pages = await getResults({limit, offset});
while(pages.length === (limit + offset)) {
  offset += pages.length;
  pages.push( ... (await getResults({ limit, offset}));
return pages;
1 Like

how can we calculate the total number of items on the database so that the pagination can be done properly, e.g., deciding how to adjust the page size depending on the total number of items?

Hi @adler :wave: Thanks for reaching out.

We don’t currently have this functionality, but I will pass this along to our team as a feature request! We will keep you updated.

Thanks for the reply.
It’s a basic thing for an API payload to fetch data. Thus I’m really surprise this doesn’t exist with builder.

“data”: [///row columns],
“totalNumberOfRows”: 144000,
“currentPage”: 1,
“currentAmount”: 100