{"id":2574,"date":"2017-06-26T16:21:39","date_gmt":"2017-06-26T16:21:39","guid":{"rendered":"https:\/\/www.codexworld.com\/?p=2574"},"modified":"2021-06-02T14:40:41","modified_gmt":"2021-06-02T14:40:41","slug":"get-videos-from-youtube-channel-data-api-v3-php","status":"publish","type":"post","link":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/","title":{"rendered":"Get Videos from YouTube Channel using Data API v3 and PHP"},"content":{"rendered":"<p>List YouTube videos on the web application helps the user to find relevant video content easily. The user can access YouTube videos directly from your website. If you want to list videos from your YouTube channel or create a YouTube video gallery on the web application, it can be easily implemented with <b>YouTube Data API and PHP<\/b>.<\/p>\n<p><b>YouTube Data API<\/b> provides an easy way to access YouTube channel data and incorporate it into the web application. You can fetch various information from YouTube channels using Data API. This tutorial will show you how to retrieve videos from the YouTube channel and list them on the website using PHP.<\/p>\n<p>In this example code, we will use YouTube Data API v3 to retrieve videos from the YouTube channel. You can <b>get videos from YouTube channel<\/b> and display them on the web page using YouTube Data API v3 and PHP.<\/p>\n<h2>YouTube Data API Key<\/h2>\n<p>In order to use YouTube Data API, you must enable YouTube Data API v3 and create an API key on Google Developer Console. The API key needs to be provided in the YouTube Data API request. To create a YouTube Data API key, see the following step-by-step guide.<\/p>\n<ul class=\"bullet_disk_list\">\n<li><a href=\"https:\/\/www.codexworld.com\/create-google-youtube-data-api-key\/\">How to Create YouTube Data API Key<\/a><\/li>\n<\/ul>\n<h2>Get Youtube Videos using YouTube Data API v3<\/h2>\n<p>YouTube Data API request returns the data in JSON format that contains the information about the videos (title, description, thumbnails, publish date, etc.) of the specified YouTube channel.<\/p>\n<ul class=\"bullet_disk_list\">\n<li><b>API_key<\/b> &#8211; Google API Key (YouTube Data API must be enabled).<\/li>\n<li><b>Channel_ID<\/b> &#8211; YouTube Channel ID from where the videos will be fetched.<\/li>\n<li><b>Max_Results<\/b> &#8211; Number of videos to be fetched.<\/li>\n<li><b>file_get_contents<\/b> &#8211; The <code>file_get_contents()<\/code> function is used to load the YouTube Data API response data using PHP.<\/li>\n<li><b>json_decode<\/b> &#8211; The <code>json_decode()<\/code> function converts API JSON response to array.<\/li>\n<\/ul>\n<pre><span style=\"color: #FF8000\">\/\/&nbsp;API&nbsp;config <br \/><\/span><span style=\"color: #0000BB\">$API_Key&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'Your_YouTube_Data_API_Key'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$Channel_ID&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #DD0000\">'YouTube_Channel_ID'<\/span><span style=\"color: #007700\">; <br \/><\/span><span style=\"color: #0000BB\">$Max_Results&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">10<\/span><span style=\"color: #007700\">; <br \/> <br \/><\/span><span style=\"color: #FF8000\">\/\/&nbsp;Get&nbsp;videos&nbsp;from&nbsp;channel&nbsp;by&nbsp;YouTube&nbsp;Data&nbsp;API <br \/><\/span><span style=\"color: #0000BB\">$apiData&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;@<\/span><span style=\"color: #0000BB\">file_get_contents<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #DD0000\">'https:\/\/www.googleapis.com\/youtube\/v3\/search?order=date&amp;part=snippet&amp;channelId='<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$Channel_ID<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'&amp;maxResults='<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$Max_Results<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'&amp;key='<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$API_Key<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">''<\/span><span style=\"color: #007700\">); <br \/>if(<\/span><span style=\"color: #0000BB\">$apiData<\/span><span style=\"color: #007700\">){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #0000BB\">$videoList&nbsp;<\/span><span style=\"color: #007700\">=&nbsp;<\/span><span style=\"color: #0000BB\">json_decode<\/span><span style=\"color: #007700\">(<\/span><span style=\"color: #0000BB\">$apiData<\/span><span style=\"color: #007700\">); <br \/>}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #DD0000\">'Invalid&nbsp;API&nbsp;key&nbsp;or&nbsp;channel&nbsp;ID.'<\/span><span style=\"color: #007700\">; <br \/>}<\/span><\/pre>\n<p><span class=\"note\">Note that:<\/span> The YouTube Data API Key will get from Google Developer Console which you created earlier.<\/p>\n<h2>Youtube Video List using PHP<\/h2>\n<p>Loop through the <code>$videoList->items<\/code> to list the videos from a YouTube channel on the web page using PHP.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>Use HTML <span style=\"color: rgb(186, 98, 54);\">&lt;<span style=\"color: rgb(186, 98, 54);\">iframe<\/span>&gt;<\/span> to embed YouTube video on the web page.<\/li>\n<\/ul>\n<pre><span style=\"color: #007700\">if(!empty(<\/span><span style=\"color: #0000BB\">$videoList<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">items<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;foreach(<\/span><span style=\"color: #0000BB\">$videoList<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">items&nbsp;<\/span><span style=\"color: #007700\">as&nbsp;<\/span><span style=\"color: #0000BB\">$item<\/span><span style=\"color: #007700\">){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #FF8000\">\/\/&nbsp;Embed&nbsp;video <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/span><span style=\"color: #007700\">if(isset(<\/span><span style=\"color: #0000BB\">$item<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">id<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">videoId<\/span><span style=\"color: #007700\">)){ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #DD0000\">' <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div&nbsp;class=\"yvideo-box\"&gt; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;iframe&nbsp;width=\"280\"&nbsp;height=\"150\"&nbsp;src=\"https:\/\/www.youtube.com\/embed\/'<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$item<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">id<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">videoId<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'\"&nbsp;frameborder=\"0\"&nbsp;allowfullscreen&gt;&lt;\/iframe&gt; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h4&gt;'<\/span><span style=\"color: #007700\">.&nbsp;<\/span><span style=\"color: #0000BB\">$item<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">snippet<\/span><span style=\"color: #007700\">-&gt;<\/span><span style=\"color: #0000BB\">title&nbsp;<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'&lt;\/h4&gt; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/div&gt;'<\/span><span style=\"color: #007700\">; <br \/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>&nbsp;&nbsp;&nbsp;&nbsp;} <br \/>}else{ <br \/>&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;<\/span><span style=\"color: #DD0000\">'&lt;p&nbsp;class=\"error\"&gt;'<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #0000BB\">$apiError<\/span><span style=\"color: #007700\">.<\/span><span style=\"color: #DD0000\">'&lt;\/p&gt;'<\/span><span style=\"color: #007700\">; <br \/>}<\/span><\/pre>\n<p>In the YouTube video list, ID and Title are used from the video information. But, you can use various information of video as per your requirement. The YouTube Data API provides the following information.<\/p>\n<ul class=\"bullet_disk_list\">\n<li>YouTube Video ID &#8211; <code>$item->id->videoId<\/code><\/li>\n<li>YouTube Video Publish Date &#8211; <code>$item->snippet->publishedAt<\/code><\/li>\n<li>YouTube Channel ID &#8211; <code>$item->snippet->channelId<\/code><\/li>\n<li>YouTube Video Title &#8211; <code>$item->snippet->title<\/code><\/li>\n<li>YouTube Video Description &#8211; <code>$item->snippet->description<\/code><\/li>\n<li>YouTube Video Thumbnail URL (default size) &#8211; <code>$item->snippet->thumbnails->default->url<\/code><\/li>\n<li>YouTube Video Thumbnail URL (medium size) &#8211; <code>$item->snippet->thumbnails->medium->url<\/code><\/li>\n<li>YouTube Video Thumbnail URL (large size) &#8211; <code>$item->snippet->thumbnails->high->url<\/code><\/li>\n<li>YouTube Channel Title &#8211; <code>$item->snippet->channelTitle<\/code><\/li>\n<\/ul>\n<p class=\"seeAlso\"><span><\/span><a href=\"https:\/\/www.codexworld.com\/download-youtube-video-using-php\/\">Download YouTube Video using PHP<\/a><\/span><\/p>\n<h2>Conclusion<\/h2>\n<p>Using our YouTube video list script, you can get all the videos from a channel without authentication (OAuth) and display them on the web page using PHP. Only an API Key is required to be specified in the script (it can be created from Google Developer Console). Also, there are various options (order, limit, etc.) are available to customize the YouTube data result set as per your needs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>List YouTube videos on the web application helps the user to find relevant video content easily. The user can access YouTube videos directly from your website. If you want to list videos from your YouTube <\/p>\n","protected":false},"author":1,"featured_media":4664,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4],"tags":[250,13,14,340,295,202],"class_list":["post-2574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","tag-api","tag-google-api","tag-php","tag-video","tag-video-gallery","tag-youtube","cat-4-id","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld<\/title>\n<meta name=\"description\" content=\"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld\" \/>\n<meta property=\"og:description\" content=\"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/\" \/>\n<meta property=\"og:site_name\" content=\"CodexWorld\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/codexworld\" \/>\n<meta property=\"article:published_time\" content=\"2017-06-26T16:21:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-02T14:40:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1366\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"CodexWorld\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codexworldblog\" \/>\n<meta name=\"twitter:site\" content=\"@codexworldweb\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"CodexWorld\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/\"},\"author\":{\"name\":\"CodexWorld\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\"},\"headline\":\"Get Videos from YouTube Channel using Data API v3 and PHP\",\"datePublished\":\"2017-06-26T16:21:39+00:00\",\"dateModified\":\"2021-06-02T14:40:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/\"},\"wordCount\":522,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png\",\"keywords\":[\"API\",\"Google API\",\"PHP\",\"Video\",\"Video Gallery\",\"YouTube\"],\"articleSection\":[\"PHP\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/\",\"name\":\"Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png\",\"datePublished\":\"2017-06-26T16:21:39+00:00\",\"dateModified\":\"2021-06-02T14:40:41+00:00\",\"description\":\"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png\",\"width\":1366,\"height\":768,\"caption\":\"fetch-videos-from-youtube-channel-data-api-v3-php-codexworld\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/get-videos-from-youtube-channel-data-api-v3-php\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.codexworld.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Videos from YouTube Channel using Data API v3 and PHP\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#website\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"name\":\"CodexWorld\",\"description\":\"Web &amp; Mobile App Development Company\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.codexworld.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#organization\",\"name\":\"CodexWorld\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.codexworld.com\\\/wp-content\\\/uploads\\\/2014\\\/09\\\/codexworld-logo.png\",\"width\":200,\"height\":19,\"caption\":\"CodexWorld\"},\"image\":{\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldweb\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/codexworld\",\"https:\\\/\\\/www.youtube.com\\\/codexworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.codexworld.com\\\/#\\\/schema\\\/person\\\/9da51d8fa3cdefeb5ec9c69136d4baf0\",\"name\":\"CodexWorld\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g\",\"caption\":\"CodexWorld\"},\"description\":\"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.\",\"sameAs\":[\"http:\\\/\\\/www.codexworld.com\",\"https:\\\/\\\/www.facebook.com\\\/codexworld\",\"https:\\\/\\\/x.com\\\/codexworldblog\"],\"url\":\"https:\\\/\\\/www.codexworld.com\\\/author\\\/nitya192265\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld","description":"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/","og_locale":"en_US","og_type":"article","og_title":"Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld","og_description":"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.","og_url":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/","og_site_name":"CodexWorld","article_publisher":"https:\/\/www.facebook.com\/codexworld","article_author":"https:\/\/www.facebook.com\/codexworld","article_published_time":"2017-06-26T16:21:39+00:00","article_modified_time":"2021-06-02T14:40:41+00:00","og_image":[{"width":1366,"height":768,"url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","type":"image\/png"}],"author":"CodexWorld","twitter_card":"summary_large_image","twitter_creator":"@codexworldblog","twitter_site":"@codexworldweb","twitter_misc":{"Written by":"CodexWorld","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#article","isPartOf":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/"},"author":{"name":"CodexWorld","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0"},"headline":"Get Videos from YouTube Channel using Data API v3 and PHP","datePublished":"2017-06-26T16:21:39+00:00","dateModified":"2021-06-02T14:40:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/"},"wordCount":522,"commentCount":7,"publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"image":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","keywords":["API","Google API","PHP","Video","Video Gallery","YouTube"],"articleSection":["PHP"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/","url":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/","name":"Get Videos from YouTube Channel using Data API v3 and PHP - CodexWorld","isPartOf":{"@id":"https:\/\/www.codexworld.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#primaryimage"},"image":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","datePublished":"2017-06-26T16:21:39+00:00","dateModified":"2021-06-02T14:40:41+00:00","description":"YouTube video gallery in PHP - Get videos from YouTube channel and display on the website using YouTube Data API v3 and PHP. Retrieve videos from YouTube channel using Data API v3 with PHP.","breadcrumb":{"@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#primaryimage","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","width":1366,"height":768,"caption":"fetch-videos-from-youtube-channel-data-api-v3-php-codexworld"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codexworld.com\/get-videos-from-youtube-channel-data-api-v3-php\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codexworld.com\/"},{"@type":"ListItem","position":2,"name":"Get Videos from YouTube Channel using Data API v3 and PHP"}]},{"@type":"WebSite","@id":"https:\/\/www.codexworld.com\/#website","url":"https:\/\/www.codexworld.com\/","name":"CodexWorld","description":"Web &amp; Mobile App Development Company","publisher":{"@id":"https:\/\/www.codexworld.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codexworld.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codexworld.com\/#organization","name":"CodexWorld","url":"https:\/\/www.codexworld.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","contentUrl":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2014\/09\/codexworld-logo.png","width":200,"height":19,"caption":"CodexWorld"},"image":{"@id":"https:\/\/www.codexworld.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldweb","https:\/\/www.linkedin.com\/company\/codexworld","https:\/\/www.youtube.com\/codexworld"]},{"@type":"Person","@id":"https:\/\/www.codexworld.com\/#\/schema\/person\/9da51d8fa3cdefeb5ec9c69136d4baf0","name":"CodexWorld","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cf4999db3b409de559f80677afa01729bb2eeda19be273c254e8b2c22729e386?s=96&r=g","caption":"CodexWorld"},"description":"CodexWorld is a programming blog, one-stop destination for web professionals \u2014 developers, programmers, freelancers, and site owners.","sameAs":["http:\/\/www.codexworld.com","https:\/\/www.facebook.com\/codexworld","https:\/\/x.com\/codexworldblog"],"url":"https:\/\/www.codexworld.com\/author\/nitya192265\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.codexworld.com\/wp-content\/uploads\/2017\/06\/fetch-videos-from-youtube-channel-data-api-v3-php-codexworld.png","jetpack_shortlink":"https:\/\/wp.me\/p6bxIh-Fw","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/comments?post=2574"}],"version-history":[{"count":5,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2574\/revisions"}],"predecessor-version":[{"id":4661,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/posts\/2574\/revisions\/4661"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media\/4664"}],"wp:attachment":[{"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/media?parent=2574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/categories?post=2574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codexworld.com\/wp-json\/wp\/v2\/tags?post=2574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}