Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Youtube data api search issue, next page results contain previous page's videos

$
0
0
  • I used youtube data api returning search result. And to get more result, I used nextPageToken as param. => when a btn i made clicked, showing next page's 5 videos.
  • It actually works, but some next page results contain previous page's videos.
  • I expected if 3rd page videos are a, b, c, d, e, 4th page items are f, g, h, i, j.
  • but 4th page's like a, f, g, h, i or something. I'm not sure there is any rules or not.
search = async (input) => {    const response = await fetch(      `https://youtube.googleapis.com/youtube/v3/search?part=snippet&q=${input}&type=video&maxResults=15&key=${this.key}`,      this.requestOptions    );    return await response.json();  };loadMore= async (searchToken, inputValue) => {    const response = await fetch(      `https://youtube.googleapis.com/youtube/v3/search?part=snippet&q=${inputValue}&type=video&pageToken=${searchToken}&key=${this.key}`,      this.requestOptions    );    return await response.json();  };

has anyone experienced and solved this problems?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>