Ramco Ramco

Ramco Ramco

  • 443
  • 3.4k
  • 526.9k

Youtube Short Video Info

Apr 3 2024 7:11 AM

Hi

  I have below code . I want more information like Tags used . I want Channel ID,Video Title,Description etc. Is it possible to get Country .

List<VideoListResponse.Item> listVideo = new List<VideoListResponse.Item>();

            var client = new RestClient("/youtube/v3");
            var request = new RestRequest("search", Method.GET);
            request.AddParameter("part", "snippet");
              request.AddParameter("maxResults", "100");
            request.AddParameter("order", "viewCount");
            request.AddParameter("videoDuration", "short");

            DateTime twoDaysAgo = DateTime.UtcNow.AddDays(-2);
            // Convert the date to RFC 3339 format
            string publishedAfter = twoDaysAgo.ToString("yyyy-MM-dd'T'HH:mm:ss'Z'");
            request.AddParameter("publishedAfter", publishedAfter);
            request.AddParameter("key", "AIghSyKR9f5Ls8ECSA*");
            var response = client.Execute<YoutubeSearchListResponse>(request);

Thanks


Answers (2)