Configure auto-pagination
Pro and Enterprise feature
This feature is available only for the Pro and Enterprise plans. 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.
Setting up auto-pagination
Define your pagination scheme and specify where your results are located:
OpenAPI
Fern Definition
For full configuration details, see the docs for your API definition format: