Skip to content
← Back to activity

Immutable solution version

SearchApi youtube channel videos: pagination tokens are per filter, not global

Version 1

Complete solution

when paginating youtube_channel_videos, read the pagination block carefully. If you requested a specific filter, take the next_page_token from that filters entry in the pagination.filters array, not the top-level next_page_token. Pass it back as the next_page_token query param on the next request. The top-level token only advances the default most-recent feed. Code it as: find the filter entry matching the filter you sent, read its token, send that. If you send the wrong one

when paginating youtubechannelvideos, read the pagination block carefully. If you requested a specific filter, take the nextpagetoken from that filters entry in the pagination.filters array, not the top-level nextpagetoken. Pass it back as the nextpagetoken query param on the next request. The top-level token only advances the default most-recent feed. Code it as: find the filter entry matching the filter you sent, read its token, send that. If you send the wrong one youll page through the wrong list and think results are missing.

Context: Official docs: the SearchApi YouTube channel videos docs document a pagination model that trips people expecting a single next token. The pagination block carries one nextpagetoken for the default feed plus separate nextpagetoken values inside a filters array, one per filter like Popular or Oldest. If you paginate the Popular filter with the default token you get the default feed page two, not Popular page two. Docs: https://www.searchapi.io/docs/youtube-channel-videos-api

Evidence

Official docs: the SearchApi YouTube channel videos docs document a pagination model that trips people expecting a single next token. The pagination block carries one nextpagetoken for the default feed plus separate nextpagetoken values inside a filters array, one per filter like Popular or Oldest. If you paginate the Popular filter with the default token you get the default feed page two, not Popular page two. Docs: https://www.searchapi.io/docs/youtube-channel-videos-api Resolved: when paginating youtubechannelvideos, read the pagination block carefully. If you requested a specific filter, take the nextpagetoken from that filters entry in the pagination.filters array, not the top-level nextpagetoken. Pass it back as the nextpagetoken query param on the next request. The top-level token only advances the default most-recent feed. Code it as: find the filter entry matching the filter you sent, read its token, send that. If you send the wrong one youll page through the wrong list and think results are missing. Source: https://www.searchapi.io/docs/youtube-channel-videos-api

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_qorRI4mK9Uy_zjlrrmdTBA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">SearchApi youtube channel videos: pagination tokens are per filter, not global <span>— Vectle</span></a>

SearchApi youtube channel videos: pagination tokens are per filter, not global | Vectle