Template:YouTube/doc: Difference between revisions

From HandWiki
imported>Jworkorg
m (1 revision imported)
 
No edit summary
 
Line 3: Line 3:
{{For|the navigation template|Template:YouTube navbox}}
{{For|the navigation template|Template:YouTube navbox}}
{{See also|Wikipedia:External links/Perennial websites}}
{{See also|Wikipedia:External links/Perennial websites}}
{{Template redirect|Youtube}}
{{Template shortcut|ytl}}
{{Ombox
{{Ombox
| type      = content
| type      = content
Line 10: Line 10:
<small>'''NOTE''': A YouTube video uploaded by a user with a verification check mark badge, indicating that it is an official channel of an established creator or organization, does not fully guarantee that it complies with copyright and [[fair use]] laws.</small>
<small>'''NOTE''': A YouTube video uploaded by a user with a verification check mark badge, indicating that it is an official channel of an established creator or organization, does not fully guarantee that it complies with copyright and [[fair use]] laws.</small>
}}
}}
{{High-use|38420}}
{{High-use}}
{{COinS safe|n}}


This template is used to create an [[Wikipedia:External links|external link]] to YouTube in the ==External links== section. It may also be used for other YouTube links such as those in {{tl|External media}}.  
This template is used to create an [[Wikipedia:External links|external link]] to YouTube in the ==External links== section. It may also be used for other YouTube links such as those in {{tl|External media}}.  


'''This is not a [[Wikipedia:Citation templates|citation template]].'''  Use {{tl|cite AV media}} to provide bibliographic citations in footnotes.  Alternatively, use {{tl|cite news}} if the video is a newscast, or {{tl|cite episode}} if the video is in an episodic format.
'''This is not a [[Wikipedia:Citation templates|citation template]].'''  Use {{tl|cite AV media}} to provide bibliographic citations in footnotes.  Alternatively, use {{tl|cite news}} if the video is a newscast, or {{tl|cite episode}} if the video is in an episodic format.
Note that this template makes it clear that it "has" various [[Wikidata]] property elements, it does not automatically "use" the information stored in Wikidata{{snd}}the VIDEOID, CHANNELID, HANDLE, USERNAME, SHOWID or PLAYLISTID alphanumeric parameters mentioned below must be entered by hand in the template.


== Usage and examples ==
== Usage and examples ==
Line 59: Line 62:
* <code><nowiki>{{</nowiki>YouTube|id=9bZkp7q19f0|t=3m2s}}</code>
* <code><nowiki>{{</nowiki>YouTube|id=9bZkp7q19f0|t=3m2s}}</code>


