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 channel stats
Get a YouTube channel's stats and profile from a @handle, channel id (UC...) or channel URL. Returns channel_id, handle, name, description, subscribers, video_count, view_count, joined, country, channel_url, avatar, rss_url, is_family_safe, keywords and links. Subscribers is the abbreviated public figure (e.g. 4.51m becomes 4510000, approximate), while video_count and view_count are exact; joined is a display string (e.g. "1 Feb 2015") and each link's url is the display host without scheme.
