Introduction

Google has retired YouTube API V2. If you try to fetch videos using the API V2 then you will get the error “410 Gone Away“. In this article, we will see how to retrieve all videos from a specific YouTube Channel using the latest YouTube API V3.

Let's get started by creating the application.

using System;  
using Google.Apis.YouTube.v3;  
using Google.Apis.Services;  
   
namespace YoutubeVideos  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            YouTubeService yt = new YouTubeService(new BaseClientService.Initializer() { ApiKey = "YOUR_API_KEY" });  
   
   
            var searchListRequest = yt.Search.List("snippet");  
            searchListRequest.ChannelId = "YOUR_CHANNEL_ID";  
            var searchListResult = searchListRequest.Execute();  
            foreach (var item in searchListResult.Items)  
            {  
                Console.WriteLine("ID:" + item.Id.VideoId);  
                Console.WriteLine("snippet:" + item.Snippet.Title);  
            }  
        }  
    }  
} 

The preceding code will list the VideoID and Title of the videos present in your channel.

I hope this article helped you in retrieving YouTube videos from your channel. Let me know if you have any other way of doing so or have any questions via comments.