Difference between revisions of "YouTube/Technical details"

From Archiveteam
Jump to navigation Jump to search
m (Swap underscores and dashes in patterns since some regex engines don't like the previous syntax)
(Add other resources and refs sections)
 
(22 intermediate revisions by 4 users not shown)
Line 7: Line 7:
Videos have a 64-bit ID. Because an 11-character base64 string is equivalent to 66 bit, the last character of a video ID can only take one of 16 values.
Videos have a 64-bit ID. Because an 11-character base64 string is equivalent to 66 bit, the last character of a video ID can only take one of 16 values.


Video ID regex pattern: <code>[A-Za-z0-9_-]{10}[048AEIMQUYcgkosw]</code>
Video ID regex pattern: <code>[A-Za-z0-9_-]{10}[AEIMQUYcgkosw048]</code>
 
In the past, YouTube also accepted requests with video IDs that had their last character mangled.<ref>{{URL|https://stackoverflow.com/questions/35731554/every-youtube-video-has-two-links}} (Note that the details in the analysis are incorrect as it uses the ASCII value of <code>k</code>; in the base64 alphabet, it decodes to <code>0b100100</code>.)</ref> For example, an ID ending in <code>A</code> could also be requested with <code>B</code>, <code>C</code>, or <code>D</code> instead, and likewise for the other characters (the final one being <code>9</code>, <code>-</code>, or <code>_</code> instead of <code>8</code>). This stopped working sometime between 2020-01-07 and 2020-08-16, and now YouTube only accepts requests where the last two bits of the base64 ID are zero.


=== Channels ===
=== Channels ===
Line 15: Line 17:


(Note that this does not include the <code>UC</code> prefix used e.g. in <code>/channel/</code> URLs. The channel ID appears without that prefix in several places, most notably some playlist IDs.)
(Note that this does not include the <code>UC</code> prefix used e.g. in <code>/channel/</code> URLs. The channel ID appears without that prefix in several places, most notably some playlist IDs.)
Additionally, all channels created before approximately 2012-03-14<ref>{{URL|https://blog.youtube/news-and-events/seeing-familiar-faces-on-youtube/}}</ref> and some channels created between approximately 2012-03-14 and approximately 2014-11-24<ref>{{URL|https://blog.youtube/news-and-events/want-your-url-to-match-your-channel/}}</ref> have usernames associated with them. These usernames are permanently associated with the channels and cannot be changed or removed from them<ref>{{URL|https://support.google.com/youtube/answer/6180214}}</ref>. They are accessed by using <code>/user/</code> URLs. If a username has not been claimed as a custom URL, the root URL matching that username will redirect to the channel associated with that username. For example: <code>youtube.com/apple</code> redirects to <code>youtube.com/user/Apple</code>.
The username system has since been replaced with a custom URL system. These custom URLs are case and diacritic insensitive and can always be accessed from the root URL matching that custom URL as well as under <code>/c/</code>. (Note that these URL patterns were different until approximately 2017-05-31 as <code>/c/</code> URLs used to be associated with Google+ while root URLs were only associated with YouTube<ref>{{URL|https://blog.youtube/news-and-events/improving-custom-urls-on-youtube/}}</ref>.) These URLs are not permanently associated with a channel and can be changed<ref>{{URL|https://support.google.com/youtube/answer/2657968}}</ref>.
Username and custom URLs can be resolved to UCIDs by using a youtubei endpoint instead of downloading the full channel page by using a script like [https://gist.github.com/tech234a/7ec4c215291a4625c3bb83b75f9eeca8 this one].


=== Playlists ===
=== Playlists ===
Line 24: Line 32:
! Pattern !! Purpose !! Status !! Examples !! Notes
! Pattern !! Purpose !! Status !! Examples !! Notes
|-
|-
| <code>AL[A-Za-z0-9_-]+</code> || || Broken || ||
| <code>AL[A-Za-z0-9_-]{32}</code> || Artist playlist (Top tracks, albums) || Broken || [https://web.archive.org/web/20121030071819/https://www.youtube.com/playlist?list=ALGLx1orRGw4XggssIZEv5-nCsJlnb8Xc0] [https://web.archive.org/web/20160530212508/https://www.youtube.com/playlist?list=AL94UKMTqg-9BZaAhb-jCKxmoPo01ounO2] || All known IDs for 'Top tracks' start with <code><nowiki>94UKMTqg-9[A-D]|HTd1VmZQRN[o-r]|YL4kY05133[o-r]|zxNYRMVOCR[g-j]</nowiki></code> and for 'Albums' with <code><nowiki>GLx1orRGw4[U-X]|Nb4maWNoT6[Q-T]</nowiki></code>
|-
| <code>AV[A-Za-z0-9_-]{32}</code> || Artist on <code>/artist?a=</code> (AV = 'Artist Videos') || Broken || [https://web.archive.org/web/20120309232750/https://www.youtube.com/artist?a=GxdCwVVULXftjkN-p_QIMzXdCKPB-HqD&feature=playlist-comment] || All known IDs start with <code><nowiki>4oVf-d_DwK[A-D]|AYMcY2vx8G[Q-T]|GxdCwVVULX[c-f]|TGnpyrBl25[w-z]|acdYuOj0G3[s-v]|osme4KCrHq[o-r]</nowiki></code>, with the <code>G</code> one being by far the most common.
|-
| <code>BB[0-9]{8}</code> || Billboard top 20 || Unviewable, playnext broken, list param on watch page not functional but not removed by JS || [https://web.archive.org/web/20120504170738/http://www.youtube.com/playlist?list=BB20120505] || The ID is a date in <code>YYYYMMDD</code> format and refers to a Saturday. Known values range from 20110910 to 20121201.
|-
| <code>BLCM&lt;channelID&gt;</code> || Channel Mix || Fully functional || [https://www.youtube.com/playlist?list=BLCMq6VFHwMzcMXbuKyG7SQYIg] || The title is "Latest <Channel name>" while the description is always "Recent videos from this channel, updated weekly". These only work for logged in users.
|-
|-
| <code>AV[A-Za-z0-9_-]{32}</code> || || Broken || || IDs do not appear to be <code>PL</code> ones
| <code>BLEM[A-Za-z0-9_-]{22}</code> || Weekly Topic Mix || Fully functional || [https://www.youtube.com/playlist?list=BLEMQ1dJ7wXfLlqCjwV0xfSNbA] || The title is "<Topic> weekly" and the description is "Topical videos, selected for you and updated weekly". These only work for logged in users.
|-
|-
| <code>CL&lt;videoID&gt;</code> || || || ||
| <code><nowiki>CL([A-Za-z0-9_-]{11}|[A-Za-z0-9_-]{22})</nowiki></code> || Season clips/previews || Fully functional || [https://www.youtube.com/playlist?list=CLnxWDOyerMoJtvI-vnT3QjA] [https://www.youtube.com/playlist?list=CLdJ1NYyglkTE] || In some cases, the playlist exists even though the video doesn't [https://www.youtube.com/playlist?list=CLuSOli2NxJmY]; for these, the list parameter also works on the watch page. In other cases, the playlist doesn't exist but the video does [https://www.youtube.com/playlist?list=CL2yzd6Rg4La0].
|-
|-
| <code><nowiki>EC([0-9A-F]{16}|[A-Za-z0-9_-]{32})</nowiki></code> || Courses || Unviewable, playnext and watch functional || || IDs are also fully functional with <code>PL</code>
| <code><nowiki>EC([0-9A-F]{16}|[A-Za-z0-9_-]{32})</nowiki></code> || Courses || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=EC00615559FE621D9B&playnext=1] || IDs are also fully functional with <code>PL</code>: [https://www.youtube.com/playlist?list=PL00615559FE621D9B]
|-
|-
| <code>EL&lt;videoID&gt;</code> || || || ||
| <code><nowiki>EL([A-Za-z0-9_-]{11}|[A-Za-z0-9_-]{22})</nowiki></code> || Season episodes || Fully functional || [https://www.youtube.com/playlist?list=ELuSOli2NxJmY] [https://www.youtube.com/playlist?list=EL7B5xbXKtkRaOxLNVdxHYGA] || Some of the short IDs are video IDs, others are not. Even though the contents seem entirely unrelated (e.g. [https://web.archive.org/web/20201024024006/https://www.youtube.com/playlist?list=EL-fNI2W9J9t8&disable_polymer=1] vs [https://www.youtube.com/watch?v=-fNI2W9J9t8]), it's ''highly'' unlikely that these are random collisions since there are quite a lot of them. The longer IDs are unique season playlist IDs (not to be confused with the season IDs seen on the <code>/show/</code> pages). Both short and long IDs can usually be used for <code>CL</code> playlists.
|-
|-
| <code>FL&lt;channelID&gt;</code> || Favourites || Fully functional || ||
| <code>FL&lt;channelID&gt;</code> || Favourites || Fully functional || [https://www.youtube.com/playlist?list=FLK8sQmJBp8GCxrOtXWBpyEA] ||
|-
|-
| <code>HL[0-9]{10}</code> || || Unviewable, playnext broken || ||
| <code>HL[0-9]{10}</code> || || Unviewable, playnext broken || [https://web.archive.org/web/20131106013330/http://www.youtube.com/watch?v=U2-a80nzPAE&list=HL1371590912] [https://web.archive.org/web/20160916111948/http://www.youtube.com/watch?v=Q0gVRten4ss&list=HL1364024750] || Frequently associated with <code>feature=mh_lolz</code>. All WBM snapshots with this are either video pages or <code>/embed/videoseries</code>, and even the older snapshots provide no insight into this playlist type.
|-
|-
| <code>LE[A-Za-z0-9_-]{23}</code> || || || ||
| <code>LE&lt;channelID&gt;[APU]</code> || Live events || Broken || [https://web.archive.org/web/20121112140027/http://www.youtube.com/watch?v=rKjbt2wHbhM&list=LED7-53gvqiYTqPmz0EFCTqAP] || Frequently associated with <code>feature=plcp</code>
|-
|-
| <code>LL&lt;channelID&gt;</code> || Likes || Dead || || Made private in December 2019
| <code>LL&lt;channelID&gt;</code> || Likes || Private || || Made private in December 2019, also accessible via <code>LL</code> when logged in.
|-
|-
| <code>LP&lt;videoID&gt;</code> || || Broken || ||
| <code>LM</code> || Liked music || Private || [https://www.youtube.com/playlist?list=LM] || Tied to the account accessing YouTube.
|-
|-
| <code>MC[0-9]{8} || || || || Values appear to be dates
| <code>LM&lt;channelID&gt;</code> || || Broken || ||
|-
|-
| <code>MCUS</code> || || || ||
| <code>LP&lt;videoID&gt;</code> || Auto-generated channels || Broken || [https://web.archive.org/web/20120831185200/http://www.youtube.com/playlist?list=LP4qRk91tndwg&feature=playlist-comment] [https://web.archive.org/web/20121208025243/https://www.youtube.com/playlist?list=LP-25gYsgSHAs&feature=playlist-comment] [https://web.archive.org/web/20120719164200/https://www.youtube.com/watch?v=DOoXhCyq1-s&list=LP-PgXFUOYEqE&index=1&feature=plcp] || It isn't always clear whether there is any relation between the two video IDs in the watch URL, e.g. [https://web.archive.org/web/20160624202428/http://www.youtube.com/watch?v=2kFbrjfPM_M&list=LP8mCexcOt47s&index=1&feature=plcp] (vs [https://www.youtube.com/watch?v=8mCexcOt47s]) or [https://web.archive.org/web/20121018174159/https://www.youtube.com/watch?v=bxaB85-qAnY&list=LPC_Omnjyzg0A&index=1&feature=plcp] (vs [https://www.youtube.com/watch?v=C_Omnjyzg0A])
|-
|-
| <code>ML[A-Za-z0-9_-]{32}</code> || || Broken || || IDs do not appear to be <code>PL</code> ones
| <code>MC([0-9]{8})?</code> || Music Charts || Broken || [https://web.archive.org/web/20140317224526/https://www.youtube.com/playlist?list=MC] [https://web.archive.org/web/20110711043948/http://www.youtube.com:80/watch?v=8gyLR4NfMiI&feature=autoplay&list=MC20110628&index=10&playnext=1] || Daily/weekly global top 100 songs. Dates are Tuesdays, known range is 20110621 to 20110816.
|-
|-
| <code>OLAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || || || ||
| <code>MC&lt;CC&gt;(\.[0-9]{8}(\.[0-9]+)?)?</code> || Music Charts || Broken || [https://web.archive.org/web/20140317224627/http://www.youtube.com/playlist?list=MCCH] [https://web.archive.org/web/20140622190021/http://www.youtube.com/playlist?list=MCUS.20140617&app=desktop] [https://web.archive.org/web/20140622185202/http://www.youtube.com/playlist?list=MCUS.20140617.453] || <code>&lt;CC&gt;</code> is a country code; known values are AT, CH, DE, RU, and US. Dates are Tuesdays, known range 20110906 to 20140617. The final digits are a genre ID.
|-
|-
| <code>PL[0-9A-F]{16}</code> || Normal playlist (old) || Fully functional || ||
| <code>ML</code> || || || ||
|-
|-
| <code>PL[A-Za-z0-9_-]{32}</code> || Normal playlist || Fully functional || ||
| <code>ML[A-Za-z0-9_-]{32}</code> || Artist mix || Broken || [https://web.archive.org/web/20110607085107/https://www.youtube.com/watch?v=9yZ1uI5yPbY&feature=artist&playnext=1&list=ML4oVf-d_DwKBUxbFJjPKyGEuMsx4Z5xum] || Same ID as <code>AV</code>
|-
|-
| <code>PU&lt;channelID&gt;</code> || Popular uploads || Unviewable, playnext and watch functional || ||
| <code>MLCA&lt;channelID&gt;</code> || Library artist mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=MLCAk_XWyHOD2ynJb3ekJBwdew&playnext=1] || Tied to the account accessing YouTube. The channel should be added to the music library via Youtube Music.
|-
|-
| <code>RD&lt;videoID&gt;</code> || Mix aka radio || Unviewable, playnext and watch functional || ||
| <code>MLCT</code> || Library tracks || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=MLCT&playnext=1] || Tied to the account accessing YouTube. The playlist includes all the tracks added to your Youtube Music library.
|-
|-
| <code>RD[0-4][0-9]&lt;videoID&gt;</code> || || || ||
| <code>OLAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || Albums || Fully functional || [https://www.youtube.com/playlist?list=OLAK5uy_k--30R4f6IL_A9Nu1SWw4N2Rmlfybp83Y] ||
|-
|-
| <code>RDAMVM[A-Za-z0-9_-]{22}</code> || Artist mix? || || ||
| <code>PL[0-9A-F]{16}</code> || Normal playlist (old) || Fully functional || [https://www.youtube.com/playlist?list=PLC9B6711584A06935] ||
|-
|-
| <code>RDAO[A-Za-z0-9_-]{22}</code> || Artist mix || || ||
| <code>PL[A-Za-z0-9_-]{32}</code> || Normal playlist || Fully functional || [https://www.youtube.com/playlist?list=PL7nj3G6Jpv2G6Gp6NvN1kUtQuW8QshBWE] || The 32-character ID consists of a 10-character channel-specific unique ID which is common for all the playlists on a channel and a 22-character playlist-specific ID. Thus, the full playlist ID can be represented as PL[A-Za-z0-9_-]{10}[A-Za-z0-9_-]{22}. It is possible that all the other playlist types IDs which use 32 characters have a similar structure.
|-
| <code>PPSV</code> || Mobile downloads, offline videos || || || Tied to the account accessing YouTube; 'Private Playlist Saved Videos'?
|-
| <code>PU&lt;channelID&gt;</code> || Popular uploads || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=PUZM0q3tj_RstUAUM4ox3R3g&playnext=1] ||
|-
| <code>RD&lt;videoID&gt;</code> || Mix aka radio || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDdQw4w9WgXcQ&playnext=1] ||
|-
| <code>RD[0-4][0-9]&lt;videoID&gt;</code> || Mix || Broken || [https://web.archive.org/web/20121206111014/http://www.youtube.com/watch?v=u6Py7wxBVbs&playnext=1&list=RD01_uElJaFMHzM] [https://web.archive.org/web/20130902043345/http://www.youtube.com:80/watch?v=3O1_3zBUKM8&list=RD023O1_3zBUKM8] [https://web.archive.org/web/20130926201345/http://www.youtube.com/watch?v=HNxVNog2Qdw&feature=youtu.be&list=RD03hhBx8eM-Y7Q] [https://web.archive.org/web/20130902093936/http://www.youtube.com/watch?v=0OlY7MwihXY&feature=youtu.be&list=RD04RJvEhVd-ZWU] [https://web.archive.org/web/20131221192452/http://www.youtube.com:80/watch?v=6DUgnZPag04&list=RD05NG4nR_oVk] [https://web.archive.org/web/20131229075110/http://www.youtube.com:80/watch?v=6oW44aeioio&list=RD06zc5JllZC0] [https://web.archive.org/web/20140221003818/http://www.youtube.com/watch?v=Q3__TEQJMvU&list=RD07Ndh2y0m8E] [https://web.archive.org/web/20130513031455/http://www.youtube.com/watch?v=9HPiBJBCOq8&list=RD089bZkp7q19f0] [https://web.archive.org/web/20130302000502/http://www.youtube.com/watch?v=_orfcGnaseE&list=RD13oGtRiCjWmr8] [https://web.archive.org/web/20130509053006/http://www.youtube.com/watch?v=55HTF0h4QAQ&list=RD15N6pxQ7zuCdg] [https://web.archive.org/web/20140125205713/http://www.youtube.com/watch?v=iWJGzR6EdIg&list=RD16rb7wIep6xLg] [https://web.archive.org/web/20130502172329/http://www.youtube.com/watch?v=sUO6-Byrel0&list=RD17XynxTU8ovZ8] [https://web.archive.org/web/20130626103949/http://www.youtube.com/watch?v=cpJpVl2pVUE&list=RD18lExom22Ps68] [https://web.archive.org/web/20131110235936/http://www.youtube.com/watch?v=UDKADsUiE28&list=RD19JTgzyFXmI3w] [https://web.archive.org/web/20140203060741/http://www.youtube.com/watch?v=OBXN1t7K2pY&list=RD20iLTwNuLWLLo] [https://web.archive.org/web/20130815160803/http://www.youtube.com/watch?v=VRaSwAXhEr4&list=RD21KW57OlqEBuA] [https://web.archive.org/web/20131018145156/http://www.youtube.com/watch?v=CevxZvSJLk8&list=RD22My2FRPA3Gf8] [https://web.archive.org/web/20130515041606/http://www.youtube.com/watch?v=JK_DOJa99oo&list=RD24p04TYk4j0zQ] [https://web.archive.org/web/20130715091251/http://www.youtube.com/watch?v=tfdbWutUDAw&list=RD25NIirqJ1Ow8Q] [https://web.archive.org/web/20130515193647/http://www.youtube.com/watch?v=ErLbge1Pl80&list=RD27C7MDjeNZiAI] [https://web.archive.org/web/20130816042714/http://www.youtube.com/watch?v=w1HDYxvBa60&list=RD28grvpTTu09bQ] [https://web.archive.org/web/20130927235020/http://www.youtube.com/watch?v=NVcSNnqRD0c&list=RD29ph1VTId1YNc] [https://web.archive.org/web/20130620223124/http://www.youtube.com/watch?v=qGpXBE33m0g&list=RD32JheYx263ICY] [https://web.archive.org/web/20130904083749/http://www.youtube.com/watch?v=7fNuTf76FlE&list=RD35a2H89ulLtqk] [https://web.archive.org/web/20130814155841/http://www.youtube.com/watch?v=WE-B3J-n_qg&list=RD39iWFw28zJ4HU] [https://web.archive.org/web/20130808015529/http://www.youtube.com:80/watch?v=1kMF6kR1ojY&list=RD40VRcrZ8CC2Vo] [https://web.archive.org/web/20130914150229/https://www.youtube.com/watch?v=GDSQ2Zg2kKM&list=RD47J_kGJApa4DM] || By far the most common prefix among known URLs is <code>RD02</code>. All other confirmed values are listed in the examples, but given the apparent existence of links around the web, it is likely that more existed. They were discontinued in early July 2014 ([https://web.archive.org/web/20140702055455/http://www.youtube.com/watch?v=KLv7rmb6G9c&list=RD02YXUIAqGFYNw] [https://web.archive.org/web/20140704143037/http://www.youtube.com/watch?v=JmM04_OgajU&list=RD02wcLNteez3c4]).
|-
| <code>RDAMVM&lt;videoID&gt;</code> || Mix || Unviewable, playnext and watch functional || [https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=RDAMVMdQw4w9WgXcQ] [https://www.youtube.com/playlist?list=RDAMVMdQw4w9WgXcQ&playnext=1] ||
|-
|-
| <code>RDAMPL&lt;playlistID&gt;</code> || || || ||
| <code>RDAMPL&lt;playlistID&gt;</code> || || || ||
|-
|-
| <code>RDCLAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || || || ||
| <code>RDAO[A-Za-z0-9_-]{22}</code> || Artist shuffle mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDAOGTJYzN4zJlP1hWbgi6vt_g&playnext=1] [[https://www.youtube.com/watch?v=edAxujKev1I&list=RDAOGTJYzN4zJlP1hWbgi6vt_g] || Same ID as <code>RDEM</code>
|-
|-
| <code>RDCMUC&lt;channelID&gt;</code> || Channel mix || || ||
| <code>RDCLAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || Compilation || Fully functional || [https://www.youtube.com/playlist?list=RDCLAK5uy_mfut9V_o1n9nVG_m5yZ3ztCif29AHUffI] || Extensively used on https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ aka https://www.youtube.com/music
|-
|-
| <code>RDEM[A-Za-z0-9_-]{22}</code> || Artist mix? || || ||
| <code>RDCMUC&lt;channelID&gt;</code> || Channel radio mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDCMUCRvvekKryKLFOj4l3vQgZnA&playnext=1] || Similar to BLCM
|-
|-
| <code>RDGMEM[A-Za-z0-9_-]{22}</code> || Genre mix? || || ||
| <code>RDEM[A-Za-z0-9_-]{22}</code> || Artist/genre mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDEMswfFaRBz22qxwFKV9jqZEg&playnext=1] || Same ID as <code>BLEM</code>
|-
|-
| <code>RDGMEM[A-Za-z0-9_-]{22}VM&lt;videoID&gt;</code> || Genre mix? || || ||
| <code>RDGMEM[A-Za-z0-9_-]{22}</code> || Genre/mood mix || Unviewable, playnext broken, watch functional || [https://www.youtube.com/watch?v=IZ52lk9wjZI&list=RDGMEM6CZm14o9sc-Q22TIneLI8g] || Can use the same ID as <code>RDEM</code>
|-
|-
| <code>RDHC&lt;videoID&gt;</code> || || || ||
| <code>RDGMEM[A-Za-z0-9_-]{22}VM&lt;videoID&gt;</code> || Genre/mood mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDGMEMXdNDEg4wQ96My0DhjI-cIgVMT_lC2O1oIew&playnext=1] [https://www.youtube.com/watch?v=T_lC2O1oIew&list=RDGMEMXdNDEg4wQ96My0DhjI-cIgVMT_lC2O1oIew] || This type behaves like an RDEM and RD hybrid
|-
|-
| <code>RDKM[A-Za-z0-9_-]{22}</code> || || || ||
| <code>RDHC&lt;videoID&gt;</code> || Artist mix? || Broken || [https://web.archive.org/web/20141113195350/http://www.youtube.com/watch?v=50X8EXq6Tlc&list=RDHC-0trwxfNivI] ||
|-
|-
| <code>RDLV&lt;videoID&gt;</code> || || || ||
| <code>RDKM[A-Za-z0-9_-]{22}</code> || Topic Radio Mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDKMafPiHxTAgNfcfWY88IWjBQ&playnext=1] [https://www.youtube.com/watch?v=EfHxUaJDEn8&list=RDKMafPiHxTAgNfcfWY88IWjBQ] || Same ID as <code>RDEM</code>
|-
| <code>RDLV&lt;videoID&gt;</code> || Mix || Unviewable, playnext broken, watch functional || [https://www.youtube.com/watch?v=EfHxUaJDEn8&list=RDLVEfHxUaJDEn8] ||
|-
|-
| <code>RDMM</code> || My Mix || || || Tied to the account accessing YouTube
| <code>RDMM</code> || My Mix || || || Tied to the account accessing YouTube
|-
|-
| <code>RDMM&lt;videoID&gt;</code> || || || ||
| <code>RDMM&lt;videoID&gt;</code> || My Mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDMM--41OGPMurU&playnext=1] [https://www.youtube.com/watch?v=--41OGPMurU&list=RDMM--41OGPMurU] ||
|-
|-
| <code>RDQM&lt;videoID&gt;</code> || || || ||
| <code>RDQM&lt;videoID&gt;</code> || Video Mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDQM-0lLj66y6ts&playnext=1] [https://www.youtube.com/watch?v=-0lLj66y6ts&list=RDQM-0lLj66y6ts] || Works even if the target video is unavailable as in the example.
|-
|-
| <code>RDTMAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || || || ||
| <code>RDSH</code> || Shorts Mix? || || ||
|-
|-
| <code>SL</code> || || || ||
| <code>RDTMAK5uy_[klmn][A-Za-z0-9_-]{32}</code> || Tailor-made mix || Fully functional || [https://www.youtube.com/playlist?list=RDTMAK5uy_nyhwsGy3aIN3Okw7vCxz-bt2-_AxQiHTM] || Requires authentication
|-
|-
| <code>SL&lt;videoID&gt;</code> || || Broken || ||
| <code>RDVM&lt;videoID&gt;</code> || Video Mix || Unviewable, playnext and watch functional || [https://www.youtube.com/playlist?list=RDVM-5ZxuLzHxFY&playnext=1] [https://www.youtube.com/watch?v=2MMSc5qAIEg&list=RDVM2MMSc5qAIEg] ||
|-
|-
| <code><nowiki>SP([0-9A-F]{16}|[A-Za-z0-9_-]{32})</nowiki></code> || || Fully functional || || Behaves exactly as the same ID with <code>PL</code>
| <code>RLTD&lt;channelID&gt;</code> || Stories (Reel?) || Unviewable, playnext broken || || [https://www.youtube.com/playlist?list=RLTDBR8-60-B28hp2BmDPdntcQ]
|-
|-
| <code>TLGG[A-Za-z0-9_-]{22} || Temporary list || || || Produced by <code><nowiki>https://www.youtube.com/watch_videos?video_ids=&lt;videoID&gt;,&lt;videoID&gt;,...</nowiki></code>
| <code>SL</code> || Season (TV series?) || Broken || [https://web.archive.org/web/20100725132828/http://www.youtube.com/watch?v=GNdhphtB-8Y&list=SL] ||
|-
|-
| <code>TLPQ[A-Za-z0-9_-]{22} || || || ||
| <code>SL&lt;videoID&gt;</code> || Season (TV series?) || Broken || [https://web.archive.org/web/20120413213623/http://www.youtube.com:80/watch?v=6vPDvbD1SKg&feature=autoplay&list=SLo5wUQzGudyI&lf=list_related&playnext=2] ||
|-
| <code><nowiki>SP([0-9A-F]{16}|[A-Za-z0-9_-]{32})</nowiki></code> || Series playlist || Fully functional || [https://web.archive.org/web/20120607210346/http://www.youtube.com/watch?v=Rss9T7lu27k&list=SP3C14444766460071] [https://web.archive.org/web/20140819072011/http://www.youtube.com/playlist?list=SP06CD75321C3C3405] [https://web.archive.org/web/20130311214010id_/http://www.youtube.com/watch?v=3AilblBXlWU&list=UU7Edgk9RxP7Fm7vjQ1d-cDA&index=3] || Behaves exactly as the same ID with <code>PL</code> and already did so in 2012 (see example).
|-
| <code>TL[A-Za-z0-9_-]{11} || || Broken || [https://web.archive.org/web/20111206165653/http://www.youtube.com/watch?v=YGKJC22Roxs&playnext=1&list=TLCGgmn2FjODc] [https://web.archive.org/web/20120622153142/http://www.youtube.com/watch?v=-iBduigB4v4&playnext=1&list=TL8Us4LT2BvMM] [https://web.archive.org/web/20131215042652/http://www.youtube.com/watch?v=--7JzR1Hhx0&list=TLcsjn3rKwAEb_osN_QtHc6g12s8oLWzi1] || Details unclear, possibly also temporary: [https://web.archive.org/web/20121108191805/https://www.youtube.com/watch?v=2xeAyliOF_k&playnext=1&list=TLsmhIqd0d9Ck] [https://web.archive.org/web/20121109234527/https://www.youtube.com/watch?v=2xeAyliOF_k&playnext=1&list=TLsmhIqd0d9Ck], [https://web.archive.org/web/20121108191856/https://www.youtube.com/watch?v=165VjNKRNdw&playnext=1&list=TL0RtrN-ER_Ks] [https://web.archive.org/web/20121110013916/https://www.youtube.com/watch?v=165VjNKRNdw&playnext=1&list=TL0RtrN-ER_Ks]
|-
| <code>TL[A-Za-z0-9_-]{22} || 'Templist' || || [https://web.archive.org/web/20160228191431/https://www.youtube.com/watch?v=-Z0_lfGaICM&list=TL-38rKMsdYVMyODAyMjAxNg] [https://web.archive.org/web/20150830130112/https://www.youtube.com/watch?v=mrgtxlkpfFo&list=TL-4j-2ZVIreMzMDA4MjAxNQ] [https://web.archive.org/web/20151103043325/https://www.youtube.com/watch?v=n_FWStKEos4&list=TL-6xoWohYdCEwMjExMjAxNQ] [https://web.archive.org/web/20151001134406/https://www.youtube.com/watch?v=sF8q9nSkD_Y&list=TLA2i7a2zTLjIwMTEwMjAxNQ] ||
|-
| <code>TL[A-Za-z0-9_-]{32} || || || [https://web.archive.org/web/20140623013019/http://www.youtube.com/watch?v=5vB2vo8xoQg&list=TL--0ArGFCzduBjD5Pbg_9XerhS08bDnPI] [https://web.archive.org/web/20140209145851/http://www.youtube.com/watch?v=dyBzYCEyUlE&list=TL--5Dc7-eIUxKYJVQHsShov1TCBXQGDBe] [https://web.archive.org/web/20131128061128/http://www.youtube.com/watch?v=6JQPoaTKiu4&list=TL--2UKPutDV4Klvl6pBLwJRb7YDgYuZZo] [https://web.archive.org/web/20140419052830/http://www.youtube.com/watch?v=WyT_JavQU5s&list=TLB1GbpS4y7ZACK9hDWlo8QCigiEbINi_O] ||
|-
| <code>TLGC[A-Za-z0-9_-]{22} || || || [https://web.archive.org/web/20161014132705/https://www.youtube.com/watch?v=5I8UOOhxx5A&list=TLGC1QbHtr1DxEMxNDEwMjAxNg] [https://web.archive.org/web/20161016222434/https://www.youtube.com/watch?v=8MYZpElW494&list=TLGCH5t7TluDMgsxNjEwMjAxNg] || When decoded, the last eight characters are a date in <code>DDMMYYYY</code> format. However, the timezone is unclear; <code>TLGC1QbHtr1DxEMxNDEwMjAxNg</code> turns out as <code>15102016</code>, even though the list clearly existed at 2016-10-14 13:27 UTC.
|-
| <code>TLGG[A-Za-z0-9_-]{22} || Temporary list || Fully functional || [https://web.archive.org/web/20211201164001/https://www.youtube.com/playlist?list=TLGGoPMGoLZfxBUwMTEyMjAyMQ] [https://web.archive.org/web/20211201163922/https://www.youtube.com/watch?v=dQw4w9WgXcQ&list=TLGGoPMGoLZfxBUwMTEyMjAyMQ] || Produced by <code><nowiki>https://www.youtube.com/watch_videos?video_ids=&lt;videoID&gt;,&lt;videoID&gt;,...</nowiki></code> and <code><nowiki>https://www.youtube-nocookie.com/embed/&lt;videoID&gt;?playlist=&lt;videoID&gt;,&lt;videoID&gt;,...</nowiki></code>. When the full ID (including the prefix) is decoded, the last eight characters are the date of the list's creation in <code>DDMMYYYY</code> format. Lists appear to expire after two days.
|-
| <code>TLPP[A-Za-z0-9_-]{22} || Temporary list || || || Also produced by <code>/watch_videos</code> (example: [https://web.archive.org/web/20211102160829/https://www.youtube.com/watch_videos?type=0&feature=c4-overview-u&video_ids=tk2MP5Bc9qQ%2CJ-cxJl6pwjU%2C3rZEYX47CnE%2Ch9Ch_610aRE%2CkFe4071CY3c%2CPmnLoPSLVIE%2CrQUgYwo5o3c%2CgQV4hl0I9Bo%2CSFm51wTGZPw%2CgQmMwjTlEQY%2C3CQgmSYPI2w%2COjRDK4kQjfY&index=2&title=Popular+uploads&more_url&spf=navigate] → [https://web.archive.org/web/20211102160830/https://www.youtube.com/watch?v=3rZEYX47CnE&list=TLPPMDIxMTIwMjFppbc4wP6OQQ]), most likely dependent on one of the query parameters.
|-
| <code>TLPP[A-Za-z0-9_-]{30} || || || [https://web.archive.org/web/20140729023845/http://www.youtube.com/watch?v=yukIOuF4OYE&list=TLPPmv2nKQLjlofGsTp2Jqxrp_u3c-rtME] [https://web.archive.org/web/20140912065410/https://www.youtube.com/watch?v=-h4zTEwgCpQ&list=TLppmRwJg8CiOzH1vlD9QLVAcbcXnbKp2g] ||
|-
| <code>TLPP[A-Za-z0-9_-]{54} || || || || UNCONFIRMED. No known working example. The oldest snapshots with such IDs in the Wayback Machine ([https://web.archive.org/web/20161202133253/https://www.youtube.com/watch?v=nedtSOuMyzA&list=TLPPdUw4UVRRYlNEWHpCR3F4ekdDYUFiRDZPcElHcVBmVU8wMjEyMjAxNg] [https://web.archive.org/web/20161206174635/https://www.youtube.com/watch?v=PWFabACQ4-Q&list=TLPPdmF5RXBRSzhCeG1tTnplTTNOTzQtN3dqZEZncno2SDcwNjEyMjAxNg]) do not show a playlist. However, there are 117 unique such URLs in the WBM as of 2021-12-07, so this is unlikely that this is just random noise. When decoded, the last eight characters appear to be a date in <code>DDMMYYYY</code> format.
|-
| <code>TLPQ[A-Za-z0-9_-]{22} || Queue || Private || || Created when a video is added to the queue
|-
|-
| <code>UL&lt;videoID&gt;</code> || User uploads || Watch functional || || Only valid on watch pages. Triggers display of uploads by the same user as the watched video. The ID in the list parameter must be a valid video ID from any channel; in the past, any 11 characters were accepted, and even further in the past, a sole <code>UL</code> worked as well.
| <code>UL&lt;videoID&gt;</code> || User uploads || Watch functional || || Only valid on watch pages. Triggers display of uploads by the same user as the watched video. The ID in the list parameter must be a valid video ID from any channel; in the past, any 11 characters were accepted, and even further in the past, a sole <code>UL</code> worked as well.
|-
|-
| <code>UU&lt;channelID&gt;</code> || User/channel uploads || Fully functional || ||
| <code>UU&lt;channelID&gt;</code> || User/channel uploads || Fully functional || [https://www.youtube.com/playlist?list=UUZM0q3tj_RstUAUM4ox3R3g] ||
|-
| <code>UULV&lt;channelID&gt;</code> || User livestreams || Fully functional || [https://www.youtube.com/playlist?list=UULVqEobfdxKqbf7X-cUh9Ul0Q] ||
|-
| <code>UUMO&lt;channelID&gt;</code> || User Uploads Members Only || Fully functional || [https://www.youtube.com/playlist?list=UUMOLyKM-d75GEeJGcYI6sr2rQ] ||
|-
|-
| <code>UUSH&lt;channelID&gt;</code> || User shorts || Fully functional || ||
| <code>UUSH&lt;channelID&gt;</code> || User shorts || Fully functional || [https://www.youtube.com/playlist?list=UUSHK8sQmJBp8GCxrOtXWBpyEA] ||
|-
|-
| <code>WL</code> || Watch Later || || || Tied to the account accessing YouTube
| <code>WL</code> || Watch Later || Private || || Tied to the account accessing YouTube
|-
| <code><nowiki>WL([0-9A-F]{16}|[A-Za-z0-9_-]{32})</nowiki></code> || User's Watch Later || Broken || [https://web.archive.org/web/20111223165251/https://www.youtube.com/playlist?list=WL224B512296894D40&feature=playlist-comment] || WL list of a channel, but actually internally a normal <code>PL</code> playlist as evidenced by the profile page corresponding to the example: [https://web.archive.org/web/20111223165246/https://www.youtube.com/user/nikkie755467]. Later, these started to redirect to <code>/my_watch_later_videos</code> instead: [https://web.archive.org/web/20130815105059/http://www.youtube.com/playlist?list=WL9BA14E4873F54DBF]. No working example is known for the 32-char version; the oldest known snapshots in the WBM are from late 2012 and already don't display a playlist: [https://web.archive.org/web/20121121175844/http://www.youtube.com/watch?v=GCrViXx4lus&feature=player_detailpage&list=WLb41BoOUqQxK1mA4i1BrjuqbHerdFwsMY] [https://web.archive.org/web/20121217184226/http://www.youtube.com/watch?v=qtJPAv1UiAE&feature=BFp&list=WLwpw4Htj7V2SFZE7D05LAH0Y8_klT4F1X].
|-
| <code>WL&lt;channelID&gt;</code> || User's Watch Later || Broken || || No known direct example, but there are plenty of URLs in the WBM that were captured after this was discontinued that contain valid channel IDs, e.g. [https://web.archive.org/web/*/https://www.youtube.com/playlist?list=WLDwVhYk6Fqx2l3MzcZQWaJg].
|}
|}


Further prefixes that are known or suspected to have existed but whose exact format isn't known yet: <code>BP</code>, <code>MLCA</code>, <code>MQ</code>, <code>TT</code>
Further prefixes that have been claimed elsewhere to have existed but whose details aren't known yet: <code>BP</code> ('Branded Playlist'), <code>MQ</code>, <code>QL</code> ('Quicklist'), <code>SV</code> ('Station'), <code>LRYR</code> ('2022 recap' for music, private for each user), <code>TT</code>, <code>MLPT</code>


== URL formats ==
== URL formats ==
Line 117: Line 171:


== Domains ==
== Domains ==
Domains actively serving content as of 2021:
Domains actively serving content as of 2022:


* www.youtube.com (main site)
* www.youtube.com (main site)
Line 123: Line 177:
* youtu.be (short URLs)
* youtu.be (short URLs)
* www.youtube-nocookie.com (embeds only)
* www.youtube-nocookie.com (embeds only)
* gaming.youtube.com (video game-centric videos)
* music.youtube.com (YouTube Music)
* music.youtube.com (YouTube Music)
* www.youtubekids.com (YouTube Kids)
* www.youtubekids.com (YouTube Kids)
Line 128: Line 183:
* i.ytimg.com (static images like thumbnails; avatars are on subdomains of ggpht.com as they are shared between Google services)
* i.ytimg.com (static images like thumbnails; avatars are on subdomains of ggpht.com as they are shared between Google services)
* subdomains of googlevideo.com (video content)
* subdomains of googlevideo.com (video content)
* studio.youtube.com (the place where creators upload their videos and manage their channels, also has an instance of youtubei)
* youtube.googleapis.com (can load embeds with titles and thumbnails but doesn't actually support playback anymore)
* youtubei.googleapis.com (primarily hosts youtubei for mobile apps)
* www.googleapis.com/youtube/v3/* (official public, rate-limited data API)


A long time ago, there were YouTube domains under a number of ccTLDs. Nowadays, these all redirect to the main site: youtube.at, by, ca, co.uk, cz, de, dk, ee, es, fi, fr, gr, hr, hu, it, lt, lv, no, pl, pt, ro, rs, ru, se, si, sk.
A long time ago, there were YouTube domains under a number of ccTLDs. Nowadays, these all redirect to the main site: youtube.at, by, ca, co.uk, cz, de, dk, ee, es, fi, fr, gr, hr, hu, it, lt, lv, no, pl, pt, ro, rs, ru, se, si, sk.


In addition, there are some subdomains under youtube.com which redirect to the main site but add the <code>gl</code> parameter to the query string, which changes the interface language: br.youtube.com and likewise for es, it, jp, pl, ru, uk.
In addition, there are some subdomains under youtube.com which redirect to the main site but add the <code>gl</code> parameter to the query string, which changes the interface language: br.youtube.com and likewise for es, it, jp, pl, ru, uk.
== Other resources ==
* https://github.com/mattwright324/youtube-metadata/wiki/YouTube-Oddities
== References ==
<references />

Latest revision as of 18:33, 16 February 2024

This page documents some of the publicly known technical details of YouTube.

ID formats

In most places, IDs are expressed as base64 using the modified character set A-Za-z0-9-_.

Videos

Videos have a 64-bit ID. Because an 11-character base64 string is equivalent to 66 bit, the last character of a video ID can only take one of 16 values.

Video ID regex pattern: [A-Za-z0-9_-]{10}[AEIMQUYcgkosw048]

In the past, YouTube also accepted requests with video IDs that had their last character mangled.[1] For example, an ID ending in A could also be requested with B, C, or D instead, and likewise for the other characters (the final one being 9, -, or _ instead of 8). This stopped working sometime between 2020-01-07 and 2020-08-16, and now YouTube only accepts requests where the last two bits of the base64 ID are zero.

Channels

Channels have a 128-bit ID. In base64, this turns into a 22-character string where the last character can take 4 values.

Channel ID regex pattern: [A-Za-z0-9_-]{21}[AQgw]

(Note that this does not include the UC prefix used e.g. in /channel/ URLs. The channel ID appears without that prefix in several places, most notably some playlist IDs.)

Additionally, all channels created before approximately 2012-03-14[2] and some channels created between approximately 2012-03-14 and approximately 2014-11-24[3] have usernames associated with them. These usernames are permanently associated with the channels and cannot be changed or removed from them[4]. They are accessed by using /user/ URLs. If a username has not been claimed as a custom URL, the root URL matching that username will redirect to the channel associated with that username. For example: youtube.com/apple redirects to youtube.com/user/Apple.

The username system has since been replaced with a custom URL system. These custom URLs are case and diacritic insensitive and can always be accessed from the root URL matching that custom URL as well as under /c/. (Note that these URL patterns were different until approximately 2017-05-31 as /c/ URLs used to be associated with Google+ while root URLs were only associated with YouTube[5].) These URLs are not permanently associated with a channel and can be changed[6].

Username and custom URLs can be resolved to UCIDs by using a youtubei endpoint instead of downloading the full channel page by using a script like this one.

Playlists

Over the years, there has been a large number of playlist types, many of which have since gone the way of the dodo. This section attempts to document them all.

In the table below, pattern is a regex with the additional syntax of <videoID> to indicate that the ID contains a video ID (and likewise for channel and playlist IDs).

Pattern Purpose Status Examples Notes
AL[A-Za-z0-9_-]{32} Artist playlist (Top tracks, albums) Broken [1] [2] All known IDs for 'Top tracks' start with 94UKMTqg-9[A-D]|HTd1VmZQRN[o-r]|YL4kY05133[o-r]|zxNYRMVOCR[g-j] and for 'Albums' with GLx1orRGw4[U-X]|Nb4maWNoT6[Q-T]
AV[A-Za-z0-9_-]{32} Artist on /artist?a= (AV = 'Artist Videos') Broken [3] All known IDs start with 4oVf-d_DwK[A-D]|AYMcY2vx8G[Q-T]|GxdCwVVULX[c-f]|TGnpyrBl25[w-z]|acdYuOj0G3[s-v]|osme4KCrHq[o-r], with the G one being by far the most common.
BB[0-9]{8} Billboard top 20 Unviewable, playnext broken, list param on watch page not functional but not removed by JS [4] The ID is a date in YYYYMMDD format and refers to a Saturday. Known values range from 20110910 to 20121201.
BLCM<channelID> Channel Mix Fully functional [5] The title is "Latest <Channel name>" while the description is always "Recent videos from this channel, updated weekly". These only work for logged in users.
BLEM[A-Za-z0-9_-]{22} Weekly Topic Mix Fully functional [6] The title is "<Topic> weekly" and the description is "Topical videos, selected for you and updated weekly". These only work for logged in users.
CL([A-Za-z0-9_-]{11}|[A-Za-z0-9_-]{22}) Season clips/previews Fully functional [7] [8] In some cases, the playlist exists even though the video doesn't [9]; for these, the list parameter also works on the watch page. In other cases, the playlist doesn't exist but the video does [10].
EC([0-9A-F]{16}|[A-Za-z0-9_-]{32}) Courses Unviewable, playnext and watch functional [11] IDs are also fully functional with PL: [12]
EL([A-Za-z0-9_-]{11}|[A-Za-z0-9_-]{22}) Season episodes Fully functional [13] [14] Some of the short IDs are video IDs, others are not. Even though the contents seem entirely unrelated (e.g. [15] vs [16]), it's highly unlikely that these are random collisions since there are quite a lot of them. The longer IDs are unique season playlist IDs (not to be confused with the season IDs seen on the /show/ pages). Both short and long IDs can usually be used for CL playlists.
FL<channelID> Favourites Fully functional [17]
HL[0-9]{10} Unviewable, playnext broken [18] [19] Frequently associated with feature=mh_lolz. All WBM snapshots with this are either video pages or /embed/videoseries, and even the older snapshots provide no insight into this playlist type.
LE<channelID>[APU] Live events Broken [20] Frequently associated with feature=plcp
LL<channelID> Likes Private Made private in December 2019, also accessible via LL when logged in.
LM Liked music Private [21] Tied to the account accessing YouTube.
LM<channelID> Broken
LP<videoID> Auto-generated channels Broken [22] [23] [24] It isn't always clear whether there is any relation between the two video IDs in the watch URL, e.g. [25] (vs [26]) or [27] (vs [28])
MC([0-9]{8})? Music Charts Broken [29] [30] Daily/weekly global top 100 songs. Dates are Tuesdays, known range is 20110621 to 20110816.
MC<CC>(\.[0-9]{8}(\.[0-9]+)?)? Music Charts Broken [31] [32] [33] <CC> is a country code; known values are AT, CH, DE, RU, and US. Dates are Tuesdays, known range 20110906 to 20140617. The final digits are a genre ID.
ML
ML[A-Za-z0-9_-]{32} Artist mix Broken [34] Same ID as AV
MLCA<channelID> Library artist mix Unviewable, playnext and watch functional [35] Tied to the account accessing YouTube. The channel should be added to the music library via Youtube Music.
MLCT Library tracks Unviewable, playnext and watch functional [36] Tied to the account accessing YouTube. The playlist includes all the tracks added to your Youtube Music library.
OLAK5uy_[klmn][A-Za-z0-9_-]{32} Albums Fully functional [37]
PL[0-9A-F]{16} Normal playlist (old) Fully functional [38]
PL[A-Za-z0-9_-]{32} Normal playlist Fully functional [39] The 32-character ID consists of a 10-character channel-specific unique ID which is common for all the playlists on a channel and a 22-character playlist-specific ID. Thus, the full playlist ID can be represented as PL[A-Za-z0-9_-]{10}[A-Za-z0-9_-]{22}. It is possible that all the other playlist types IDs which use 32 characters have a similar structure.
PPSV Mobile downloads, offline videos Tied to the account accessing YouTube; 'Private Playlist Saved Videos'?
PU<channelID> Popular uploads Unviewable, playnext and watch functional [40]
RD<videoID> Mix aka radio Unviewable, playnext and watch functional [41]
RD[0-4][0-9]<videoID> Mix Broken [42] [43] [44] [45] [46] [47] [48] [49] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] By far the most common prefix among known URLs is RD02. All other confirmed values are listed in the examples, but given the apparent existence of links around the web, it is likely that more existed. They were discontinued in early July 2014 ([69] [70]).
RDAMVM<videoID> Mix Unviewable, playnext and watch functional [71] [72]
RDAMPL<playlistID>
RDAO[A-Za-z0-9_-]{22} Artist shuffle mix Unviewable, playnext and watch functional [73] [[74] Same ID as RDEM
RDCLAK5uy_[klmn][A-Za-z0-9_-]{32} Compilation Fully functional [75] Extensively used on https://www.youtube.com/channel/UC-9-kyTW8ZkZNDHQJ6FgpwQ aka https://www.youtube.com/music
RDCMUC<channelID> Channel radio mix Unviewable, playnext and watch functional [76] Similar to BLCM
RDEM[A-Za-z0-9_-]{22} Artist/genre mix Unviewable, playnext and watch functional [77] Same ID as BLEM
RDGMEM[A-Za-z0-9_-]{22} Genre/mood mix Unviewable, playnext broken, watch functional [78] Can use the same ID as RDEM
RDGMEM[A-Za-z0-9_-]{22}VM<videoID> Genre/mood mix Unviewable, playnext and watch functional [79] [80] This type behaves like an RDEM and RD hybrid
RDHC<videoID> Artist mix? Broken [81]
RDKM[A-Za-z0-9_-]{22} Topic Radio Mix Unviewable, playnext and watch functional [82] [83] Same ID as RDEM
RDLV<videoID> Mix Unviewable, playnext broken, watch functional [84]
RDMM My Mix Tied to the account accessing YouTube
RDMM<videoID> My Mix Unviewable, playnext and watch functional [85] [86]
RDQM<videoID> Video Mix Unviewable, playnext and watch functional [87] [88] Works even if the target video is unavailable as in the example.
RDSH Shorts Mix?
RDTMAK5uy_[klmn][A-Za-z0-9_-]{32} Tailor-made mix Fully functional [89] Requires authentication
RDVM<videoID> Video Mix Unviewable, playnext and watch functional [90] [91]
RLTD<channelID> Stories (Reel?) Unviewable, playnext broken [92]
SL Season (TV series?) Broken [93]
SL<videoID> Season (TV series?) Broken [94]
SP([0-9A-F]{16}|[A-Za-z0-9_-]{32}) Series playlist Fully functional [95] [96] [97] Behaves exactly as the same ID with PL and already did so in 2012 (see example).
TL[A-Za-z0-9_-]{11} Broken [98] [99] [100] Details unclear, possibly also temporary: [101] [102], [103] [104]
TL[A-Za-z0-9_-]{22} 'Templist' [105] [106] [107] [108]
TL[A-Za-z0-9_-]{32} [109] [110] [111] [112]
TLGC[A-Za-z0-9_-]{22} [113] [114] When decoded, the last eight characters are a date in DDMMYYYY format. However, the timezone is unclear; TLGC1QbHtr1DxEMxNDEwMjAxNg turns out as 15102016, even though the list clearly existed at 2016-10-14 13:27 UTC.
TLGG[A-Za-z0-9_-]{22} Temporary list Fully functional [115] [116] Produced by https://www.youtube.com/watch_videos?video_ids=<videoID>,<videoID>,... and https://www.youtube-nocookie.com/embed/<videoID>?playlist=<videoID>,<videoID>,.... When the full ID (including the prefix) is decoded, the last eight characters are the date of the list's creation in DDMMYYYY format. Lists appear to expire after two days.
TLPP[A-Za-z0-9_-]{22} Temporary list Also produced by /watch_videos (example: [117][118]), most likely dependent on one of the query parameters.
TLPP[A-Za-z0-9_-]{30} [119] [120]
TLPP[A-Za-z0-9_-]{54} UNCONFIRMED. No known working example. The oldest snapshots with such IDs in the Wayback Machine ([121] [122]) do not show a playlist. However, there are 117 unique such URLs in the WBM as of 2021-12-07, so this is unlikely that this is just random noise. When decoded, the last eight characters appear to be a date in DDMMYYYY format.
TLPQ[A-Za-z0-9_-]{22} Queue Private Created when a video is added to the queue
UL<videoID> User uploads Watch functional Only valid on watch pages. Triggers display of uploads by the same user as the watched video. The ID in the list parameter must be a valid video ID from any channel; in the past, any 11 characters were accepted, and even further in the past, a sole UL worked as well.
UU<channelID> User/channel uploads Fully functional [123]
UULV<channelID> User livestreams Fully functional [124]
UUMO<channelID> User Uploads Members Only Fully functional [125]
UUSH<channelID> User shorts Fully functional [126]
WL Watch Later Private Tied to the account accessing YouTube
WL([0-9A-F]{16}|[A-Za-z0-9_-]{32}) User's Watch Later Broken [127] WL list of a channel, but actually internally a normal PL playlist as evidenced by the profile page corresponding to the example: [128]. Later, these started to redirect to /my_watch_later_videos instead: [129]. No working example is known for the 32-char version; the oldest known snapshots in the WBM are from late 2012 and already don't display a playlist: [130] [131].
WL<channelID> User's Watch Later Broken No known direct example, but there are plenty of URLs in the WBM that were captured after this was discontinued that contain valid channel IDs, e.g. [132].

Further prefixes that have been claimed elsewhere to have existed but whose details aren't known yet: BP ('Branded Playlist'), MQ, QL ('Quicklist'), SV ('Station'), LRYR ('2022 recap' for music, private for each user), TT, MLPT

URL formats

A large number of URL formats have been in use over the years, too many to be listed here. User:JustAnotherArchivist's youtube-extract script contain regex patterns for most of the ones that were at least somewhat common.

Domains

Domains actively serving content as of 2022:

  • www.youtube.com (main site)
  • m.youtube.com (mobile site)
  • youtu.be (short URLs)
  • www.youtube-nocookie.com (embeds only)
  • gaming.youtube.com (video game-centric videos)
  • music.youtube.com (YouTube Music)
  • www.youtubekids.com (YouTube Kids)
  • tv.youtube.com (YouTube TV)
  • i.ytimg.com (static images like thumbnails; avatars are on subdomains of ggpht.com as they are shared between Google services)
  • subdomains of googlevideo.com (video content)
  • studio.youtube.com (the place where creators upload their videos and manage their channels, also has an instance of youtubei)
  • youtube.googleapis.com (can load embeds with titles and thumbnails but doesn't actually support playback anymore)
  • youtubei.googleapis.com (primarily hosts youtubei for mobile apps)
  • www.googleapis.com/youtube/v3/* (official public, rate-limited data API)

A long time ago, there were YouTube domains under a number of ccTLDs. Nowadays, these all redirect to the main site: youtube.at, by, ca, co.uk, cz, de, dk, ee, es, fi, fr, gr, hr, hu, it, lt, lv, no, pl, pt, ro, rs, ru, se, si, sk.

In addition, there are some subdomains under youtube.com which redirect to the main site but add the gl parameter to the query string, which changes the interface language: br.youtube.com and likewise for es, it, jp, pl, ru, uk.

Other resources

References