TranscriptAPI — YouTube transcripts (transcriptapi.io)
YouTube transcripts, search, channels and playlists for AI agents, by transcriptapi.io.
我该使用它吗
质量与安全性
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"youtube-transcript": {
"command": "npx",
"args": [
"transcriptapi-mcp"
]
}
}
}可运行的软件包
0.1.1stdio远程端点
https://api.transcriptapi.io/mcpstreamable-http它能做什么
工具清单
工具(5)
🟢get_youtube_transcript(video, language, translate_to, format)
Fetch the transcript (captions/subtitles) of a YouTube video as text. Accepts a watch URL, youtu.be link, Shorts link or bare 11-character video id. Returns the spoken text with timestamps grouped in ~30 s blocks by default; format 'text' is prose without timestamps, 'srt'/'vtt' are subtitle files, 'json' is raw segments with start/duration. Works with creator-uploaded and auto-generated captions. translate_to translates the transcript with AI (extra credits, scales with length) — omit unless asked.
输入模式
{
"type": "object",
"properties": {
"video": {
"title": "Video",
"type": "string"
},
"language": {
"default": "en",
"title": "Language",
"type": "string"
},
"translate_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Translate To"
},
"format": {
"default": "timestamped",
"title": "Format",
"type": "string"
}
},
"required": [
"video"
],
"title": "get_youtube_transcriptArguments"
}输出模式
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_youtube_transcriptOutput"
}🟢search_youtube(query, limit)
Search YouTube for videos by keyword. Returns video ids, titles, channel names, durations and view counts. Use a returned id with get_youtube_transcript to read it.
输入模式
{
"type": "object",
"properties": {
"query": {
"title": "Query",
"type": "string"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
}
},
"required": [
"query"
],
"title": "search_youtubeArguments"
}输出模式
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "search_youtubeOutput"
}🟢get_channel_videos(channel, limit)
List the most recent uploads of a YouTube channel, newest first. Accepts a channel id (UC…), a handle (@name) or a channel URL. Returns ids, titles, durations, view counts and publish dates.
输入模式
{
"type": "object",
"properties": {
"channel": {
"title": "Channel",
"type": "string"
},
"limit": {
"default": 20,
"title": "Limit",
"type": "integer"
}
},
"required": [
"channel"
],
"title": "get_channel_videosArguments"
}输出模式
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_channel_videosOutput"
}🟢search_channel_videos(channel, query, limit)
Search for videos inside one YouTube channel by keyword — 'find the video where <channel> talks about <topic>'. Accepts a channel id, @handle or channel URL.
输入模式
{
"type": "object",
"properties": {
"channel": {
"title": "Channel",
"type": "string"
},
"query": {
"title": "Query",
"type": "string"
},
"limit": {
"default": 10,
"title": "Limit",
"type": "integer"
}
},
"required": [
"channel",
"query"
],
"title": "search_channel_videosArguments"
}输出模式
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "search_channel_videosOutput"
}🟢get_playlist_videos(playlist, limit)
List the videos in a YouTube playlist, in playlist order. Accepts a playlist URL (anything with list=…) or the playlist id. Returns ids and titles for get_youtube_transcript.
输入模式
{
"type": "object",
"properties": {
"playlist": {
"title": "Playlist",
"type": "string"
},
"limit": {
"default": 50,
"title": "Limit",
"type": "integer"
}
},
"required": [
"playlist"
],
"title": "get_playlist_videosArguments"
}输出模式
{
"type": "object",
"properties": {
"result": {
"title": "Result",
"type": "string"
}
},
"required": [
"result"
],
"title": "get_playlist_videosOutput"
}社区
证据