ytsearch.js
Example

Search Pagination

A focused example you can adapt to a Node.js application.

js
let page = await searchYouTube("node.js", { limit: 20 });

while (page) {
  for (const video of page.videos) {
    console.log(video.title);
  }

  page = await page.nextPage();
}