GTM Engineering term, automation and APIs

API Pagination

API pagination is how an API splits a large set of results into smaller pages, so a client fetches records in chunks using a page number, offset or cursor.

Also called: pagination, cursor pagination, offset pagination, paging, paginated API

API Pagination sits under every stage: it's part of the data and systems the whole funnel runs on, near related terms like API, REST API and API rate limit (the blue squares).

API pagination is how an API splits a big set of results into smaller pages. Instead of returning 50,000 contacts in one response, the API returns 100 at a time. The client asks for the next page, then the next, until there are none left. Miss this, and every export quietly stops at page one.

How it works

You call an endpoint like "list contacts". The response includes a page of records plus something that tells you how to get the next page. There are three common styles:

  • Page number: you ask for page 1, page 2, page 3. Simple, and common in older APIs.
  • Offset and limit: you ask to skip a number of records and take a set amount, like skip 200, take 100. Easy to reason about, but results can shift if records change while you read.
  • Cursor: the response includes an opaque token pointing to where this page ended. You send that token back to get the next page. Most modern REST APIs use cursors because they stay stable while data changes.

Some APIs also return a "next" URL you can call directly, or a "has more" flag. Your loop keeps going until the API says there is nothing left.

Pagination interacts with API rate limits. Each page is one call. A 50,000-record export at 100 per page is 500 calls. If the limit is 10 calls per second, you need pauses between pages or you'll hit 429 errors halfway through.

Example

A team wants to pull every company from their CRM into a sheet for an account review (all numbers hypothetical). The CRM has 42,000 company records.

Their first automation calls "list companies" once and writes the results. The sheet shows 100 rows. Nobody notices for a week, because the top 100 look plausible.

The fixed version runs a loop:

Step What happens
1 Call list companies with a page size of 100
2 Write the 100 records
3 Read the next cursor from the response payload
4 Call again with that cursor
5 Stop when no cursor comes back

That is 420 calls. At a limit of 100 calls per 10 seconds, the export needs at least 42 seconds plus processing time. Adding a short pause between calls keeps it safely under the limit. The finished sheet has 42,000 rows, and a count check against the CRM total confirms nothing was missed.

By company size

Small business: you mostly meet pagination when a no-code tool returns fewer rows than expected. Look for a setting like "return all results" or "paginate" in the module. If the tool has none, export a CSV from the app instead.

Mid-market: RevOps builds regular syncs and backfills, so pagination shows up weekly. Write the loop once as a reusable piece, log the page count and total, and compare totals to the source system. Use batch processing to write records in groups rather than one by one.

Enterprise: exports run into millions of records. Teams use bulk export endpoints where the vendor offers them, run jobs overnight, and checkpoint the last cursor so a failed job resumes instead of restarting. Incremental syncs that fetch only records changed since the last run replace full pulls.

Why it matters for GTM teams

Pagination bugs are some of the quietest data failures we see. Nothing errors. The workflow succeeds, writes 100 rows, and the team makes decisions on a sliver of the data. We treat "did we get every record?" as a required check on any sync. Every pull logs the expected total and the actual count, and a mismatch alerts someone. It's a few minutes of work that prevents a quarter of bad reporting.

Common mistakes

  • Fetching only the first page and assuming that's everything.
  • Using offset pagination on data that changes during the export, which skips or repeats records.
  • Ignoring rate limits, so the loop fails halfway with no record of where it stopped.
  • Not saving the last cursor, so a failed run must start over from zero.
  • Building a new page loop in every workflow instead of reusing one tested version.
  • Never comparing the final count to the source total.

FAQ

What is the difference between offset and cursor pagination?

Offset pagination asks for records by position, like skip 200 and take 100. Cursor pagination hands you a pointer to where the last page ended, and you pass it back to get the next one. Cursors stay accurate when records are added or deleted mid-export, while offsets can skip or repeat records.

Why did my API export only return 100 records?

Almost certainly because the API paginates and you only fetched the first page. Look in the response for a next cursor, a next link or a total count, and keep requesting until there is no next page. Many automation tools need a loop or a built-in pagination setting turned on to do this.

How big should each page be?

Use the largest page size the API allows unless responses get slow or time out. Bigger pages mean fewer calls, which matters under rate limits. The API documentation usually lists a default and a maximum.

See all automation and APIs terms ↳