<@U04S8PLJWMT> i'm build custom connector, source...
# ask-ai
r
@kapa.ai i'm build custom connector, source API should be support page increment as it's has page and per page fields so, i configured same in the builder, although it's sync first page only, i'm unable to find the issue any suggestion? here pagination section YAML
Copy code
type: DefaultPaginator
page_token_option:
  type: RequestOption
  field_name: page
  inject_into: request_parameter
page_size_option:
  type: RequestOption
  field_name: per_page
  inject_into: request_parameter
pagination_strategy:
  type: PageIncrement
  page_size: 40
  start_from_page: 0
  inject_on_first_request: true
k
Your YAML configuration for page increment pagination looks correct for most APIs that use page and per_page parameters. However, if your sync is only fetching the first page, here are some troubleshooting steps and considerations based on Airbyte documentation and known issues: 1. Check Stop Condition: By default, the paginator will stop if the number of records returned is less than the page size. If your API always returns the same number of records (even if there are no more pages), the paginator may not know when to stop or continue. Make sure your API returns fewer records on the last page, or consider if a custom stop condition is needed. [See: Pagination Troubleshooting – Infinite pagination](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/pagination#troubleshooting) 2. Parameter Injection: Double-check that the API expects the page and per_page parameters as query parameters and that their names match exactly (case-sensitive). [See: Page Increment method](https://docs.airbyte.com/platform/next/connector-development/connector-builder-ui/pagination#page-increment) 3. First Request Injection: With
inject_on_first_request: true
, the page parameter should be included in the first request. If it’s not, this could be a bug or a version-specific issue. There have been recent reports of this not working as expected in some Airbyte versions, especially after upgrades. [See: Github Issue #53140](https://github.com/airbytehq/airbyte/issues/53140) and [Github Issue #61410](https://github.com/airbytehq/airbyte/issues/61410) 4. API Response Validation: Ensure the API actually returns different data for each page and that the response structure is as expected by your record selector. 5. Airbyte Version: Some users have reported that pagination works in the builder test but fails during sync after upgrading Airbyte. If you recently upgraded, this could be a regression. [See: Github Issue #53140](https://github.com/airbytehq/airbyte/issues/53140) 6. YAML Placement: Make sure your paginator configuration is under the correct stream and retriever in your YAML. Example of a working paginator config:
Copy code
yaml paginator:   type: DefaultPaginator   page_token_option:     type: RequestOption     field_name: page     inject_into: request_parameter   page_size_option:     type: RequestOption     field_name: per_page     inject_into: request_parameter   pagination_strategy:     type: PageIncrement     page_size: 40     start_from_page: 0     inject_on_first_request: true
[See: Pagination Strategies](https://docs.airbyte.com/platform/next/connector-development/config-based/understanding-the-yaml-file/pagination#pagination-strategies) If the above checks do not resolve the issue: - Try running the connector in the builder’s test mode and compare the requests with those made during an actual sync. - Consider testing with a different Airbyte version if you suspect a regression. - If possible, share the full YAML and a sample API response for more targeted help. Let me know if you need help with a specific error message or log!
r
@kapa.ai i did above, but still not moves to next page?
k
A message from kapa.ai
If your configuration matches the documented examples and the sync still does not move to the next page, here are the most likely causes based on the knowledge sources: 1. API Response Issue: The paginator relies on the API returning fewer records than the page size to know when to stop. If your API always returns the same number of records (e.g., always 40), Airbyte may not know to continue or stop. Double-check that the API returns fewer records on the last page, or that the response structure matches what Airbyte expects for pagination to work properly [Pagination Strategies](https://docs.airbyte.com/platform/connector-development/config-based/understanding-the-yaml-file/pagination#pagination-strategies). 2. Parameter Injection: Ensure that the parameter names (
page
and
per_page
) exactly match what the API expects, including case sensitivity. Also, confirm that they are being injected as query parameters, as you have configured [Page Increment](https://docs.airbyte.com/platform/connector-development/connector-builder-ui/pagination#page-increment). 3. Known Issues: There are open issues where the page parameter is not injected on the first request, especially after certain Airbyte upgrades. This can cause only the first page to be fetched during sync, even if the configuration is correct. This issue has been reported in both the builder and during syncs [[Github Issue #53140](https://github.com/airbytehq/airbyte/issues/53140), [Github Issue #61410](https://github.com/airbytehq/airbyte/issues/61410)]. 4. Builder vs. Sync Behavior: Some users have reported that pagination works in the builder's test mode but fails during an actual sync. This suggests a possible bug in the platform, not your configuration. What you can do: - Double-check the API response and ensure it returns fewer records on the last page. - Review Airbyte logs to see if the page parameter is being sent in subsequent requests. - If you are on a recent Airbyte version and suspect a regression, consider testing on an older version or follow the related GitHub issues for updates. If all of the above checks out and it still doesn't work, it's likely a platform bug as described in the referenced GitHub issues. In that case, you may need to wait for a fix or try a workaround, such as using a different pagination strategy if your API supports it. Let me know if you can share a sample API response or more details from the logs—this could help pinpoint the issue further.