Tubask
Primary tool

youtube_query

The main entry point for YouTube in chat. Paste a URL, @handle, playlist, or search text — or set goal/intent explicitly. Handles search, channels, playlists, comments, and multi-video creator advice in one call.

When to use

  • User pastes any YouTube link and intent isn't obvious yet
  • Search or research across YouTube
  • Latest uploads from a channel
  • What a creator teaches about a topic (goal=advice)
  • Comments, playlist items, channel/video metadata
For a single-video summary with chapters, use summarize_video instead. For exact caption text, use get_transcript.

Quick examples

youtube_query(intent="auto", ref="https://www.youtube.com/watch?v=VIDEO_ID")

Auto-detects video, channel, playlist, or search from the ref string.

ref formats (intent=auto)

Pass anything the user pasted into ref. The server recognizes:

  • Video URLs: youtube.com/watch?v=, youtu.be/, youtube.com/shorts/
  • Channel: @handle, youtube.com/channel/UC…, /c/, /user/
  • Playlist: youtube.com/playlist?list=
  • Plain search text (no URL) — treated as a search query

Parameters

ParameterTypeDefaultDescription
intentenumautoRouting mode. Use auto for pasted refs; set explicitly for advanced control.
goalenumautoUser-friendly shortcut that maps to intent. Prefer this in chat-driven flows.
refstring | nullnullPrimary reference — URL, @handle, playlist, or search text.
querystring | nullnullSearch query when intent is research/search.
channel_refstring | nullnullChannel handle or URL for latest/advice/channel_info.
video_refstring | nullnullVideo URL or ID for video_info, comments.
playlist_refstring | nullnullPlaylist URL or ID for playlist_videos.
max_resultsinteger5Cap on videos, comments, or search results returned.
page_tokenstring | nullnullPagination token from a previous response.
exclude_shortsbooleantrueFilter YouTube Shorts from channel latest and advice.
include_statsbooleantrueInclude view/like counts where available.
result_typevideo | channel | playlistvideoSearch result filter.
orderenumrelevanceSearch sort: relevance, date, viewCount, rating, title, videoCount.
comment_orderrelevance | timerelevanceSort order for video comments.
include_repliesbooleantrueInclude reply threads on comments.
channel_idstring | nullnullRaw channel ID when you already resolved it.
include_full_descriptionbooleanfalseReturn full video/channel description (more tokens).
depthbrief | detailedbriefDetail level for advice synthesis.
topic_filterstring | nullnullNarrow creator advice to a topic, e.g. "hiring" or "kubernetes".

intent values

auto

Detect from ref. Default and best for pasted links.

latest_channel

Recent uploads from channel_ref. Pair with exclude_shorts.

research / search

Topic search via query. Use order=viewCount for popularity ranking.

creator_insights

Multi-video synthesis — same as goal=advice. One call, multiple videos.

video_comments

Top comments on video_ref.

playlist_videos

List videos in playlist_ref.

video_info / channel_info

Metadata only — title, description, stats. No transcript.

What you get back

Response shape depends on intent. Common fields:

  • Video list with titles, IDs, durations, view counts
  • Channel name, handle, subscriber count
  • Comment text, author, like count
  • For advice: synthesized themes across videos with source video IDs
  • next_steps[] — e.g. "call summarize_video on video X" or "paginate with page_token"

Quota tips

  • goal=adviceCheaper than N summarize_video calls
  • max_results=5Default is conservative; raise only when needed
  • goal=researchOne broad search beats many narrow ones
  • include_full_description=falseSaves tokens and API units

Quota & billing · Example prompts