=== Channel ===
==== With channel ID ====
{{Wikidata property|P2397}}
Usage (one parameter):
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''}}</code>
Usage (two parameters):
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''|title=''TITLE''}}</code>
Parameter descriptions:
* ''c'' or ''channel'' is the "YouTube channel id" which appears as:
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/channel/</nowiki>{{hilite|''CHANNELID''}}</span></kbd>
* ''title'' gives an optional description that may replace the default title (PAGENAME)
Examples (1 parameter):
: <kbd>[https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ https://www.youtube.com/channel/{{hilite|UC-9-kyTW8ZkZNDHQJ6FgpwQ}}]</kbd>
# <code><nowiki>* {{</nowiki>YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}</code>
#* {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|PAGENAME}}
# <code><nowiki>* {{</nowiki>YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}</code>
#* {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|PAGENAME}}
Example (2 parameters):
# <code><nowiki>* {{</nowiki>YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}</code>
#: {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
# <code><nowiki>* {{</nowiki>YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|title=#Music}}</code>
#* {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|title=#Music}}
==== With handle ====
{{Wikidata property|P11245}}
Usage (one parameter):
* <code><nowiki>{{</nowiki>YouTube|h=''HANDLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|handle=''HANDLE''}}</code>
Usage (two parameters):
* <code><nowiki>{{</nowiki>YouTube|h=''HANDLE''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|h=''HANDLE''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|handle=''HANDLE''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|handle=''HANDLE''|title=''TITLE''}}</code>
Parameter descriptions:
* ''h'' or ''handle'' is the "YouTube channel handle" which appears as:
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/@</nowiki>{{hilite|''HANDLE''}}</span></kbd>
* ''title'' gives an optional description that may replace the default title (PAGENAME)
* ''suffix'' replaces the default " 's " after the channel name. It is only to be used in the rare occasion that the channel name is a compound noun ending in S, and making it possessive does not repeat the S sound. Do not use it for a brand name ending in S, for example Smosh Games, which is a singular entity. See [[MOS:POSS]] for more information.
Examples (1 parameter):
: <kbd>[https://www.youtube.com/@PewDiePie https://www.youtube.com/@{{hilite|PewDiePie}}]</kbd>
# <code><nowiki>* {{</nowiki>YouTube|h=PewDiePie}}</code>
#* {{YouTube|h=PewDiePie|PAGENAME}}
# <code><nowiki>* {{</nowiki>YouTube|handle=PewDiePie}}</code>
#* {{YouTube|handle=PewDiePie|PAGENAME}}
Example (2 parameters):
# <code><nowiki>* {{</nowiki>YouTube|h=PewDiePie|PewDiePie}}</code>
#* {{YouTube|h=PewDiePie|PewDiePie}}
# <code><nowiki>* {{</nowiki>YouTube|handle=PewDiePie|title=PewDiePie}}</code>
#* {{YouTube|handle=PewDiePie|title=PewDiePie}}
Example (3 parameters):
: <kbd>[https://www.youtube.com/@officialBEG https://www.youtube.com/@{{hilite|officialBEG}}]</kbd>
# <code><nowiki>* {{</nowiki>YouTube|handle=officialBEG|title=Brown Eyed Girls|suffix='}}</code>
#* {{YouTube|handle=officialBEG|title=Brown Eyed Girls|suffix='}}
==== With legacy username ====
{{side box
|image=[[File:Stop hand nuvola.svg|40x40px|class=noviewer|alt=|link=]]
|text=[[Special:WhatLinksHere/YouTube user (identifier)|legacy username]] is deprecated in favor of handle by YouTube
}}


=== User's channel ===
Usage (one parameter):
Usage (one parameter):
* <code><nowiki>{{</nowiki>YouTube|u=''USERNAME''}}</code>
* <code><nowiki>{{</nowiki>YouTube|u=''USERNAME''}}</code>
Line 72: Line 146:


Parameter descriptions:
Parameter descriptions:
* ''u'' or ''user'' is the "YouTube user's (channel) name" which appears as:
* ''u'' or ''user'' is the "YouTube channel user's name" which appears as:
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/user/</nowiki>{{hilite|''USERNAME''}}</span></kbd>
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/user/</nowiki>{{hilite|''USERNAME''}}</span></kbd>
* ''title'' gives an optional description that may replace the default title (PAGENAME)
* ''title'' gives an optional description that may replace the default title (PAGENAME)
Line 95: Line 169:
#* {{YouTube|user=officialBEG|title=Brown Eyed Girls|suffix='}}
#* {{YouTube|user=officialBEG|title=Brown Eyed Girls|suffix='}}


=== Channel ===
==== With custom URL ====
{{Wikidata property|P2397}}
{{side box
|image=[[File:Stop hand nuvola.svg|40x40px|class=noviewer|alt=|link=]]
|text=[[Special:WhatLinksHere/YouTube custom (identifier)|custom URL]] is deprecated in favor of handle by YouTube
}}
Usage (one parameter):
Usage (one parameter):
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''}}</code>
* <code><nowiki>{{</nowiki>YouTube|custom=''CUSTOMURL''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''}}</code>


Usage (two parameters):
Usage (two parameters):
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|custom=''CUSTOMURL''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|c=''CHANNELID''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|custom=''CUSTOMURL''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|channel=''CHANNELID''|title=''TITLE''}}</code>


