Technology team auditing Contentstack API pagination and record completeness
Back to Blog
Posted by Mahdi
Contentstack API Change

Contentstack limit=0 Change: Fix API Pagination

Contentstack changed limit=0 API behaviour. Audit integrations, add explicit pagination, verify complete datasets and monitor record totals.

Contentstack announced on 11 September 2026 that the limit query parameter for Content Delivery API and Content Management API requests now accepts positive integers only. A request using limit=0, an empty value or a non-numeric value now receives the default number of records for that resource instead of all matching records.

That sounds like a small API cleanup, but the failure mode matters. A legacy export, search-indexing job, static-site build, migration script or reporting feed may still receive HTTP 200 while processing only the first page. Contentstack documents 100 records as the common default, so a completeness problem can look like a successful run.

This guide is for Australian business owners, digital and marketing leaders, developers, operations teams and technology decision-makers who rely on Contentstack websites, apps or connected systems.

Three facts to put on the integration plan

The risk is silent partial data, not necessarily an obvious API failure.

11 September 2026

Contentstack announced the behavioural change for limit in CDA and CMA requests.

Positive integers only

Zero, empty and non-numeric values now fall back to the resource default instead of requesting every match.

Often 100 records

Contentstack documents 100 as a common first-page default, making completeness checks essential for larger datasets.

What changed and why it can be easy to miss

Before the change, some Contentstack integrations used limit=0 as shorthand for returning every matching record. Contentstack says that behaviour could create timeouts on large stacks. The platform now treats zero, empty and non-numeric values as invalid for an unlimited fetch and applies the endpoint's default page size.

The response may still be structurally valid. That means a health check that asks only whether the API returned 200 can pass while the business receives incomplete content.

CallerWhat partial data can look likeBusiness impact
Website or static buildOnly the first group of pages, products or locations is generatedMissing URLs, stale navigation or incomplete campaigns
Search indexingThe job replaces a complete index with its first pageValid content disappears from onsite search
Migration or exportThe script reports success with fewer records than the sourceIncomplete cutover, archive or compliance evidence
Reporting and dashboardsTotals fall without a corresponding API errorIncorrect operational or marketing decisions
Integration feedsCRM, PIM, DAM or personalisation receives a truncated setBroken customer journeys and inconsistent channels

The practical control is to treat record completeness as part of correctness. Status code, schema and latency matter, but the processed total must also match the expected result set.

Workflow for replacing Contentstack limit zero requests with verified pagination
Pagination workflow

Move from one unlimited request to verified batches

Inventory callers, choose an endpoint-safe page size, fetch every batch, verify totals, test restart behaviour and monitor completeness.

Find every caller that may rely on limit=0

Start with deployed behaviour, not a search of the main website repository alone. The parameter may be assembled in configuration, a shared SDK wrapper, a low-code workflow or a former agency's integration.

  1. Search code and configuration. Look for limit=0, empty limit variables, generic query builders and wrappers that translate a value such as all into zero.
  2. Inventory scheduled jobs. Include exports, imports, search indexing, sitemap generation, cache warming, reporting, content mirroring and backup processes.
  3. Inspect external consumers. Ask CRM, DAM, PIM, ecommerce, personalisation, translation and analytics owners whether they call CDA or CMA directly.
  4. Capture endpoint context. Record the API, resource, environment, locale, branch, filters, sort order, SDK version, credentials, owner and expected record volume.
  5. Check historical runs. A sudden drop to a round number near 100 is a useful signal, but absence of that pattern is not proof that every caller is safe.

Also check empty or non-numeric limit values. A configuration screen, environment variable or URL builder can produce those variants even when the source code contains no literal zero.

Use a complete pagination loop

Contentstack recommends a positive limit, advancing with skip, and using include_count=true to retrieve the total where the endpoint supports it. The exact page size and response shape are endpoint- and SDK-specific, so confirm them against the reference for the caller you are changing.

A robust implementation follows this sequence:

  1. Request the first page with an explicit positive page size and a stable filter and sort order.
  2. Capture the returned total when available and add the page's records to the result set.
  3. Advance skip by the number of records actually returned, not merely by a hoped-for page size.
  4. Continue until the processed count reaches the returned total or a documented short final page proves completion.
  5. Deduplicate by stable identifiers and report a mismatch if the unique processed total differs from the expected total.
pageSize = endpointSafePositiveLimit
skip = 0
expected = unknown

repeat:
  page = fetch(limit=pageSize, skip=skip, include_count=(skip == 0))
  if expected is unknown and page.count exists: expected = page.count
  processIdempotently(page.items)
  skip = skip + page.items.length
until (expected is known and skip >= expected) or page.items.length < pageSize

