> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atako.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# YouTube

> Connect YouTube to your Atako agents — 8 read and 5 write actions.

Let your agents read your YouTube channel, videos, playlists, comments and subscriptions, search YouTube, create playlists, update video metadata and reply to comments.

## Connection

* **Authentication**: OAuth 2.0 — you authorize Atako via YouTube's consent screen; no key to copy.
* **Scopes requested**:
  * `https://www.googleapis.com/auth/youtube.readonly`
  * `https://www.googleapis.com/auth/youtube.force-ssl`

See [YouTube's documentation](https://developers.google.com/youtube/v3/docs).

## Read actions (8)

| Action                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `get_my_channel`       | Get the connected user's own YouTube channel: title, description, statistics (subscribers, views, video count) and contentDetails.relatedPlaylists.uploads (the playlist id holding every uploaded video, readable with list\_playlist\_items).                                                                                                                                                                                                                          |
| `get_video`            | Get one or more videos by id (up to 50): snippet (title, description, tags, categoryId), statistics (views, likes, comments) and contentDetails (duration). id: a video id, a comma-separated list, or an array of ids.                                                                                                                                                                                                                                                  |
| `list_comment_threads` | List top-level comments with their replies. Give videoId (comments on one video) or allThreadsRelatedToChannelId (every comment on a channel and its videos). order: time \| relevance. searchTerms (string): keep only threads matching these keywords. maxResults: integer 1–100. The thread id (and snippet.topLevelComment.id) is the parentId for post\_comment\_reply. Text is returned as plain text.                                                             |
| `list_my_videos`       | List the connected user's own videos (including private and unlisted ones) through search with forMine=true. Optional filters: q (string, keywords), order (date \| rating \| viewCount \| relevance \| title), publishedAfter (RFC 3339 date-time), maxResults (integer 1–50), pageToken. Returns snippets only: call get\_video for statistics. For a complete chronological list, read the uploads playlist from get\_my\_channel with list\_playlist\_items instead. |
| `list_playlist_items`  | List the videos in a playlist (playlistId from list\_playlists, or the uploads playlist from get\_my\_channel). maxResults: integer 1–50. Each item carries snippet.resourceId.videoId and snippet.position.                                                                                                                                                                                                                                                             |
| `list_playlists`       | List playlists. Without channelId, lists the connected user's own playlists; with channelId, lists that channel's public playlists. maxResults: integer 1–50. Returns each playlist's id, snippet, status and item count.                                                                                                                                                                                                                                                |
| `list_subscriptions`   | List the channels the connected user is subscribed to. order: relevance \| unread \| alphabetical. maxResults: integer 1–50. Each item carries snippet.resourceId.channelId.                                                                                                                                                                                                                                                                                             |
| `search_videos`        | Search public YouTube content. q (string): keywords. type: video (default) \| channel \| playlist. order: date \| rating \| viewCount \| relevance \| title \| videoCount. channelId: restrict to one channel. publishedAfter: RFC 3339 date-time. regionCode: ISO 3166-1 alpha-2 country code (e.g. "FR"). maxResults: integer 1–50. Returns snippets with id.videoId / id.channelId / id.playlistId.                                                                   |

## Write actions (5)

| Action                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `add_video_to_playlist` | Add a video to one of your playlists. playlistId: string (from list\_playlists). videoId: string (the 11-character id in watch?v=…). position: integer, zero-based (optional, default = end of the playlist).                                                                                                                                                                                                                                                                                         |
| `create_playlist`       | Create a playlist on the connected channel. title: string (required). description: string (optional). privacyStatus: "public" \| "unlisted" \| "private" (optional). Returns the created playlist with its id.                                                                                                                                                                                                                                                                                        |
| `post_comment_reply`    | Reply to an existing comment. parentId: string (the comment thread id from list\_comment\_threads). textOriginal: string (the reply text, plain text).                                                                                                                                                                                                                                                                                                                                                |
| `post_comment_thread`   | Post a new top-level comment on a video. videoId: string (the 11-character id in watch?v=…). textOriginal: string (the comment text, plain text).                                                                                                                                                                                                                                                                                                                                                     |
| `update_video_metadata` | Update one of your videos' metadata. WARNING: this REPLACES the whole snippet — any field left out (description, tags) is erased. Call get\_video first and send back every field you want to keep. id: string (video id). title: string (required, max 100 characters). categoryId: string (required by YouTube, e.g. "22"; reuse snippet.categoryId from get\_video). description: string (optional, max 5000). tags: array of strings (optional). defaultLanguage: string, BCP-47 code (optional). |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