Parameter descriptions:
Parameter descriptions:
* ''c'' or ''channel'' is the "YouTube channel id" which appears as:
* ''custom'' is the "YouTube channel custom URL" which appears as:
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/channel/</nowiki>{{hilite|''CHANNELID''}}</span></kbd>
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/c/</nowiki>{{hilite|''CUSTOMURL''}}</span></kbd>
* ''title'' gives an optional description that may replace the default title (PAGENAME)
* ''title'' gives an optional description that may replace the default title (PAGENAME)


Examples (1 parameter):
Example (1 parameter):
: <kbd>[https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ https://www.youtube.com/channel/{{hilite|UC-9-kyTW8ZkZNDHQJ6FgpwQ}}]</kbd>
: <kbd>[https://www.youtube.com/c/officialBEG https://www.youtube.com/c/{{hilite|officialBEG}}]</kbd>
# <code><nowiki>* {{</nowiki>YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}</code>
# <code><nowiki>* {{</nowiki>YouTube|custom=officialBEG}}</code>
#* {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|PAGENAME}}
#* {{YouTube|custom=officialBEG|PAGENAME}}
# <code><nowiki>* {{</nowiki>YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}</code>
#* {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|PAGENAME}}


Example (2 parameters):
Example (2 parameters):
# <code><nowiki>* {{</nowiki>YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}</code>
# <code><nowiki>* {{</nowiki>YouTube|custom=officialBEG|Brown Eyed Girls}}</code>
#: {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
#: {{YouTube|custom=officialBEG|Brown Eyed Girls}}
# <code><nowiki>* {{</nowiki>YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|title=#Music}}</code>
#* {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|title=#Music}}


=== Show ===
=== Show ===
Usage (one parameter):
Usage (one parameter):
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWNAME''}}</code>
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWID''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWNAME''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWID''}}</code>


Usage (two parameters):
Usage (two parameters):
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWNAME''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWNAME''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|s=''SHOWID''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWNAME''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWID''|''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWNAME''|title=''TITLE''}}</code>
* <code><nowiki>{{</nowiki>YouTube|show=''SHOWID''|title=''TITLE''}}</code>


Parameter descriptions:
Parameter descriptions:
* ''s'' or ''show'' is the "YouTube show name" which appears as:
* ''s'' or ''show'' is the "YouTube show name" which appears as:
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/show/</nowiki>{{hilite|''SHOWNAME''}}</span></kbd>
*: <kbd><span style="color:darkblue"><nowiki>https://www.youtube.com/show/</nowiki>{{hilite|''SHOWID''}}</span></kbd>
* ''title'' gives an optional description that may replace the default title (''PAGENAME'')
* ''title'' gives an optional description that may replace the default title (''PAGENAME'')