assert uniqueProcessed == expected when expected is known

Do not copy one maximum across every API. Contentstack's JavaScript Delivery SDK currently documents 100 items by default and a maximum of 250 for multiple-entry queries, while individual CMA resources can define their own limits and count behaviour.

Make the loop safe when content changes mid-run

Offset pagination is simple, but a changing dataset can move records between pages. If entries are added, removed or reordered while a long job is running, the integration can duplicate or skip items unless the design accounts for change.

  • Use a stable ordering. Choose a documented deterministic order with a unique tie-breaker where the API permits it.
  • Process idempotently. Upsert by Contentstack UID and relevant locale or branch rather than assuming every page is new.
  • Store progress carefully. Record the filter, environment, page position, last successful identifiers and run ID so a retry does not blindly restart destructive work.
  • Reconcile at the end. Compare unique processed identifiers and totals with the source, then flag additions or deletions that occurred during the run.
  • Separate retries from pagination. Retry only the failed request with bounded backoff; do not advance the cursor or offset until that page is accepted.

For a delivery mirror or offline store that needs an initial dataset followed by changes, evaluate Contentstack's Sync API. It uses a pagination_token when a sync result exceeds 100 records and produces a sync_token for later delta updates. That can be a better fit than repeatedly walking the entire content set, but it has different semantics and should be adopted deliberately.

Test above the default page size

A test stack with 12 entries cannot expose a first-page truncation bug. Build test data or use an approved representative environment that crosses the relevant endpoint's default and chosen page size.

ScenarioWhat to verifyEvidence to keep
Exactly one pageNo unnecessary extra processing and correct totalRequest count and unique record count
One page plus one recordThe second page is fetchedProcessed identifiers across both pages
Several full pagesTermination does not rely only on a short pageReturned total and final reconciliation
Zero matchesThe job completes cleanly without loopingZero expected and zero processed
Duplicate or changing recordsIdempotency and reconciliation detect movementUnique IDs, warnings and final status
HTTP 429 or transient 5xxThe same page is retried with bounded backoffRetry log without skipped offsets
Restart after interruptionResume or replay does not duplicate side effectsRun checkpoint and destination totals
Legacy parameter variantsZero, empty and non-numeric values are removed or rejected by your codeAutomated regression assertions

Run the end-to-end customer or operational journey as well. A function can return every record while a downstream indexer, CSV writer or database batch silently drops later pages.

A four-step plan for Australian teams

Prioritise visibility, then change and verify the integrations with the highest business impact.

1. Inventory

Name every CDA and CMA caller, owner, endpoint, dataset and downstream business process.

2. Measure

Compare historical, expected and current record totals; rank callers by impact and likelihood.

3. Remediate

Add explicit positive limits, complete pagination, idempotency, retry controls and reconciliation.

4. Release

Run production-shaped tests, deploy gradually, verify totals and retain rollback or replay evidence.

Monitor completeness, rate limits and downstream outcomes

Pagination adds requests, so monitoring should cover both completeness and API pressure. Contentstack currently documents a default Content Management API limit of 10 read requests per second per organisation and HTTP 429 when the allowance is exceeded; plan-specific limits can differ.

Track at least:

  • expected, returned and unique processed records for each run;
  • page count, page size and duration by endpoint and environment;
  • zero-result runs and suspicious round-number totals;
  • HTTP 429 and transient server failures, retry count and retry exhaustion;
  • duplicate identifiers, reconciliation differences and restart events;
  • downstream index, export, build or database totals;
  • the release version and owning team for every caller.

Make a count mismatch a failed run, not an informational log. For destructive syncs, avoid replacing or deleting destination records until the source walk has completed and reconciled. A truncated source response should not be allowed to erase valid downstream data.

Questions to ask your developer or support partner

  • Which websites, builds, exports, indexes and integrations call Contentstack CDA or CMA?
  • Do any callers send limit=0, an empty limit or a non-numeric value?
  • What are the documented default and maximum page sizes for each endpoint and SDK?
  • Does every job verify the expected total against unique records processed?
  • How does the loop behave if content changes during a long run?
  • Can a failed page retry without skipping data or duplicating side effects?
  • Have we tested with more records than the default page size?
  • Would the Sync API better fit any persistent content mirror?
  • Who receives an alert when source and destination totals differ?

A credible answer includes a caller inventory, endpoint-specific pagination rules, automated tests, reconciliation evidence and named ownership. A successful HTTP response is not enough.

Frequently asked questions

Contentstack pagination FAQs

Protect content delivery

Need help auditing a Contentstack integration?

VaniTech can inventory API callers, implement safe pagination, test production-sized datasets, reconcile downstream records and establish reliable monitoring.