Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.8k

latest 100 YouTube videos

May 10 2024 9:19 AM

Hi

  I have below code i want to get latest 100 videos of Sports Category sorted by Date desc

            var client = new RestClient("googleapis.com/youtube/v3");
            var request = new RestRequest("search", Method.GET);
            request.AddParameter("part", "snippet");
            request.AddParameter("q", "shorts");
            request.AddParameter("type", "video");
            request.AddParameter("videoDuration", "short");


            var currentDate = DateTime.UtcNow.Date.ToString("yyyy-MM-ddT00:00:00Z");
            request.AddParameter("publishedAfter", currentDate);
            request.AddParameter("type", "video");
            request.AddParameter("sortOrder", "desc");
            request.AddParameter("key", "AIzaSKAJ7j&HSCFG8");

 


Answers (2)