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

# YouTube data for AI agents

> Search YouTube videos and Shorts, read comments, pull transcripts and captions, profile channels and list their uploads through AgentKey — no Google API quota.

YouTube is the largest video library on the web, and the official Data API
comes with a daily quota, OAuth hurdles and no transcript endpoint — the thing
an agent most often needs. Through AgentKey your agent reads public YouTube data
the same way it reads everything else — `find_tools`, `describe_tool`,
`execute_tool` — with several providers behind the scenes, so one route failing
does not stop the task.

## What you can ask

* *"Find the most viewed videos about 'vibe coding' uploaded this month."*
* *"Transcribe this YouTube video and give me the key points."*
* *"What do the comments on this video say — is the reaction positive?"*
* *"List the latest uploads and Shorts from the MKBHD channel."*
* *"What is trending on YouTube right now?"*
* *"Get this channel's description and subscriber count from its handle."*
* *"Show me videos related to this one."*
* *"What has this channel posted on its Community tab lately?"*

## What's covered

**Videos**

* Keyword search with language, upload-date, duration and sort filters; a
  separate search for Shorts
* Video detail by ID; related videos; trending videos
* Stream information and a signed stream URL for playback
* Search suggestions for expanding a query

**Comments**

* Top-level comments with sorting and locale options, paginated
* Replies under a comment thread

**Transcripts and captions**

* The caption tracks available for a video, returned as SRT, XML, JSON3 or
  plain text
* Spoken-text transcript extraction, with an asynchronous job mode for videos
  that take longer to process

**Channels**

* Channel information and description; channel ID from a URL or handle, and the
  channel URL back from an ID
* A channel's videos, Shorts and Community posts
* Channel search

## How to use it

Pass the request in plain language and let the router pick the tool:

```text theme={null}
find_tools(q="transcript of this YouTube video with key points")
find_tools(prefix="social/youtube")        # browse everything for YouTube
describe_tool("<returned Provider/Operation>")
execute_tool("<Provider/Operation>", { ...params })
```

Both English and Chinese phrasing work, and the platform's usual English and Chinese names all land here. Always `describe_tool` before executing — parameters and
per-call costs differ between providers.

> [!NOTE]
>
> **Building with code?** The same capability is available as fixed-contract
> [Scenario Methods](/api-reference/scenario/overview) with automatic provider
> failover:
> [`social.youtube.post.search`](/api-reference/scenario/methods/social-youtube-post-search),
> [`social.youtube.post.get`](/api-reference/scenario/methods/social-youtube-post-get),
> [`social.youtube.post.comments`](/api-reference/scenario/methods/social-youtube-post-comments),
> [`social.youtube.post.transcript`](/api-reference/scenario/methods/social-youtube-post-transcript),
> [`social.youtube.user.get`](/api-reference/scenario/methods/social-youtube-user-get),
> [`social.youtube.user.posts`](/api-reference/scenario/methods/social-youtube-user-posts),
> [`social.youtube.user.search`](/api-reference/scenario/methods/social-youtube-user-search),
> [`social.youtube.link.resolve`](/api-reference/scenario/methods/social-youtube-link-resolve).

## FAQ

> **Do I need a Google API key or a YouTube quota?**
>
> No. AgentKey holds the upstream access; your agent only needs your AgentKey
> subscription.

> **Does every video have a transcript?**
>
> Caption tracks are returned when YouTube has them, whether uploaded by the
> creator or auto-generated, and the transcript route extracts the spoken
> text. A video with no captions and no extractable speech returns nothing
> to transcribe.

> **Can it read private or unlisted videos?**
>
> No. Only public videos, comments and channels are available; results
> reflect what YouTube returns at request time.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.