Empty result when asking for auto-generated channel's live events - youtube-data-api

I'm having troubles fetching live videos from channels auto-generated by YouTube, e.g. this one.
Try it example in YouTube Data API manual. When no channel or an actual user-made channelId is specified, proper results are returned.

Related

Youtube API, can I query videos filtering out channels?

I am writing queries to the Youtube Data v3 API and I want to see a list of videos that don't include videos by a certain channel. For example, a keyword search "iPhone" but not by Apple's channel. It doesn't work if I just do "-Apple" because that is filtering out the keyword versus the channel. Is there any way to do this?
Using as the query '"iPhone" -Apple"' removes all videos containing Apple (source), so it removes more than what you want but it does the job.
By the way Apple only uploaded 202 public videos as of today, so you could just exclude their channel id (UCE_M8A5yxnLfW0KghEeajjw) from the results you got with Search: list.

Youtube API v3 PlaylistItem return only first 100 items of playlist since 18.07.20 for some channels

I am working on a web-app which use Youtube API for marketing research and recently we stuck a strange change in Youtube API work.
I am getting a channel videos with the help of code which was getting videos from channel upload playlist. I take a channelId, transform it to this channel upload playlist playlistID and with youtube youtube-api v3 playlistItem method list videos from it, page by page(50 results per page).
And previously there was no problems with it. But recently, around 18.07.20, for some channels this method have stopped to work properly.
If previously I could get this way thousand or even more videos, now some channels are limited to barely 100 videos or 2 pages. And there is no changes in Youtube API documentation or in revision history regarding this.
For example, here is example of such behavior.
Example Channel: https://www.youtube.com/user/WWEFanNation
Channels video count: 48,582
Channels ID: UCJ5v_MCY6GNUBTO8-D3XoAg
Channels upload playlistId: UUJ5v_MCY6GNUBTO8-D3XoAg
First request:
https://developers.google.com/youtube/v3/docs/playlistItems/list?apix=true&apix_params=%7B%22part%22%3A%5B%22snippet%22%5D%2C%22maxResults%22%3A50%2C%22playlistId%22%3A%22UUJ5v_MCY6GNUBTO8-D3XoAg%22%7D
Code 200, results items 50
Second request:
https://developers.google.com/youtube/v3/docs/playlistItems/list?apix=true&apix_params=%7B%22part%22%3A%5B%22snippet%22%5D%2C%22maxResults%22%3A50%2C%22pageToken%22%3A%22CDIQAA%22%2C%22playlistId%22%3A%22UUJ5v_MCY6GNUBTO8-D3XoAg%22%7D
Code 200, results items 50
Third request:
https://developers.google.com/youtube/v3/docs/playlistItems/list?apix=true&apix_params=%7B%22part%22%3A%5B%22snippet%22%5D%2C%22maxResults%22%3A50%2C%22pageToken%22%3A%22CGQQAA%22%2C%22playlistId%22%3A%22UUJ5v_MCY6GNUBTO8-D3XoAg%22%7D
Code 200, results items 0. Page don`t have results, but have a nextPageToken. All next pages, at least 20, are empty.
And this happening with pretty much 50% of channels. Some channels can give back full list of 400 videos+, other give back only part of videos or limited by 100 results.
I have tried in meantime to use https://developers.google.com/youtube/v3/docs/search/list for channelId, but it give back not all videos, but most relevant. And can miss alot of videos because of it.
This especially frustrating because there was no changes in documentation, so it is absolutely unclear why some channels are caped, while other are not.
So questions is:
Does anybody know what is happening?
Is there another way to consistently get all videos for channel sorted by upload date?

YouTube API V3 publishedAfter / publishedBefore not working

I need help on calling Services > YouTube Data API v3 > youtube.search.list. I tried several times a few days ago and it worked just fine. Today, it does not return correct year. It included 2016.
part - snippet
channelid - UC-lHJZR3Gqxm24_Vd_AJ5Yw
publishedAfter - 2018-12-17T16:05:58.000Z
publishedBefore - 2018-12-20T16:05:58.000Z
Because Search: list can only retrieve channels, videos and playlists according to type parameter, I assume that by specifying a channelId you are looking for videos and playlists during a given period of time of a given YouTube channel.
Playlists are easily retrievable with https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId=UC-lHJZR3Gqxm24_Vd_AJ5Yw&key=YOUR_API_KEY.
And about videos because Search: list isn't reliable I would recommend you to get all videos for the given YouTube channel and then proceed to your sort on your own. I would recommend you to use this approach to retrieve all YouTube videos of a given YouTube channel. The approach consists in getting the uploads auto-created playlist id of the YouTube channel by using Channels: list with contentDetails in part and then use PlaylistItems: list to retrieve all public videos uploaded on this YouTube channel.

YouTube videos stats using Google API YouTube Analytics in one request

Is it possible to get daily video stats for X videos at once?
YT Analytics API does stats only for a channel. Of course I can filter results by video ID (but only one!). I'm getting an error while trying to put "video=1;video=2;video=3" in filter method.
From the documentation of the reports.query endpoint of the YouTube Analytics API, assuming this is the endpoint you are referring to:
The API supports the ability to specify multiple values for the video, playlist, and channel filters. To do so, specify a separated list of the video, playlist, or channel IDs for which the API response should be filtered. For example, a filters parameter value of video==pd1FJh59zxQ,Zhawgd0REhA;country==IT restricts the result set to include data for the given videos in Italy. The parameter value can specify up to 200 IDs.
In other words: only use commas between video IDs (not semicolons), don't repeat the video keyword for each ID and use == instead of =.

Comment Views returned by Google Data API for youtube does not match

I am using the Google Data API v3 to fetch some statistical data about a channel.
https://content.googleapis.com/youtube/v3/channels?id=CHANNEL_ID&part=statistics&key=SERVER_API_KEY
The commentCount that is obtained in the response does not match with that shown on the Youtube Channel discussion page.
What may be the reason for this difference.

Resources