In-depth practical guides

Check API pagination

Separate successful responses from complete collection and reconcile cursors and retrieved identifiers.

Updated :

File and table checks at an organised workstation.

AI-generated illustration

Did you obtain every expected page?

A 200 response may contain only the first page. Pagination can use a page number, offset, cursor or next link. This guide provides a reproducible collection check; the exact mechanism comes from the service documentation.

  1. Fix scope

    Keep query, filters, version and sort order. Record the announced total and whether it counts records, estimated results or distinct objects. Compare equivalent filters.

  2. Follow documented continuation

    Read the supplied next link or cursor. Log every transition and detect previously visited continuations. Do not invent addresses when the service supplies its own.

  3. Reconcile counts

    Count received records and unique identifiers separately. Overlapping pages inflate record totals. Retain repeated objects to inspect their versions before deduplication.

  4. Document the stop

    Record declared end, collection cap, error or interruption. For changing data, use a snapshot when available or disclose the limitation. Resume with unchanged filters.

Reading workshop

An insertion moves the boundary between pages

File DEMO-P07 shows a specific omission that deduplication cannot repair.

Fictional data and records for learning: none of these results comes from a live service query.

Two offsets applied across an insertion

The first page is read before X is added at the front. The second applies a numeric offset to a changed order; the initial state identifies F among the unreceived objects.

If the table exceeds the screen, scroll horizontally; arrow keys work when the region is focused.

Two offsets applied across an insertion
StepScenario dataDiagnosisDecision
Known initial stateOrder A,B,C,D,E,F; six objectsThis reference is supplied for the exercise.Retain order, scope and instant.
First requestoffset=0; size 3; A,B,CThree rows retained.Record parameters and raw response.
Insertion before continuingX added first: X,A,B,C,D,E,FAt offset=3, the next page becomes C,D,E.Compare repeated C and retain both occurrences.
Stop after two pagesA,B,C,C,D,E; 6 rows, 5 identifiersF from the initial state was not received; neither was X.Mark a partial stop; follow the continuation contract rather than raw count.

Does removing the second C make this batch complete?

Open each proposition to compare its diagnosis. More checks may still be needed.

Yes, the remaining identifiers are distinct.

No: removing repetition recovers neither F nor objects added later.

Yes, six rows match the initial total.

No: the source now has seven objects and offset does not preserve a stable boundary.

No; retain the omission and continue under a consistent contract.

Appropriate. F is known from the exercise’s initial state; without that reference, do not invent missing object identities.

Filled fictional record

Collection: DEMO-P07
Initial order: A,B,C,D,E,F
Page 1: offset=0; A,B,C
Insertion: X; new order X,A,B,C,D,E,F
Page 2: offset=3; C,D,E
Received: 6 rows; 5 identifiers; initial F absent
Decision: partial stop, not complete collection

Retain parameters, declared order and raw responses for each page. Separate the initial scope from the changing set; deduplication must remain a recorded transformation, not evidence of completeness.

Documentation of the rules, separate from fictional examples

Compare other situations and exercises

Two pages of 100 records

Fictional case: 200 records but 190 unique identifiers. Investigate overlap or updates before claiming 200 objects; repetition alone does not establish a provider error.

A cursor returns to the start

Illustrative case: a previously seen continuation reappears. Stop and retain the trace. A loop is not evidence of exhaustive collection.

Resume an interrupted collection consistently

Fictional case: the first two batches were retained, then the third request failed. Resuming with new filters no longer continues the same collection. Keep parameters, ordering, the returned continuation and identifiers already read together. Reuse the continuation only if the service still supports it; otherwise start a separate collection and compare results. Describe the available batches as partial until the completion signal has been received.

Guided reading of an excerpt

Six received rows do not prove six distinct objects

The fictional service reports six distinct objects. Two pages arrive and continuation ends. Comparing the total only with row count hides a duplicate.

Fictional exercise: identifiers, values and dates illustrate the check. This excerpt is not a live collected response.

  1. Follow the pages

    Retain order, filters, continuation and stopping reason. Both pages here contain three rows.

  2. Count two things

    Six rows arrive, but A03 occurs twice: only five unique identifiers.

  3. Qualify the gap

    Examine overlap, versions and total stability before claiming a complete collection.

