For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Book a demoLog inStart for free
  • Overview
    • Introduction
    • How it works
    • Quickstart
    • Customer showcase
  • Working with SDKs
    • Project structure
    • Adding custom code
    • Migrating to Replay
    • Capabilities
  • Generators
      • Global headers
      • Dynamic authentication
      • Auto-pagination
      • Idempotency headers
      • Retries with backoff
  • Reference
    • generators.yml
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
Book a demoLog inStart for free
On this page
  • Generated SDK behavior
  • Setting up auto-pagination
Request behavior

Configure auto-pagination

||View as Markdown|
Was this page helpful?
Edit this page
Previous

Dynamic authentication

Next

Configure idempotency headers

Enterprise feature

This feature is available only for the Enterprise plan. To get started, reach out to support@buildwithfern.com.

Fern’s auto-pagination supports offset, cursor, URI, and path-based pagination schemes, providing SDK users with simple iterators to loop through all results instead of managing pagination complexity manually.

Generated SDK behavior

TypeScript
Python

Once you’ve configured pagination for an endpoint, Fern generates a TypeScript SDK method that returns a Page<T> where T is the underlying data type. The Page<T> implements the AsyncIterable interface, allowing your users to use it in a for await loop.

1const response = await client.users.list();
2for await (const user of response) {
3 console.log(user);
4}

Setting up auto-pagination

Define your pagination scheme and specify where your results are located:

1...
2paths:
3 /plants:
4 x-fern-pagination:
5 offset: $request.page_number
6 results: $response.results
7...

For full configuration details, see Pagination in OpenAPI.