Introduction
We need to follow the following steps for implementing this application.
Step-1(Create an API Key)
Now before moving forward we should have a Google Developer account (e.g. any Google account).
Visit this URL. And it will come up like the following image.

Now click on Create Project giving a project name and click Create. After this do as per the following image and follow the instructions.
After completing this a popup window will come and then click the Browser key. Now give a name and click Create. After this, you will get your API key by which you are going to get all the videos from a particular YouTube channel.

Step-2(Get Channel Name)
While fetching all the details of a particular channel we need to know the Channel Name.
See I am a die heart fan of Mumbai-Indians. Go to YouTube.com search Mumbai Indians as in the following image:
You can see the 1st one is the channel as it has been written. Click on it you will get a URL as https://www.youtube.com/user/mipaltan.
Here mipaltan is the channel name. You can take any of your preferred channel names in this process.

Step-3(Programming)
Create a console application using visual studio.
Search and Install YouTube.V3 from the Nuget Package Manager Console.
Add your code as per below
- class Program
- {
- static void Main(string[] args)
- {
- try
- {
- var yt = new YouTubeService(new BaseClientService.Initializer() { ApiKey = "AIzaSyCT8kXaxJ2l29vYg4HBdYy36H-PhAH-Teg" });
- var channelsListRequest = yt.Channels.List("contentDetails");
- channelsListRequest.ForUsername = "mipaltan";
- var channelsListResponse = channelsListRequest.Execute();
- int VideoCount=1;
- foreach (var channel in channelsListResponse.Items)
- {
- var uploadsListId = channel.ContentDetails.RelatedPlaylists.Uploads;
- var nextPageToken = "";
- while (nextPageToken != null)
- {
- var playlistItemsListRequest = yt.PlaylistItems.List("snippet");
- playlistItemsListRequest.PlaylistId = uploadsListId;
- playlistItemsListRequest.MaxResults = 50;
- playlistItemsListRequest.PageToken = nextPageToken;
- // Retrieve the list of videos uploaded to the authenticated user's channel.
- var playlistItemsListResponse = playlistItemsListRequest.Execute();
- foreach (var playlistItem in playlistItemsListResponse.Items)
- {
- Console.WriteLine("Sl No={0}", VideoCount);
- Console.Write("Video ID ={0} ", "https://www.youtube.com/embed/" + playlistItem.Snippet.ResourceId.VideoId);
- //Console.Write("Video Title ={0} ", playlistItem.Snippet.Title);
- //Console.Write("Video Descriptions = {0}", playlistItem.Snippet.Description);
- //Console.WriteLine("Video ImageUrl ={0} ", playlistItem.Snippet.Thumbnails.High.Url);
- //Console.WriteLine("----------------------");
- VideoCount++;
- }
- nextPageToken = playlistItemsListResponse.NextPageToken;
- }
- Console.ReadLine();
- }
- }
- catch (Exception e)
- {
- Console.WriteLine("Some exception occured" + e);
- }
- }
- }
Note
- This code will list the Serial Number and Video ID of all 202 videos.
- You can also add the commented things to get all the details.
For getting the latest video from a YouTube channel using Jquery find the link
You can download the attached code sample for reference. Hope that helps you.
Download the solution from this link.

moveez romanPosted Jul 14, 2017, 5:26 AM
Hi - I want to search movies trailers. how can I do that? so that I pass a movie name i-e Matrix and it returns me it's trailer. any clue please
Shayan HafeezPosted Nov 25, 2016, 2:13 PM
Is this code will work in asp.net web application??
SubashPosted Aug 1, 2016, 5:57 AM
Useful share
Sabyasachi MishraPosted Jan 16, 2016, 1:02 AM
Thanks everyone
Anu VPosted Jan 6, 2016, 4:26 AM
good
Santhakumar MunuswamyPosted Dec 22, 2015, 10:40 AM
Thanks for nice share
Sourabh SomaniPosted Dec 15, 2015, 10:57 PM
Good and useful :)
Gowtham KPosted Dec 15, 2015, 8:30 PM
Nice One
Raja TPosted Dec 15, 2015, 9:55 AM
Good, Thanks for Sharing