How to Get all video from youtube channel

Posted by engineerisaac

Posted on 1 month ago

Here is a simple and easy way to get all the channels from a youtube account.

Your first step will be to acquire a youtube API key. Found At this link.

You then can use this PHP code



$grab_username = 'Insert_Username-HERE';

$google_key ='Insert-Key-HERE';

// Get the string from the URL

$json = file_get_contents(''. $google_key .'&forUsername='. $grab_username .'&part=id');

// Decode the JSON string into an object

$obj = json_decode($json);

// In the case of this input, do key and array lookups to get the values

echo $obj->items[0]->id;

$grab_id = $obj->items[0]->id;

$videoList = json_decode(file_get_contents(''. $grab_id .'&maxResults=20&key='. $google_key .''));

foreach($videoList->items as $item){

//Embed video


echo '

id->videoId.'" frameborder="0" allowfullscreen>

'. $item->snippet->title .'




Guests Cannot Post!

If you would like to Comment on this video! Consider joining the Blue community!

Register Login

Other Engineerisaac Articles