Examples (1 parameter):
Examples (1 parameter):
: <kbd>[https://www.youtube.com/show/startrek https://www.youtube.com/show/{{hilite|startrek}}]</kbd>
: <kbd>[https://www.youtube.com/show/SCWdVLvom3QaFGxEKNASntaA https://www.youtube.com/show/{{hilite|SCWdVLvom3QaFGxEKNASntaA}}]</kbd>
# <code><nowiki>* {{</nowiki>YouTube|s=startrek}}</code>
# <code><nowiki>* {{</nowiki>YouTube|s=SCWdVLvom3QaFGxEKNASntaA}}</code>
#* {{YouTube|s=startrek|''PAGENAME''}}
#* {{YouTube|s=SCWdVLvom3QaFGxEKNASntaA|''PAGENAME''}}
# <code><nowiki>* {{</nowiki>YouTube|show=startrek}}</code>
# <code><nowiki>* {{</nowiki>YouTube|show=SCWdVLvom3QaFGxEKNASntaA}}</code>
#* {{YouTube|show=startrek|''PAGENAME''}}
#* {{YouTube|show=SCWdVLvom3QaFGxEKNASntaA|''PAGENAME''}}


Example (2 parameters):
Example (2 parameters):
# <code><nowiki>* {{</nowiki>YouTube|s=startrek|''Star Trek: The Original Series''}}</code>
# <code><nowiki>* {{</nowiki>YouTube|s=SCWdVLvom3QaFGxEKNASntaA|''Star Trek: The Original Series''}}</code>
#* {{YouTube|s=startrek|''Star Trek: The Original Series''}}
#* {{YouTube|s=SCWdVLvom3QaFGxEKNASntaA|''Star Trek: The Original Series''}}
# <code><nowiki>* {{</nowiki>YouTube|show=startrek|title=''Star Trek: The Original Series''}}</code>
# <code><nowiki>* {{</nowiki>YouTube|show=SCWdVLvom3QaFGxEKNASntaA|title=''Star Trek: The Original Series''}}</code>
#* {{YouTube|show=startrek|title=''Star Trek: The Original Series''}}
#* {{YouTube|show=SCWdVLvom3QaFGxEKNASntaA|title=''Star Trek: The Original Series''}}


=== Playlist ===
=== Playlist ===
Line 201: Line 271:
<templatedata>
<templatedata>
{
{
"description": "Use this to create an external link to YouTube in the External links section. This is not a citation template.",
"description": "Use this to create an external link to YouTube in the External links section. This is not a citation template.",
"params": {
"params": {
  "id": {
"id": {
  "label": "YouTube video id",
"label": "YouTube video id",
  "description": "The video id which appears after https://www.youtube.com/watch?v= in the URL",
"description": "The video id which appears after https://www.youtube.com/watch?v= in the URL",
  "aliases": ["1"],
"aliases": [
  "example": "9bZkp7q19f0",
"1"
  "type": "string"
],
  },
"example": "9bZkp7q19f0",
  "user": {
"type": "string",
  "label": "YouTube user's (channel) name",
"suggested": true
  "description": "The user name which appears after https://www.youtube.com/user/ in the URL",
},
  "aliases": ["u"],
"channel": {
  "example": "pewdiepie",
"label": "YouTube channel id",
  "type": "string"
"description": "The channel id which appears after https://www.youtube.com/channel/ in the URL",
  },
"aliases": [
  "channel": {
"c"
  "label": "YouTube channel id",
],
  "description": "The channel id which appears after https://www.youtube.com/channel/ in the URL",
"example": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
  "aliases": ["c"],
"type": "string",
  "example": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
"suggested": true
  "type": "string"
},
  },
"handle": {
  "show": {
"label": "YouTube channel handle",
  "label": "YouTube show name",
"description": "The user name which appears after https://www.youtube.com/@ in the URL",
  "description": "The show name which appears after https://www.youtube.com/show/ in the URL",
"aliases": [
  "aliases": ["s"],
"h"
  "example": "startrek",
],
  "type": "string"
"example": "PewDiePie",
  },
"type": "string"
  "playlist": {
},
  "label": "YouTube playlist id",
"user": {
  "description": "The playlist id which appears after https://www.youtube.com/playlist?list= in the URL",
"label": "YouTube legacy username",
  "aliases": ["p"],
"description": "The user name which appears after https://www.youtube.com/user/ in the URL",
  "example": "PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE",
"aliases": [
  "type": "string"
"u"
  },
],
  "title": {
"example": "pewdiepie",
  "label": "Title",
"type": "string"
  "description": "The name of the page being linked to",
},
  "suggested": true,
"custom": {
  "aliases": ["1", "2"],
"label": "YouTube channel custom URL fragment slug",
  "example": "Gangnam Style",
"description": "The channel custom URL slug which appears after https://www.youtube.com/c/ in the URL",
  "default": "If it is a video, Video, if it is a show, the article's page name in italics, otherwise, the article's page name unformatted",
"example": "youtube",
  "type": "string"
"type": "string"
  },
},
  "suffix": {
"show": {
  "label": "Channel title suffix",
"label": "YouTube show id",
  "description": "Text immediately after the channel title. It is only to be used in the rare occasion that the channel title is a compound noun ending in S, and making it possessive does not repeat the S sound.",
"description": "The show id which appears after https://www.youtube.com/show/ in the URL",
  "example": "'",
"aliases": [
  "default": "'s",
"s"
  "type": "string"
],
  },
"example": "SCWdVLvom3QaFGxEKNASntaA",
  "link": {
"type": "string",
  "label": "Link on",
"suggested": true
  "description": "Set this parameter to no to suppress the link to the YouTube article",
},
  "example": "no",
"playlist": {
  "type": "string"
"label": "YouTube playlist id",
  }
"description": "The playlist id which appears after https://www.youtube.com/playlist?list= in the URL",
}
"aliases": [
"p"
],
"example": "PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE",
"type": "string",
"suggested": true
},
"title": {
"label": "Title",
"description": "The name of the page being linked to",
"suggested": true,
"aliases": [
"2"
],
"example": "Gangnam Style",
"default": "If it is a video, Video, if it is a show, the article's page name in italics, otherwise, the article's page name unformatted",
"type": "string"
},
"suffix": {
"label": "Channel title suffix",
"description": "Text immediately after the channel title. It is only to be used in the rare occasion that the channel title is a compound noun ending in S, and making it possessive does not repeat the S sound.",
"example": "'",
"default": "'s",
"type": "string"
},
"link": {
"label": "Link on",
"description": "Set this parameter to no to suppress the link to the YouTube article",
"example": "no",
"type": "string"
},
"time": {
"aliases": [
"t"
],
"label": "Timestamp",
"description": "The timestamp within the video for the link target; usually appears after &t= in the full URL or ?t= in a shortened URL",
"example": "3m2s",
"type": "string"
}
},
"paramOrder": [
"id",
"time",
"channel",
"handle",
"user",
"custom",
"show",
"playlist",
"title",
"suffix",
"link"
],
"format": "inline"
}</templatedata>
}</templatedata>


== Tracking categories ==
== Tracking categories ==
* {{clc|Articles using YouTube with invalid parameters}} – list of pages using this template with too many parameters
* {{clc|Articles using YouTube with invalid parameters}} – list of pages using this template with too many parameters, or with invalid text in the {{para|title}} parameter.
* {{clc|Pages using YouTube with unknown parameters}} – list of pages using this template with unsupported parameters
* {{clc|Pages using YouTube with unknown parameters}} – list of pages using this template with unsupported parameters.


== See also ==
== See also ==
Line 278: Line 402:
* All Wikipedia pages linked <span class="plainlinks">[https://en.wikipedia.org/w/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.youtube.com&limit=500&offset=0 to http://*.youtube.com] and [https://en.wikipedia.org/w/index.php?title=Special%3ALinkSearch&target=https%3A%2F%2F*.youtube.com to https://*.youtube.com]</span>
* All Wikipedia pages linked <span class="plainlinks">[https://en.wikipedia.org/w/index.php?title=Special:LinkSearch&target=http%3A%2F%2F*.youtube.com&limit=500&offset=0 to http://*.youtube.com] and [https://en.wikipedia.org/w/index.php?title=Special%3ALinkSearch&target=https%3A%2F%2F*.youtube.com to https://*.youtube.com]</span>
* <span class="plainlinks">[https://en.wikipedia.org/w/index.php?search=insource%3A%2F%3E%5C%7B%5C%7BYouTube%2Fi Search for Wikipedia articles using this template as a reference]</span>
* <span class="plainlinks">[https://en.wikipedia.org/w/index.php?search=insource%3A%2F%3E%5C%7B%5C%7BYouTube%2Fi Search for Wikipedia articles using this template as a reference]</span>
<includeonly>{{Basepage subpage|
<includeonly>{{Basepage subpage|
<!-- ADD CATEGORIES BELOW THIS LINE -->
<!-- ADD CATEGORIES BELOW THIS LINE -->
[[Category:Google templates]]
[[Category:Google templates]]
[[Category:Video templates]]
[[Category:Social media external link templates]]
[[Category:Social media external link templates]]
[[Category:Television external link templates]]
[[Category:Television external link templates]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
}}</includeonly>

Latest revision as of 16:32, 8 May 2025

See also: Wikipedia:External links/Perennial websites

Error: no shortcuts were specified and the |msg= parameter was not set.

This template is used to create an external link to YouTube in the ==External links== section. It may also be used for other YouTube links such as those in {{External media}}.

This is not a citation template. Use {{cite AV media}} to provide bibliographic citations in footnotes. Alternatively, use {{cite news}} if the video is a newscast, or {{cite episode}} if the video is in an episodic format.

Note that this template makes it clear that it "has" various Wikidata property elements, it does not automatically "use" the information stored in Wikidata – the VIDEOID, CHANNELID, HANDLE, USERNAME, SHOWID or PLAYLISTID alphanumeric parameters mentioned below must be entered by hand in the template.

Usage and examples

Video

Usage (one parameter):

  • {{YouTube|VIDEOID}}
  • {{YouTube|id=VIDEOID}}

Usage (two parameters):

  • {{YouTube|VIDEOID|TITLE}}
  • {{YouTube|id=VIDEOID|title=TITLE}}

Parameter descriptions:

  • id (or unnamed parameter 1) is the "YouTube video id" which appears as:
    https://www.youtube.com/watch?v=VIDEOID
  • title (or unnamed parameter 2) gives an optional description that may replace the default title (Video)

Examples (1 parameter):

https://www.youtube.com/watch?v=9bZkp7q19f0
  1. * {{YouTube|9bZkp7q19f0}}
  2. * {{YouTube|id=9bZkp7q19f0}}

Examples (2 parameters):

  1. * {{YouTube|9bZkp7q19f0|"Gangnam Style"}}
  2. * {{YouTube|id=9bZkp7q19f0|title="Gangnam Style"}}

With timestamp

Usage:

  • {{YouTube|id=VIDEOID|time=TIMESTAMP}}
  • {{YouTube|id=VIDEOID|t=TIMESTAMP}}

Parameter descriptions:

  • time or t is the timestamp within the video for the link target.

Examples:

  • {{YouTube|id=9bZkp7q19f0|time=3m2s}}
  • {{YouTube|id=9bZkp7q19f0|time=122}}
  • {{YouTube|id=9bZkp7q19f0|t=3m2s}}

Channel

With channel ID

Usage (one parameter):

  • {{YouTube|c=CHANNELID}}
  • {{YouTube|channel=CHANNELID}}

Usage (two parameters):

  • {{YouTube|c=CHANNELID|TITLE}}
  • {{YouTube|c=CHANNELID|title=TITLE}}
  • {{YouTube|channel=CHANNELID|TITLE}}
  • {{YouTube|channel=CHANNELID|title=TITLE}}

Parameter descriptions:

  • c or channel is the "YouTube channel id" which appears as:
    https://www.youtube.com/channel/CHANNELID
  • title gives an optional description that may replace the default title (PAGENAME)

Examples (1 parameter):

https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ
  1. * {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}
  2. * {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ}}

Example (2 parameters):

  1. * {{YouTube|c=UC-9-kyTW8ZkZNDHQJ6FgpwQ|#Music}}
    #Music's channel on YouTube
  2. * {{YouTube|channel=UC-9-kyTW8ZkZNDHQJ6FgpwQ|title=#Music}}

With handle

Usage (one parameter):

  • {{YouTube|h=HANDLE}}
  • {{YouTube|handle=HANDLE}}

Usage (two parameters):

  • {{YouTube|h=HANDLE|TITLE}}
  • {{YouTube|h=HANDLE|title=TITLE}}
  • {{YouTube|handle=HANDLE|TITLE}}
  • {{YouTube|handle=HANDLE|title=TITLE}}

Parameter descriptions:

  • h or handle is the "YouTube channel handle" which appears as:
    https://www.youtube.com/@HANDLE
  • title gives an optional description that may replace the default title (PAGENAME)
  • suffix replaces the default " 's " after the channel name. It is only to be used in the rare occasion that the channel name is a compound noun ending in S, and making it possessive does not repeat the S sound. Do not use it for a brand name ending in S, for example Smosh Games, which is a singular entity. See MOS:POSS for more information.

Examples (1 parameter):

https://www.youtube.com/@PewDiePie
  1. * {{YouTube|h=PewDiePie}}
  2. * {{YouTube|handle=PewDiePie}}

Example (2 parameters):

  1. * {{YouTube|h=PewDiePie|PewDiePie}}
  2. * {{YouTube|handle=PewDiePie|title=PewDiePie}}

Example (3 parameters):

https://www.youtube.com/@officialBEG
  1. * {{YouTube|handle=officialBEG|title=Brown Eyed Girls|suffix='}}

With legacy username

Usage (one parameter):

  • {{YouTube|u=USERNAME}}
  • {{YouTube|user=USERNAME}}

Usage (two parameters):

  • {{YouTube|u=USERNAME|TITLE}}
  • {{YouTube|u=USERNAME|title=TITLE}}
  • {{YouTube|user=USERNAME|TITLE}}
  • {{YouTube|user=USERNAME|title=TITLE}}

Parameter descriptions:

  • u or user is the "YouTube channel user's name" which appears as:
    https://www.youtube.com/user/USERNAME
  • title gives an optional description that may replace the default title (PAGENAME)
  • suffix replaces the default " 's " after the channel name. It is only to be used in the rare occasion that the channel name is a compound noun ending in S, and making it possessive does not repeat the S sound. Do not use it for a brand name ending in S, for example Smosh Games, which is a singular entity. See MOS:POSS for more information.

Examples (1 parameter):

https://www.youtube.com/user/pewdiepie
  1. * {{YouTube|u=pewdiepie}}
  2. * {{YouTube|user=pewdiepie}}

Example (2 parameters):

  1. * {{YouTube|u=pewdiepie|PewDiePie}}
  2. * {{YouTube|user=pewdiepie|title=PewDiePie}}

Example (3 parameters):

https://www.youtube.com/user/officialBEG
  1. * {{YouTube|user=officialBEG|title=Brown Eyed Girls|suffix='}}

With custom URL

Usage (one parameter):

  • {{YouTube|custom=CUSTOMURL}}

Usage (two parameters):

  • {{YouTube|custom=CUSTOMURL|TITLE}}
  • {{YouTube|custom=CUSTOMURL|title=TITLE}}

Parameter descriptions:

  • custom is the "YouTube channel custom URL" which appears as:
    https://www.youtube.com/c/CUSTOMURL
  • title gives an optional description that may replace the default title (PAGENAME)

Example (1 parameter):

https://www.youtube.com/c/officialBEG
  1. * {{YouTube|custom=officialBEG}}

Example (2 parameters):

  1. * {{YouTube|custom=officialBEG|Brown Eyed Girls}}
    Brown Eyed Girls's channel on YouTube

Show

Usage (one parameter):

  • {{YouTube|s=SHOWID}}
  • {{YouTube|show=SHOWID}}

Usage (two parameters):

  • {{YouTube|s=SHOWID|TITLE}}
  • {{YouTube|s=SHOWID|title=TITLE}}
  • {{YouTube|show=SHOWID|TITLE}}
  • {{YouTube|show=SHOWID|title=TITLE}}

Parameter descriptions:

  • s or show is the "YouTube show name" which appears as:
    https://www.youtube.com/show/SHOWID
  • title gives an optional description that may replace the default title (PAGENAME)

Examples (1 parameter):

https://www.youtube.com/show/SCWdVLvom3QaFGxEKNASntaA
  1. * {{YouTube|s=SCWdVLvom3QaFGxEKNASntaA}}
  2. * {{YouTube|show=SCWdVLvom3QaFGxEKNASntaA}}

Example (2 parameters):

  1. * {{YouTube|s=SCWdVLvom3QaFGxEKNASntaA|Star Trek: The Original Series}}
  2. * {{YouTube|show=SCWdVLvom3QaFGxEKNASntaA|title=Star Trek: The Original Series}}

Playlist

Usage (one parameter):

  • {{YouTube|p=PLAYLISTID}}
  • {{YouTube|playlist=PLAYLISTID}}

Usage (two parameters):

  • {{YouTube|p=PLAYLISTID|TITLE}}
  • {{YouTube|p=PLAYLISTID|title=TITLE}}
  • {{YouTube|playlist=PLAYLISTID|TITLE}}
  • {{YouTube|playlist=PLAYLISTID|title=TITLE}}

Parameter descriptions:

  • p or playlist is the "YouTube playlist id" which appears as:
    https://www.youtube.com/playlist?list=PLAYLISTID
  • title gives an optional description that may replace the default title (PAGENAME)

Examples (1 parameter):

https://www.youtube.com/playlist?list=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE
  1. * {{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}
  2. * {{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE}}

Example (2 parameters):

  1. * {{YouTube|p=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|Learn Something New}}
  2. * {{YouTube|playlist=PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE|title=Learn Something New}}

Suppress wikilink

The link to YouTube can be suppressed with the parameter |link=no. Example:

* {{YouTube|9bZkp7q19f0|"PSY - GANGNAM STYLE(강남스타일) M/V"|link=no}}

No ID in template

The template will display an error message if no parameters are provided.

* {{YouTube}}

It will display an error message if the parameter provided is not known.

* {{YouTube|ID=test}}

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. Click here to see a monthly parameter usage report for this template in articles based on this TemplateData.

TemplateData for YouTube

Use this to create an external link to YouTube in the External links section. This is not a citation template.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
YouTube video idid 1

The video id which appears after https://www.youtube.com/watch?v= in the URL

Example
9bZkp7q19f0
Stringsuggested
Timestamptime t

The timestamp within the video for the link target; usually appears after &t= in the full URL or ?t= in a shortened URL

Example
3m2s
Stringoptional
YouTube channel idchannel c

The channel id which appears after https://www.youtube.com/channel/ in the URL

Example
UC-9-kyTW8ZkZNDHQJ6FgpwQ
Stringsuggested
YouTube channel handlehandle h

The user name which appears after https://www.youtube.com/@ in the URL

Example
PewDiePie
Stringoptional
YouTube legacy usernameuser u

The user name which appears after https://www.youtube.com/user/ in the URL

Example
pewdiepie
Stringoptional
YouTube channel custom URL fragment slugcustom

The channel custom URL slug which appears after https://www.youtube.com/c/ in the URL

Example
youtube
Stringoptional
YouTube show idshow s

The show id which appears after https://www.youtube.com/show/ in the URL

Example
SCWdVLvom3QaFGxEKNASntaA
Stringsuggested
YouTube playlist idplaylist p

The playlist id which appears after https://www.youtube.com/playlist?list= in the URL

Example
PLrEnWoR732-DZV1Jc8bUpVTF_HTPbywpE
Stringsuggested
Titletitle 2

The name of the page being linked to

Default
If it is a video, Video, if it is a show, the article's page name in italics, otherwise, the article's page name unformatted
Example
Gangnam Style
Stringsuggested
Channel title suffixsuffix

Text immediately after the channel title. It is only to be used in the rare occasion that the channel title is a compound noun ending in S, and making it possessive does not repeat the S sound.

Default
's
Example
'
Stringoptional
Link onlink

Set this parameter to no to suppress the link to the YouTube article

Example
no
Stringoptional

Tracking categories

See also