Hello @Paulo Torres
We don't have any javascript API for the use case you mentioned. Given the fact that the pagination is server-side, we don't have access to the whole data set, so unfortunately we don't have a way to cover that use case.
Cheers,
GM