Hi
I have below code and i want to get list of Long Videos only.
var client = new RestClient("googleapis.com/youtube/v3");
var request = new RestRequest("search", Method.GET);
request.AddParameter("part", "snippet");
request.AddParameter("type", "video");
request.AddParameter("maxResults", 400);
request.AddParameter("channelId", "UCg3ZpKSJDTGSgG-m_nNoDVw");
request.AddParameter("key", "AIzaSyAu9fJSRSKSGRYS5Ls8ECFG8");
Thanks
Jignesh KumarPosted Apr 30, 2024, 3:54 AM
@ramco, no we can not get by size, you need to check the YouTube API document for that if it is possible or not.
you can refer developer document for Parmeter to filter your response.
https://developers.google.com/youtube/v3/docs/search/list
Ramco RamcoPosted Apr 29, 2024, 1:02 PM
Hi Jignesh
Can't we get on basis of size whether it is 9X16 or 16X9
Thanks
Jignesh KumarPosted Apr 29, 2024, 12:40 PM
Hello Ramco,
There is no video on that channel that has a duration of more than 20 minutes. Please check with other channel IDs.
Ramco RamcoPosted Apr 29, 2024, 12:35 PM
Hi Jignesh
When i add this line it returns no record
request.AddParameter("videoDuration", "long");
Thanks
Jignesh KumarPosted Apr 29, 2024, 12:19 PM
Have you checked return list vedios are less than 2o mins. ?
Ramco RamcoPosted Apr 29, 2024, 11:59 AM
Hi Jignesh
Below is the data returned
Thanks
Jignesh KumarPosted Apr 29, 2024, 11:53 AM
Could you please share your resposne data sample here?
The above code should work as expected and it will return videos time duration more than 20 minutes
Ramco RamcoPosted Apr 29, 2024, 11:33 AM
Hi Jignesh
I have written the above code but it is not working still displaying all records
Thanks
Jignesh KumarPosted Apr 29, 2024, 11:21 AM
You can add "videoDuration" parameter to filter only long vedios from search,
long– Only include videos longer than 20 minutes.