Skip to main content

YouTube

Connects to the YouTube Data API v3. An agent can search YouTube, fetch detailed video and channel information, and list the videos in a playlist.

Add to an agent node's tools array with _node_type: "tool-youtube". See Connector Reference — How connectors are used.

Authentication

FieldRequiredDescription
api_keyYesGoogle Data API v3 key, appended to each request as ?key=<api_key>. Typically a stored secret.
{
"name": "youtube",
"_node_type": "tool-youtube",
"api_key": "{{ secret.YOUTUBE_API_KEY }}"
}

Tools

Search YouTube for videos, channels, or playlists.

Parameters

ParameterTypeRequiredDescription
querystringYesSearch query
max_resultsnumberNoMax results 1-50 (default 10)
typestringNoResult type: video, channel, playlist (default video)

Returns: A list of results separated by blank lines. For videos: **title** by channel\nhttps://youtube.com/watch?v=<id>\ndescription. For channels: **title**\nhttps://youtube.com/channel/<id>\ndescription. For playlists: **title** by channel\nhttps://youtube.com/playlist?list=<id>. Returns "No results found." if there are no matches.

youtube_get_video

Get detailed information about a YouTube video including stats, description, and tags.

Parameters

ParameterTypeRequiredDescription
video_idstringYesYouTube video ID (e.g. dQw4w9WgXcQ)

Returns: A formatted block with title, channel, published date, duration, view/like counts, description, and the video's URL, or "Video not found.".

youtube_get_channel

Get information about a YouTube channel including subscriber count and recent videos.

Parameters

ParameterTypeRequiredDescription
channel_idstringYesYouTube channel ID or username

Returns: A formatted block with the channel title, subscriber/video/view counts, and description, or "Channel not found.".

youtube_list_playlist

List videos in a YouTube playlist.

Parameters

ParameterTypeRequiredDescription
playlist_idstringYesYouTube playlist ID
max_resultsnumberNoMax results (default 10)

Returns: A numbered list of N. **title** — https://youtube.com/watch?v=<videoId> lines, or "Playlist is empty or not found.".

Next