Hi
Can we get details of a particular Youtube Video . Video Id , Title , Channel Id , Description, Tags, ViewCount
Thanks
Hi
Can we get details of a particular Youtube Video . Video Id , Title , Channel Id , Description, Tags, ViewCount
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Naimish MakwanaRank #324 · 7.7K reputationPosted Feb 5, 2023, 4:20 AM EST
Hello Ramco,
Anwser is already given in below thread:
https://www.c-sharpcorner.com/Forums/link-to-video
Use below code.
var clientTag = new RestClient("https://www.googleapis.com/youtube/v3/"); var tagRequest = new RestRequest("videos", Method.Get); tagRequest.AddParameter("key", "YOUR_KEY"); tagRequest.AddParameter("part", "snippet,statistics"); tagRequest.AddParameter("maxResults", 100); request.AddParameter("order", "viewCount"); tagRequest.AddParameter("id", "YOUR_videoId"); var tagResponse = clientTag.Execute(tagRequest); foreach (var item in tagResponse.Data.items) { Console.WriteLine("Video ID => " + item.id); Console.WriteLine("Channel Id => " + item.snippet.channelId); Console.WriteLine("channelTitle => " + item.snippet.channelTitle); Console.WriteLine("Video Title => " + item.snippet.title); Console.WriteLine("Description => " + item.snippet.description); Console.WriteLine("viewCount => " + item.statistics.viewCount); if (item.snippet.tags != null && item.snippet.tags.Any()) { Console.WriteLine("Tags ==>" + String.Join(",", item.snippet.tags)); } }Thanks
Naimish