Insights

Searching YouTube With Coveo

What Comes Out-Of-The-Box?

Searching YouTube With Coveo

If you're working in Sitecore or with a Push Source, you might feel you have all you need in those sources. With more and more clients though having social media channels outside of Sitecore, such as YouTube, getting access to that data might seem like a huge challenge. It's not! Why build a Push source for YouTube content when one is built out-of-the-box for you as part of Coveo Cloud. Let's have a look at what's available to you when you go down this road because not only is it an easy road to travel but the doors it opens are numerous.

Adding The YouTube Source

After you've logged into your Platform Admin in Coveo Cloud you can click into Sources and then in the top right corner, click Add Source. You'll be presented with something similar.

Adding A Source Of Searchable Content In Coveo

Selecting YouTube you'll then be asked to add a user, channel, or playlist URL. For the sake of this example, we're going to use The Late Show with Stephen Colbert as there are lots of videos we can dive into and show the capabilities. It should be noted that in order for this to work, the YouTube channel you're indexing needs to be publically accessible.

Configuring A YouTube Source In Coveo

By clicking Add and build source it will go through all of the YouTube videos in that channel, index them, create appropriate metadata and essentially do all the hard work for you. Depending on the number of videos you're indexing the initial build process can take anywhere from a few minutes to a couple hours. Overall, it's a quick process. The benefit to using this out-of-the-box approach rather than building your own is all the metadata has been pre built for this application.

Once the build is complete, you can browse all the videos in the Content Browser as shown below.

YouTube Content Browser In Coveo

What Is The Metadata For YouTube Videos?

Similarly to all content in Coveo, there is your standard metadata. Fields such as title, author, date and others that come with the usual source are present here as well. The difference is there are now fields and mappings unique to a YouTube source. Let's have a look at them. One thing you'll note is that like regular content, not every field may have a value. In our case, the video chosen didn't have an assigned playlist so fields related to that are empty.

Field Facet Multi-Value Facet Sortable Value
ytcategory Y N N Entertainment
ytchanneltitle Y N N The Late Show with Stephen Colbert
ytcommentcount Y N Y 1517
ytdescription N N N Stephen Colbert is proud to present this sneak peek at his four hour, three minute cut of "Zack Snyder's Justice League," which expands on the pivotal post-credits conversation between Lex Luthor and Deathstroke.<br /><br />Subscribe To "The Late Show" Channel: http://bit.ly/ColbertYouTube<br />Watch full episodes of "The Late Show": http://bit.ly/1Puei40<br />Like "The Late Show" on Facebook: http://on.fb.me/1df139Y<br />Follow "The Late Show" on Twitter: http://bit.ly/1dMzZzG<br />Follow "The Late Show" on Instagram: http://bit.ly/29wfREj<br /><br />Watch The Late Show with Stephen Colbert weeknights at 11:35 PM ET/10:35 PM CT. Only on CBS.<br /><br />---<br />The Late Show with Stephen Colbert is the premier late night talk show on CBS, airing at 11:35pm EST, streaming online via Paramount+, and delivered to the International Space Station on a USB drive taped to a weather balloon. Every night, viewers can expect: Comedy, humor, funny moments, witty interviews, celebrities, famous people, movie stars, bits, humorous celebrities doing bits, funny celebs, big group photos of every star from Hollywood, even the reclusive ones, plus also jokes.
ytdislikecount Y N Y 558
ytembedplayerhtml N N N <iframe width="480" height="270" src="//www.youtube.com/embed/fnkgeODv4F8" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
ytfavoritecount Y N Y 0
ytfoldingparentid Y N Y
ytlikecount Y N Y 17158
ytplaylistid N N N
ytplaylistitemstitle N N N
ytplaylistmodifiedid N N N
yttopfoldingparentid N N N
ytthumbnailurl N N N https://i.ytimg.com/vi/fnkgeODv4F8/mqdefault.jpg
ytvideodefinition Y N N hd
ytvideodimension Y N N 2d
ytvideoduration Y N Y 507
ytvideoid N N N fnkgeODv4F8
ytvideotags N Y N The Late Show;Late Show;Stephen Colbert;Steven Colbert;Colbert;celebrity;celeb;celebrities;late night;talk show;comedian;comedy;CBS;joke;jokes;funny;funny video;funny videos;humor;hollywood;famous
ytviewcount Y N Y 646144

That's a ton of data on just a single video. Much of which you might not get if you tried scraping a video page or were using data say, stored in Sitecore. The other handy part about using a YouTube source is all the facets and sorting capabilities you now have, without much effort.

What Do The Results Look Like?

With very little effort we can take an out-of-the-box Search UI, update the result templates and add in the ytvideotags facet, the ytthumbnailurl to display the thumbnail of the video, the title of the video and a short excerpt and voila. We have YouTube results now powered by Coveo.

results from searching youtube with coveo

This is just a search page. What if your client had videos related to products. Well, you could power featured results with YouTube videos now. Or say your clients have articles. Well, instead of just having the "related content" be more articles, what if it was powered by Coveo Recommendation and displayed YouTube videos instead. This could subsequently increase engagement value in your website and potential ad revenue for you YouTube channel. By now having your YouTube videos indexed, rather than sending folks to your channel, you can bring your channel to them.

What if we think out of the box. you have a coveo cloud source. nothing is stopping you from creating an admin console to monitor and manage your youtube videos, the likes, dislikes, from anywhere. what better way of keeping track of your social media presence.

The surface has just been scratched here, let's see what you can make with it.

👋 Hey Sitecore Enthusiasts!

Sign up to our bi-weekly newsletter for a bite-sized curation of valuable insight from the Sitecore community.

What’s in it for you?

  • Stay up-to-date with the latest Sitecore news
  • New to Sitecore? Learn tips and tricks to help you navigate this powerful tool
  • Sitecore pro? Expand your skill set and discover troubleshooting tips
  • Browse open careers and opportunities
  • Get a chance to be featured in upcoming editions
  • Learn our secret handshake
  • And more!
Sitecore Snack a newsletter by Fishtank Consulting
 

Meet David Austin

Development Team Lead | Sitecore Technology MVP x 3

📷🕹️👪

David is a decorated Development Team Lead with Sitecore Technology MVP and Coveo MVP awards, as well as Sitecore CDP & Personalize Certified. He's worked in IT for 25 years; everything ranging from Developer to Business Analyst to Group Lead helping manage everything from Intranet and Internet sites to facility management and application support. David is a dedicated family man who loves to spend time with his girls. He's also an avid photographer and loves to explore new places.

Connect with David