How to embed a YouTube feed on your website
YouTube's embed code covers one video or one playlist. For a channel feed that updates itself, use the Data API or a feed widget. Steps for each.
Den beste produktvideoen din ligger på YouTube. Produktsiden din viser et statisk bilde og en liste med spesifikasjoner. Kunden som ville ha sett videoen, vet ikke at den finnes. En YouTube-feed henter videoene inn på siden der kunden bestemmer seg.
To embed one YouTube video, open it and click Share, then Embed. Copy the code and paste it into an HTML block. A playlist embeds the same way, as one player. YouTube has no embed for a whole channel feed. For a feed that updates itself, use the YouTube Data API or a feed widget.
I denne artikkelen
How to embed a YouTube video
- 1Open the video on youtube.com.
- 2Click Share under the player, then Embed.
- 3Tick privacy-enhanced mode if you want it.
- 4Click Copy.
- 5Paste the code into an HTML, code or embed block, then publish.
| Platform | Where to paste it |
|---|---|
| WordPress | A Custom HTML block, or paste the video link into an Embed block |
| Shopify | A Custom Liquid section in the theme editor |
| Wix | Add Elements, then Embed Code |
| Webflow | A Code Embed element |
| Squarespace | A Code block |
The player brings YouTube's own controls and title. Since September 2018, rel=0 cannot hide related videos at the end. They come from your own channel instead. Keep your page's referrer policy at its default. YouTube now needs the HTTP Referer, or viewers see error 153.
How to embed a YouTube playlist
A playlist plays many videos in one frame. Use this embed URL from YouTube's player docs. Swap in your playlist ID:
<iframe width="560" height="315"
src="https://www.youtube-nocookie.com/embed?listType=playlist&list=PLAYLIST_ID"
title="Our product videos" loading="lazy"
allow="encrypted-media; picture-in-picture" allowfullscreen
referrerpolicy="strict-origin-when-cross-origin"></iframe>New uploads show only once you add them to the playlist. It still shows one video at a time, with the rest in a list. For a grid, read on. How to embed a YouTube channel covers the playlist route in full.
Embed code or playlist
One video, or one playlist player.
Wins at
- No account or setup
- A playlist covers many videos
Struggles with
- One player, not a grid
- New uploads need adding by hand
YouTube Data API
Your code reads the uploads list and draws the grid.
Wins at
- Updates as you publish
- Any layout you build
Struggles with
- A Google Cloud project and key
- Caching and front-end code to maintain
A feed widget (Idukki)
A grid or carousel from your channel, no code.
Wins at
- Updates as the collection syncs
- Product tags and moderation
Struggles with
- A third-party script on the page
From YouTube's player and Data API docs, read 25 November 2026.
How to build a channel feed with the YouTube Data API
The Data API route, step by step
- 01
Create a project
Set up a Google Cloud project and enable the YouTube Data API v3.
- 02
Get a key
Create an API key and keep it on your server.
- 03
Find uploads
Call channels.list. Your uploads playlist ID is in contentDetails.
- 04
List videos
Call playlistItems.list with that ID. Up to 50 videos a page.
- 05
Cache and render
Store the JSON, then draw the thumbnails and titles yourself.
| Fact | Number |
|---|---|
| Default daily quota | 10,000 units, reset at midnight Pacific Time |
| playlistItems.list | 1 unit per call |
| search.list | Its own bucket of 100 calls a day |
| Videos per playlistItems.list page | Up to 50 |
Read the uploads playlist. Skip search: it has its own small bucket. A list call costs 1 unit. Cache the result, so a busy page does not spend quota on every view.
How to embed a YouTube feed with a widget (Idukki)
We make Idukki, so this section names its screens. Add your YouTube channel or a playlist as a source. Pick a grid, carousel or masonry layout. Copy one script tag into your page. On Shopify, add the Idukki gallery block in the theme editor. See the YouTube widget for layouts.
Customer videos too: a review of your product on someone else's channel sits outside your uploads. Super Search finds those by keyword. You approve each one before it joins the feed. Ask the creator's permission before you sell with it.
Shoppable: tag your products to each video. Shoppers tap the product and add it to the cart on your page.
WordPress and WooCommerce
For one video, paste its link into an Embed block. A channel feed with no products? A free plugin such as Smash Balloon's YouTube feed works. Want product tags, or YouTube mixed with TikTok? Paste Idukki's script into a Custom HTML block. On WooCommerce, the Idukki plugin also connects your catalogue.
Performance: what a YouTube feed costs
Each YouTube iframe loads YouTube's player files. Six iframes means six players. That can delay Largest Contentful Paint on mobile. The fix is a lite embed: show the thumbnail, then load the player on tap. Add loading="lazy" to iframes below the fold.
Idukki's widget runtime is 79 KB gzipped, measured on a production gallery. Grid tiles do not preload video. Measure your own page before and after. Core Web Vitals and UGC widgets shows how.
More embed guides: YouTube Shorts, TikTok feeds, Instagram feeds, LinkedIn company feeds and Google reviews. Comparing feed tools? See seven social media aggregators.
FAQs
How do I get the embed code for a YouTube video?
Open the video, click Share, then Embed, and copy the code.
Can I embed a whole YouTube channel?
Not with YouTube's own code. Embed a playlist, or use the Data API or a feed widget.
How do I embed a YouTube playlist?
Use the playlist embed URL with listType=playlist and your playlist ID.
Is the YouTube Data API free for a feed?
Yes, within 10,000 units a day. A list call costs 1 unit, so cache the results.
Why does my embedded YouTube video show error 153?
YouTube needs an HTTP Referer from your page. Check that nothing sets no-referrer.
Can I hide related videos at the end?
No. Since September 2018, rel=0 only limits them to your own channel.
Does a YouTube embed slow my page?
Each iframe loads YouTube's player. Load the player on tap, and lazy-load iframes below the fold.
Sources
- 1YouTube IFrame Player API: player parameters · Playlist embeds with listType and list; the 2018 rel change. Read 25 November 2026.
- 2YouTube Data API: quota costs · 10,000 units a day; playlistItems.list 1 unit; search.list 100 a day. Read 25 November 2026.
- 3YouTube Data API: playlistItems.list · maxResults 0 to 50. Read 25 November 2026.
- 4YouTube Help: Embed videos and playlists · Share, then Embed; privacy-enhanced mode; the Referer rule. Read 24 November 2026.
- 5web.dev, Core Web Vitals · What LCP measures.
Continue reading
7 pieces in this clusterThese long-form pieces on the Idukki blog link back to this article, go deeper on the cluster.
- Embedding
How to embed a YouTube channel on your website in 2027
YouTube has no channel embed. Embed a playlist player instead, and avoid the referrer rule that blanks players with error 153.
- Embedding
How to embed YouTube Shorts on your website
One Short in a vertical iframe. Or a feed of Shorts from a channel or keyword that updates itself.
- Shoppable video
YouTube Shorts for ecommerce: an underused UGC channel
YouTube Shorts pairs short-form reach with YouTube search and a long shelf life. A customer Short keeps getting found for months.
- Embedding
How to embed Google reviews on your website: 3 setups and their page-weight cost
Google's own tools, a third-party widget or a cached feed. What each loads, what Google allows, and how to measure it.
- Embedding
How to Embed a TikTok Feed on Your Website
TikTok's own embed code covers one video, a profile, a hashtag or a sound. Here is how to use it, and when a TikTok feed widget fits better.
- Embedding
How to embed a LinkedIn company feed on your website in 2027
LinkedIn has no feed embed, only single posts. The one way to show a live company page feed, and LinkedIn's rules for post embeds.
- Strategy
The UGC Platform Guide: How to Pick One Without Regretting It in a Year
12 UGC platforms compared across 14 criteria. Includes a pricing check, three questions that narrow the field, and a decision tree.
More from Rohin Aggarwal
- Embedding
How to embed a YouTube channel on your website in 2027
YouTube has no channel embed. Embed a playlist player instead, and avoid the referrer rule that blanks players with error 153.
- Embedding
How to embed YouTube Shorts on your website
One Short in a vertical iframe. Or a feed of Shorts from a channel or keyword that updates itself.
- Embedding
How to Embed a Threads Feed on Your Website
Threads is the newest major platform to embed from: single-post embeds exist, a full profile widget still doesn't, and here's what that means for brands using it today.