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.
- We create a new stand alone application named “YouTubeVideos” and install the Nuget package named “Google.Apis.YouTube.V3″ to the application. In case you're unaware of installing Nuget packages to your application.

- You also need an API Key from Google to be able to interface using the YouTube API.
- Go to http://console.developers.google.com/ and create a project as in the following.

- Once the project has been created, “Select the project” and go to “APIs & Auth” and then “Credentials” from the left sidebar.

- If you just want to retrieve videos, you can go ahead and click on “Create new Key” under Public API access. However, if you want to use oAuth to validate user credentials before showing them the videos, you need to create a Client ID. For this example, we will be using “Public API access”.
- After the key is created, copy the key into a text file.
- Returning to the application, the following is the complete code.
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.

Arul VeluPosted Feb 25, 2021, 10:48 AM
Can u help me to upload videos to youtube from website or local folder using youtube API and oauth?
Kranthi Vardhan KolluruPosted Jul 25, 2018, 2:42 AM
How did i get private videos?? using this APi
moveez romanPosted Jul 14, 2017, 5:18 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
Nitesh KejriwalPosted Jun 16, 2016, 5:01 AM
From your youtube channel
mahwish shargilPosted Jun 15, 2016, 5:41 AM
I got the same error from where we got the channel id?
Sudheer GPosted Feb 20, 2016, 12:53 AM
You're code executed I got this error: An unhandled exception of type 'Google.GoogleApiException' occurred in Google.Apis.dllAdditional information: Google.Apis.Requests.RequestError Bad Request [400]
Jayant TripathyPosted Nov 16, 2015, 8:54 AM
Hi Nitesh, I am using the above code its work fine but when we require to fetch more 100 records. Please let me know how retrieve all videos through the Channel.
Sabyasachi MishraPosted Oct 1, 2015, 12:49 AM
Default it gives top 5 result.If I am adding this code searchListRequest.MaxResults = 50; it is ok.If I want to retrieve more than 50 result it shows error as per documentation.Do you have any idea how to retrieve result if it is more than 50.
Nitesh KejriwalPosted Aug 14, 2015, 2:31 PM
Hi Jose Garcia, You will need to go through the documentation to find the exact call to be made to retrieve the number of views. IF I find anything I will definitely update you :)
Jose GarciaPosted Aug 14, 2015, 11:50 AM
Very clear description! Perhaps you can help me going with my question. I would like to retrieve the number of views of my videos and/or channel; do you know how to tackle this?Thank you very much.
Nitesh KejriwalPosted Jul 6, 2015, 4:27 AM
Thanks all
Santhakumar MunuswamyPosted Jul 3, 2015, 2:39 PM
Thanks for nice article.:)
Shankar GuravPosted Jul 3, 2015, 2:41 AM
Something out of box. I didn't knew these APIs. Thanks
Sibeesh VenuPosted Jul 3, 2015, 1:35 AM
Good one.
Pankaj Kumar ChoudharyPosted Jul 2, 2015, 9:14 PM
Nice Article Sir...............
Nitesh KejriwalPosted Jul 2, 2015, 4:28 AM
Thanks
Vipul MalhotraPosted Jul 2, 2015, 4:26 AM
Nice...Thanks for writing