API Pagination Page Count Calculator
Work out how many pages and API requests it takes to fetch a dataset at a given page size, plus the total time once you account for per-request latency.
How it works
Pages = ⌈total ÷ page size⌉ · Batches = ⌈pages ÷ concurrency⌉ · Time = batches × per-request time
Paginated APIs hand back a fixed number of records per request, so fetching a full dataset means ceil(total ÷ page size) requests — you always round up because the last page carries the remainder. Total time depends on latency per request and how many you run in parallel: with one request at a time it is pages times latency, and concurrency divides that by how many you fetch at once (rounded up into batches). Bigger pages cut the request count but each response is heavier and may hit size or rate limits, so the sweet spot balances page count against per-request cost.
Worked example
25,000 records at 100 per page is ceil(25000 ÷ 100) = 250 requests, the last page full at 100. Serially at 250 ms each that is 62.5 s; fetching 5 pages in parallel needs ceil(250 ÷ 5) = 50 batches, about 12.5 s.
Frequently asked questions
Should I use a bigger page size to go faster?
Up to a point. Larger pages mean fewer requests and less per-request overhead, but heavier responses that take longer to generate and transfer and may exceed the API’s maximum page size or payload limit. Many APIs cap page size around 100–1000; test a few sizes and watch response time and error rates.
How do rate limits affect this?
If the API allows only so many requests per second, your effective concurrency is capped by the limit no matter how many parallel workers you run. Divide the request count by the allowed rate to get a floor on total time, and add backoff for any 429 responses so retries do not inflate the count.
Does cursor pagination change the count?
The number of pages is still total ÷ page size, but cursor (keyset) pagination is generally faster and more consistent than offset pagination on large datasets because the database does not scan and skip earlier rows for each page. The request count is the same; the per-request time tends to be lower and steadier.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.