We use the pdok locatieserver reverse api. We would like to have pagination in our front-end. But as the api gets start and rows parameters, it just returns the numFound equal or less than the rows. How can I get the totalNumber of records based on the criteria and then do the pagination on that?
Hi Narjes,
For performance reasons you can’t get the totalNumber of records.
What you could do is setting to rows to 100 (max) and do subsequent requests where you increase start with steps of 100. When numFound < 100 you can stop.
This way the totalNumber will be < 10.100, which will cost you 101 requests.
Hope it is feasible for you. Otherwise I’m curios what use case you have for returning 10.100 records on you frontend.
Kind regards,
Eric
1 like