List YouTube watch history
Automatically list YouTube watch history on youtube.com. List the videos and Shorts in your YouTube watch history, newest first, as the history page shows them: one entry per video with its day heading, id, title, url, channel, view count, duration and how much of it was watched. Returns the first page of the history (about 200 entries) and a nextCursor when older entries exist. Returns an empty list when watch history is paused or cleared for the account.
Input
None
Output
items requirednextCursor requiredOpaque token present when older history exists beyond this page. Informational: this script returns the first page only.
FAQ
Get YouTube video transcript
Fetch a YouTube video's caption transcript (auto-generated or uploaded) with per-segment timestamps. Returns available:false when the video has no captions in any language. Some runs fail when YouTube plays an ad before the video, roughly 1 in 3; the script already retries, so if it still fails, call it again later. The paired-extension browser is more reliable than the managed browser, where YouTube often shows a sign-in check and no transcript is returned.
Search YouTube videos
Search YouTube videos by query, or list a channel's or playlist's videos from its URL. Returns a list of videos with id, title, url, duration, channelName, channelUrl, viewCount, date, thumbnailUrl, and description.
Get YouTube comments
List a YouTube video's top-level comments from a watch URL or video id. Per comment: id, text, author, channelId, authorAvatar, publishedTime, likeCount, replyCount, isVerified, isCreator, pinned. Sort by 'top' (default) or 'newest' and paginate with the returned nextCursor. likeCount and replyCount are YouTube's abbreviated strings (e.g. "255k", "960"), and comments come back empty when they are disabled.
