0

I am trying to get all videos for August using the channel ID, but there were 3 videos that don't reflect on the data returned by the API.

The data returned to me started in July 16th, but there were videos in later July and two in August.

I'm using Python to request and parse the returned data.

Here is the channel where it happened to not scrape the video well but works in other channel: UCT4ayiqWW9qOqOq_u8trQTg. The API url:

https://www.googleapis.com/youtube/v3/search?key=...&channelId=UCT4ayiqWW9qOqOq_u8trQTg&part=snippet,id&order=date&maxResults=20.

I can provide the returned data if needed.

stvar
  • 5,871
  • 2
  • 10
  • 23
Bergel
  • 1
  • 1

1 Answers1

0

I can confirm that the Search.list API endpoint, as invoked above, does not return the newest (at the time of this writing) three entries of the channel:

I8TcAA-ri3M  2021-08-12T22:47:25Z  ¡LA BUILD MASTER QUE HACE DE GAREN UN CAMPEÓN IMPARABLE! GAREN WILD RIFT
ZDJJ7TWkpk8  2021-08-11T18:30:24Z  ¡EL MEJOR CAMPEÓN PARA GANAR EN WILD RIFT! ¡HA VUELTO LA BESTIA AKALI!
BdKWNMvtrxc  2021-07-22T20:30:00Z  KATARINA vs AKALI ¿CUAL ES MEJOR PARA GANAR EN WILD RIFT? ROAD TO MAESTRO S2

This may be considered a bug (and, therefore, reported as such to Google, through it own issue tracker site). But you have to also consider that Search.list has a well-known fuzzy (that is imprecise) way of functioning.

I recommend that you follow a different path for to alleviate this undesired behavior of the API: How to avoid omissions in video information acquisition when using the YouTube Data API?

That answer of mine details an alternate well-known method of querying a channel specified by its ID for its newest uploads. See also the second section -- For the uploads playlist of a channel, the items returned by PlaylistItems.list API endpoint are (have to be) ordered in reverse chronological order by contentDetails.videoPublishedAt -- of this other answer of mine: YouTube Playlist Item API publishedAt field clarification.

Also important to note is that using this procedure is significantly less expensive in terms of quota costs. The Search.list API endpoint is quite expensive: 100 units of quota per call of it; the PlaylistItems.list API endpoint (used by the alternate method) is very cheap: 1 unit of quota per call.

stvar
  • 5,871
  • 2
  • 10
  • 23