Hi
How we can get Tags of Youtube video. I am using below code
using (var yt = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = "Api Key8",
}))
{
StringBuilder htmlTable = new StringBuilder();
var request = yt.Search.List("snippet");
request.Order = Google.Apis.YouTube.v3.SearchResource.ListRequest.OrderEnum.ViewCount;
request.MaxResults = 10;
var response = request.Execute();
var objResult = response.Items.ToList();
Thanks
Naimish MakwanaPosted Feb 1, 2023, 5:09 AM
new Program().GetTags(searchResult.Id.VideoId); //Get video Tags.
Instead of new Program() you need to use your class name : ex If GetTags method is inside class ABC than you need to write like
new ABC().GetTags(searchResult.Id.VideoId);
Thanks
Ramco RamcoPosted Feb 1, 2023, 5:06 AM
Hi naimish
It is giving message The type or namespace name program does not exist.
new Program().GetTags(searchResult.Id.VideoId); //Get video Tags.
I am using Web based Asp.net c#
Thanks
Naimish MakwanaPosted Feb 1, 2023, 5:01 AM
Full code.
Ramco RamcoPosted Feb 1, 2023, 4:46 AM
Hi
Possible to help with complete final code
Thanks
Naimish MakwanaPosted Feb 1, 2023, 4:34 AM
Hello Ramco,
For most viewed videos, It is not possible.
But you can call given method in the response of most viewed videos response and by that way you can active what you want.
EX: In last ans:
Let me know in case of any help.
Thanks
Naimish
Ramco RamcoPosted Feb 1, 2023, 4:24 AM
Hi Naimish
I want to get tags of most viewed youtube videos. In my last post i was able to get Video Title , Description , Channel Name etc . But with that i want Tags also. Is it possible
Thanks
Naimish MakwanaPosted Jan 31, 2023, 5:17 PM
Hello Ramco,
Please use below code.
Please mark answer accepted if its useful.
Thanks
Naimish