I am using an offset increment pagination strategy...
# ask-ai
j
I am using an offset increment pagination strategy, but next_page_token.next_page_token returns nothing in the request body. Which parameter should I use ?
k
When using the Offset Increment pagination strategy in Airbyte, the value for the next offset is typically managed internally by the paginator and injected into the request as configured (e.g., as a query parameter, header, or body field). However, if you are trying to reference the next offset value (commonly called next_page_token) within a request body or parameter using Jinja interpolation, you may encounter issues where {{ next_page_token.next_page_token }} returns nothing. Based on the issues and documentation, the correct variable to use can depend on the context and the features enabled in your connector: - In some cases, the next page token is available under the stream_partition object, so you can try using:
Copy code
{{ stream_partition['next_page_token'] }}
or
Copy code
{{ stream_partition.next_page_token }}
This workaround has been reported to work when parameterized requests are not used, but may not work with parent streams or parameterized requests enabled. In those cases, the next_page_token may not be present in stream_partition either, which is a known issue currently being tracked by Airbyte ([GitHub Issue #40697](https://github.com/airbytehq/airbyte/issues/40697)). - The standard and documented way is to use {{ next_page_token.next_page_token }}, but as you observed, this may return nothing in some scenarios, especially with Offset Increment pagination and certain connector configurations. This is a known bug and is being discussed in the Airbyte community ([GitHub Issue #46687](https://github.com/airbytehq/airbyte/issues/46687), [GitHub Issue #40697](https://github.com/airbytehq/airbyte/issues/40697)). Summary: If {{ next_page_token.next_page_token }} is not working, try using {{ stream_partition.next_page_token }}. If neither works (especially with parameterized requests or parent streams), this is a known limitation/bug in Airbyte's current implementation, and there may not be a reliable workaround until it is fixed by the Airbyte team. For more details and updates, see the related GitHub issues: - [No code connector builder cannot use next_page_token in request JSON body interpolation](https://github.com/airbytehq/airbyte/issues/40697) - [next_page_token in query parameters returns None](https://github.com/airbytehq/airbyte/issues/46687)