Fictional collection log

total: 6
page 1: ["A01", "A02", "A03"]
page 2: ["A03", "A04", "A05"]
next: null

What to inspect

Reported total: six distinct objects
It is not reconciled with the five observed unique identifiers.
Continuation ends
This records the stopping point, not sufficient evidence of completeness when counts differ.
Does removing the duplicate repair the collection?

Reasoning

No. It removes a repetition without recovering a possibly missing object. Keep both occurrences to compare versions, then check collection conditions and what the total means.

Official references : GitHub — Using pagination in the REST API

Worked exercise

A matching total hides a missing object

Fictional example: the values and documents teach the method and do not describe a real organisation.

The API announces six objects. Filters match; no snapshot guarantee is documented.

If the table exceeds the screen, scroll horizontally; arrow keys work when the region is focused.

Starting information
Received pageIdentifiers, in order
1A, B, C
2C, D, E

Your checks

  1. Count received rows and distinct IDs.
  2. Compare both versions of C.
  3. Qualify the stopping reason and completeness.
Read the answer

Answer and decision

Six rows arrive but only five distinct IDs. Matching the announced total does not validate collection. Keep both C occurrences to compare versions; record a one-object discrepancy without inventing its ID. A changing source may alter its total during traversal.

If the case changes

If the total counts versions rather than objects, compare using that unit; the apparent duplicate may be legitimate.

Record to retain

Keep pages, continuations, versions, raw/unique counts, total meaning and incomplete status.

Record to retain

  • Query, filters and version
  • Page transitions and responses
  • Raw and unique counts
  • Stop reason and resume conditions

Official references

Related source profiles

Related protocols

Checks before reaching a conclusion

  • Are filters stable?
  • Are continuations unique?
  • Are repetitions explained?
  • Is the stopping reason explicit?

A collection log separating technical success, observed coverage and interrupted collection.

Frequently asked questions

Does a short final page suffice?

Only if the service contract says so. Filters or changing data can also shorten pages. Use the documented end signal.

Why retain repeated records?

They reveal overlap and version changes. Immediate removal can hide the cause or discard a useful observation.

Does an announced total guarantee completeness?

No. Compare the announced total, received objects and unique identifiers, then examine exclusions and changes during collection. Document discrepancies; reaching the total is insufficient if some objects repeat while others are missing.

TOOLS / REGISTERS

Information to record

Totals may be estimates or change during collection. A next link does not override quotas or documented access conditions.

  • Access date and time zone
  • Exact URL
  • HTTP status / redirect
  • Received continuation / cursor
  • Received record count
  • Distinct received identifiers
  • Version / revision
  • Limit / uncertainty
  • Decision / next action
  • Review owner
  • Next review

DOCUMENTED REFERENCE

Crossref: a short page can finish traversal despite a cursor

Crossref works paging follows service rules checked 22 October 2026. Documentation uses actual returned item counts for stopping. Do not copy OpenAlex termination: field names and contracts differ.

Crossref: a short page can finish traversal despite a cursor
ReferenceValue or formWhat it identifies
rows20 default · ≤ 1000Documented default twenty, maximum requested one thousand per call. Choose size for need rather than always maximizing.
rows=0Summary onlySummary-only query when totals suffice. It neither collects records nor proves they were inspected.
cursor=*StartInitializes traversal. Later requests use returned tokens, not invented offsets.
message.next-cursorNext tokenToken is message.next-cursor, with a hyphen, not meta.next_cursor. Confusing schemas can silently stop collection.
message.items.length < rowsLast pageFewer items than requested marks the final page. Further use can yield an empty list; token presence alone does not prove useful remaining data.
Index changesNot a frozen snapshotReindexing during collection can add or remove records from selection. Cursors do not establish an immutable snapshot.

Implication for the record

Keep query, filters, periods, requested size, page counts and unique DOIs. For very large datasets consider official public files or snapshots as appropriate. Document partition boundaries and duplicates.

Can announced totals replace received DOI counts?

No. Totals describe announced selection; received unique DOIs describe actual collection. Compare them without replacing one by the other.

Primary documentation

Documentation consulted on .