# YouTube

YouTube is a video-sharing platform with user-generated content, live streaming, and monetization opportunities, widely used for marketing, education, and entertainment

- **Category:** video & audio
- **Auth:** OAUTH2
- **Tools:** 24
- **Triggers:** 4
- **Slug:** `YOUTUBE`
- **Version:** 20260217_00

## Frequently Asked Questions

### How do I set up custom Google OAuth credentials for YouTube?

For a step-by-step guide on creating and configuring your own Google OAuth credentials with Devcaster, see [How to create OAuth2 credentials for Google Apps](https://devcaster.dev/auth/googleapps).

### Why am I getting quota errors on YouTube?

The default OAuth app is shared and has strict quota limits. For production, create your own OAuth app to get a dedicated quota.

---

## Tools

### Add Video to Playlist

**Slug:** `YOUTUBE_ADD_VIDEO_TO_PLAYLIST`

Tool to add a video to a playlist by inserting a playlist item. Use when organizing videos into playlists or building curated collections.

### Create Playlist

**Slug:** `YOUTUBE_CREATE_PLAYLIST`

Tool to create a new YouTube playlist on the authenticated user's channel. Use when organizing videos into collections or building curated playlists.

### Delete Video

**Slug:** `YOUTUBE_DELETE_VIDEO`

Tool to delete a YouTube video owned by the authenticated user/channel. Use when you need to permanently remove a video from YouTube. Requires explicit confirmation via `confirmDelete: true` to prevent accidental deletions. The video must exist and be owned by the authenticated channel.

### Get Channel Activities

**Slug:** `YOUTUBE_GET_CHANNEL_ACTIVITIES`

Gets recent activities from a YouTube channel including video uploads, playlist additions, likes, and other channel events.

### Get channel ID by handle

**Slug:** `YOUTUBE_GET_CHANNEL_ID_BY_HANDLE`

Retrieves the YouTube Channel ID for a specific YouTube channel handle.

### Get Channel Statistics

**Slug:** `YOUTUBE_GET_CHANNEL_STATISTICS`

Gets detailed statistics for YouTube channels including subscriber counts, view counts, and video counts. Channels can be identified using their ID, handle (e.g., @Google), or username.

### Video Details Batch

**Slug:** `YOUTUBE_GET_VIDEO_DETAILS_BATCH`

Retrieves multiple YouTube video resource parts in a single batch call. Use when you need cohort-level metrics for many videos to reduce quota usage and latency.

### List captions

**Slug:** `YOUTUBE_LIST_CAPTION_TRACK`

Retrieves a list of caption tracks for a YouTube video. Returns an empty items list if no captions are available. Raises ExecutionFailed if the video ID is invalid or not found.

### List channel videos

**Slug:** `YOUTUBE_LIST_CHANNEL_VIDEOS`

Lists videos from a specified YouTube channel. This action primarily uses the playlistItems.list endpoint with the channel's uploads playlist, which is the recommended approach by YouTube. The uploads playlist ID is obtained by fetching the channel resource via the Channels API and extracting the playlist ID from contentDetails.relatedPlaylists.uploads field. If the uploads playlist returns a 404 error (which can happen due to a known YouTube API bug where the returned playlist ID doesn't actually exist), the action automatically falls back to the search.list endpoint to retrieve channel videos. Note that the search fallback has higher quota cost (100 units vs 1 unit) and is limited to 500 results. If a channel exists but has no uploads playlist (e.g., brand accounts, channels with all videos deleted, or channels that haven't uploaded any public content), an empty result set is returned instead of an error.

### List Comment Threads

**Slug:** `YOUTUBE_LIST_COMMENT_THREADS`

List comment threads from YouTube videos or channels for qualitative analysis and reporting. Returns top-level comments with optional replies (up to 5 per thread). Use the 'videoId' parameter to retrieve comments on a specific video (most common use case).

### List Most Popular Videos

**Slug:** `YOUTUBE_LIST_MOST_POPULAR_VIDEOS`

Tool to list the current most-popular (charts/trending) YouTube videos for a region and/or category via videos.list(chart=mostPopular). Use when you need to retrieve YouTube's official trending or most popular videos, not keyword-search approximations.

### List Playlist Items

**Slug:** `YOUTUBE_LIST_PLAYLIST_ITEMS`

Tool to list videos in a playlist, with pagination support. Use when walking through a channel's uploads playlist to enumerate all videos.

### List user playlists

**Slug:** `YOUTUBE_LIST_USER_PLAYLISTS`

Retrieves playlists owned by the authenticated user, implicitly using mine=True.

### List user subscriptions

**Slug:** `YOUTUBE_LIST_USER_SUBSCRIPTIONS`

Retrieves the authenticated user's YouTube channel subscriptions, allowing specification of response parts and pagination.

### Download YouTube caption track

**Slug:** `YOUTUBE_LOAD_CAPTIONS`

Downloads a specific YouTube caption track, which must be owned by the authenticated user, and returns its content as text. Note: This action requires you to own the video (YouTube Data API v3 restriction). Non-owned videos will return 403 Forbidden errors, including many auto-generated caption tracks.

### Multipart upload video

**Slug:** `YOUTUBE_MULTIPART_UPLOAD_VIDEO`

Uploads a video to YouTube using multipart upload in a single request. Use when you want to upload both metadata and video file together. This action uploads the video file and metadata in one request, unlike resumable upload which requires two steps.

### Post Comment on Video

**Slug:** `YOUTUBE_POST_COMMENT`

Tool to post a new top-level comment on a YouTube video. Use when creating comments to engage with video content or respond to user requests.

### Search YouTube

**Slug:** `YOUTUBE_SEARCH_YOU_TUBE`

Searches YouTube for videos, channels, or playlists using a query term, returning the raw API response.

### Subscribe to channel

**Slug:** `YOUTUBE_SUBSCRIBE_CHANNEL`

Subscribes the authenticated user to a specified YouTube channel, identified by its unique `channelId` which must be valid and existing.

### Unsubscribe from channel

**Slug:** `YOUTUBE_UNSUBSCRIBE_CHANNEL`

Tool to unsubscribe the authenticated user from a YouTube channel by deleting a subscription. Use when you need to remove an existing subscription. The subscription ID can be obtained from the `YOUTUBE_LIST_USER_SUBSCRIPTIONS` tool.

### Update thumbnail

**Slug:** `YOUTUBE_UPDATE_THUMBNAIL`

Sets the custom thumbnail for a YouTube video using an image from a URL. Requirements: - The authenticated user must own the video or have permission to edit it - The YouTube channel must be verified (phone verification required) to upload custom thumbnails - Image must be JPG, PNG, or GIF; under 2MB; recommended 1280x720 resolution (16:9 aspect ratio)

### Update video

**Slug:** `YOUTUBE_UPDATE_VIDEO`

Updates metadata for a YouTube video identified by videoId, which must exist; an empty list for tags removes all existing tags.

### Upload video

**Slug:** `YOUTUBE_UPLOAD_VIDEO`

Uploads a video from a local file path to a YouTube channel; the video file must be in a YouTube-supported format.

### Video details

**Slug:** `YOUTUBE_VIDEO_DETAILS`

Retrieves specified information parts (e.g., snippet, contentDetails, statistics) for a YouTube video, identified by its ID.


## Triggers

### New YouTube Activity

**Slug:** `YOUTUBE_NEW_ACTIVITY_TRIGGER`

Triggers when a new activity is detected on a YouTube channel.

### New Item in YouTube Playlist

**Slug:** `YOUTUBE_NEW_PLAYLIST_ITEM_TRIGGER`

Triggers when a new item is added to a YouTube playlist.

### New Playlist in YouTube Channel

**Slug:** `YOUTUBE_NEW_PLAYLIST_TRIGGER`

Triggers when a new playlist is added to a YouTube channel.

### New YouTube Channel Subscription

**Slug:** `YOUTUBE_NEW_SUBSCRIPTION_TRIGGER`

Triggers when a new channel is subscribed.
