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.
The x-fern-pagination extension configures auto-pagination for list endpoints in your OpenAPI specification. Fern’s generated SDKs provide simple iterators that handle pagination automatically, so SDK users can loop through all results without managing pagination complexity manually.
To configure pagination:
- Annotate the desired paginated endpoint with the
x-fern-paginationextension - Specify the pagination scheme (
offset,cursor,next_uri, ornext_path) - Specify where your
resultsare located using dot-access notation
Configuration options
The x-fern-pagination extension supports the following properties:
Finding the location of your results
If your results are nested within the response object, use dot-access notation to specify the path. For example, if results are located in my_nested_object.inner_list, the results path would be $response.my_nested_object.inner_list.