0

I'm trying to get all the videos from a channel, that has over 48,000 videos over a span of 12 years, whose title adhere to certain criteria.

I've set up a do while loop that runs as long as the API returns a "nextPageToken", but after retrieving the 20,000 most recent videos, the API response does not contain a "nextPageToken" field.

I'm using the following endpoint to get the data: https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&fields=nextPageToken,items(snippet(title,resourceId/videoId))&playlistId=PLAYLIST_ID&key=API_KEY&pageToken=PAGE_TOKEN

GodsWithin
  • 11
  • 2
  • @stvar After looking into it, it seems that this is the only way to get videos older than the 20,000 most recent ones from a certain YouTube account. – GodsWithin Aug 29 '20 at 17:16
  • According to [YouTube's staff](https://issuetracker.google.com/issues/166292064#comment2), the 20000 is a limit set *by design* (nota bene: the design itself changes over time: as far as I know, a little while ago this limit did not existed). Therefore, there's not much else one can do, but trying -- as I mentioned in [my answer](https://stackoverflow.com/a/63524122/8327971) to a similar question -- to obtain from the `Search.list` endpoint as much additional video IDs as one can. – stvar Aug 29 '20 at 18:26

0 Answers0