关于 youtube-shorts
youtube-shorts 是托管在 Apify 上的 MCP 服务,可按 YouTube 频道或提供的链接获取 Shorts。它返回视频和频道指标,并支持按日期筛选和排序,适用于创作者分析与趋势研究。
主要功能
- 01按频道或链接列出 Shorts
- 02返回观看、点赞和评论数据
- 03提供标签和频道统计
- 04按日期筛选并排序结果
适用场景
- 01查看频道 Shorts 的表现
- 02研究短视频趋势
- 03追踪竞争对手的视频内容
MCP 相关
托管的 Streamable HTTP MCP 端点提供一个 YouTube Shorts Actor 工具,以及用于查看运行状态、数据集、存储记录和终止运行的 Apify 辅助工具。调用会在用户的 Apify 账户上运行。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.apify.com/?tools=johnvc/youtube-shorts-apiclaude mcp add --transport http johnisanerd-youtube-shorts https://mcp.apify.com/?tools=johnvc/youtube-shorts-api{"mcpServers":{"johnisanerd-youtube-shorts":{"type":"http","url":"https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"}}}在 Cursor 中打开{"servers":{"johnisanerd-youtube-shorts":{"type":"http","url":"https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"}}}在 VS Code 中打开{"mcpServers":{"johnisanerd-youtube-shorts":{"type":"http","url":"https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"}}}{"mcpServers":{"johnisanerd-youtube-shorts":{"serverUrl":"https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
YouTube Shorts MCP 服务
注册表名称:io.github.johnisanerd/youtube-shorts。由 AlphaOSINT(Apify 开发者 johnvc,GitHub 用户 johnisanerd)维护。
功能
列出某个频道的 Shorts(或获取指定 Short 链接的数据),包含观看次数、点赞数、评论数、发布时间、时长、主题标签和频道统计数据,并按日期排序和筛选。
适用场景
分析频道的短视频表现。可用于创作者分析、趋势研究和竞品内容追踪。
工作原理
该服务在 Apify 托管的 MCP 端点上运行,因此无需安装或自行托管。其 URL 通过 ?tools=johnvc/youtube-shorts-api 指定一个 Actor,为 Agent 提供单个工具 johnvc--youtube-shorts-api,该工具的参数采用 Actor 的类型化输入架构。Agent 无需先搜索 Actor 即可直接调用该工具,也无法通过此服务启动其他 Actor。如需访问整个 Apify Store,请使用不带 tools 参数的 https://mcp.apify.com。
定价
每次工具调用都会在你自己的 Apify 账户上运行 Apify Actor johnvc/youtube-shorts-api,并按该 Actor 的价格计费:
| 费用 | 价格(USD) | 计费内容 |
|---|---|---|
| Short | $0.00001 | 按数据集中返回的每个 YouTube Short 计费(视频指标和频道统计数据位于同一行)。错误行、空频道和跳过的项目不收费。 |
| 日期筛选 | $0.00001 | 每个返回的 Short 额外收取少量费用,仅在设置 oldestPostDate 时适用。 |
截至 2026-11-13 的免费套餐费率;付费 Apify 套餐的单次事件费用更低。Apify 还会按每次运行启动和存储的行数收取 Token 费用($0.00001、$0.00001)。当前价格请查看 Actor 页面:https://apify.com/johnvc/youtube-shorts-api
端点
- 传输方式:Streamable HTTP
- URL:
https://mcp.apify.com/?tools=johnvc/youtube-shorts-api - 身份验证:Apify OAuth(首次使用时打开),或使用请求头
Authorization: Bearer <APIFY_TOKEN>(Apify Console → Settings → API & Integrations)
设置
Claude Code
claude mcp add --transport http youtube-shorts "https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"
VS Code(.vscode/mcp.json)
{
"servers": {
"youtube-shorts": {
"type": "http",
"url": "https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"
}
}
}
Cursor(~/.cursor/mcp.json)
{
"mcpServers": {
"youtube-shorts": {
"url": "https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"
}
}
}
Claude Desktop:进入 Settings → Connectors → Add custom connector,然后粘贴 URL。旧版本不支持远程连接器,可通过 mcp-remote 在 claude_desktop_config.json 中桥接:
{
"mcpServers": {
"youtube-shorts": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"
]
}
}
}
工具
| 工具 | 功能 |
|---|---|
johnvc--youtube-shorts-api | 使用下方参数运行 Actor,并返回结果行。 |
get-actor-run | 查看工具启动的运行状态(适用于长时间运行)。 |
get-dataset-items | 当运行的完整输出超过内联结果时,分页获取输出。 |
get-key-value-store-record | 读取运行存储的记录。 |
abort-actor-run | 停止运行。 |
加载 Actor 工具时,Apify 的端点会额外提供这四个辅助工具。
johnvc--youtube-shorts-api 的参数
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
channels | array | ["siliconimist"] | 要读取 Shorts 的 YouTube 频道列表。可使用带或不带 @ 的句柄(siliconimist、@MrBeast)、频道 URL(https://www.youtube.com/@nasa)或频道 ID(UC...)。每个频道最多返回 maxResultsShorts 个 S… | |
startUrls | array | 粘贴单个 YouTube Short 或视频链接,仅获取这些内容(https://www.youtube.com/shorts/、watch?v= 或 youtu.be/)。可选;可与 channels 自由组合。每次运行最多 200 个链接。日期字… | ||
maxResultsShorts | integer | 10 | 限制每个频道返回的 Shorts 数量(1 到 500)。总数达到 1,000 个 Shorts 时停止运行。 | |
sortChannelShortsBy | string: NEWEST, POPULAR, OLDEST | 选择频道 Shorts 页签的排序方式:NEWEST(默认)、POPULAR 或 OLDEST。对应频道页面上的三个排序按钮。设置 oldestPostDate 时将忽略此项(强制使用 NEWEST)。 | ||
oldestPostDate | string | 仅返回在此日期或之后发布的 Shorts。可使用绝对日期(2025-06-03),或相对时长,例如 7 days、2 weeks 或 3 months。设置此项会强制使用 NEWEST 排序,以便列表在遇到第一个更早的 Sh… |
示例
用日常语言向 Agent 提出请求,或使用如下参数调用 johnvc--youtube-shorts-api:
{
"channels": [
"siliconimist"
],
"maxResultsShorts": 10
}
输出
包含以下字段的 JSON 行:
| Field | Type | Description |
|---|---|---|
title | string | Short 的标题。 |
translatedTitle | string | 保留用于存放翻译后的标题;此版本中为 null。 |
translatedText | string | 保留用于存放翻译后的描述;此版本中为 null。 |
type | string: shorts, None | 内容类型;Short 对应的行始终为 shorts。 |
id | string | Short 的 YouTube 视频 ID。 |
url | string | Short 的规范 URL。 |
thumbnailUrl | string | 可用的最大缩略图。 |
viewCount | integer | 获取时的精确观看次数。 |
date | string | ISO 8601 UTC 格式的发布时间戳。极少数情况下,YouTube 不提供精确时间,此时仅精确到日期(YYYY-MM-DD)。 |
likes | integer | 获取时的精确点赞数。 |
location | string | 创作者为 Short 设置的位置;通常为 null。 |
channelName | string | 发布该 Short 的频道显示名称。 |
channelUrl | string | 规范频道 URL(频道 ID 格式)。 |
channelId | string | YouTube 频道 ID(UC...)。 |
collaborators | array | 与该 Short 合作的频道;没有合作频道时为空。 |
channelUsername | string | 不带 @ 符号的频道用户名。 |
channelDescription | string | 频道的“简介”文本。 |
channelJoinedDate | string | YouTube 显示的频道创建日期。 |
channelDescriptionLinks | array | 频道“简介”部分中的链接,以 {text, url} 对象表示。 |
channelLocation | string | 频道在“简介”部分列出的国家/地区。 |
channelAvatarUrl | string | 频道头像图片 URL。 |
channelBannerUrl | string | 频道横幅图片 URL。 |
channelTotalVideos | integer | 频道视频总数。 |
channelTotalViews | integer | 频道总观看次数。 |
numberOfSubscribers | integer | 订阅者数量。低于 1,000 时为精确值,否则根据 YouTube 舍入后的数值解析(15.1M = 15100000)。 |
isChannelVerified | boolean | 频道是否显示已验证徽章。 |
inputChannelUrl | string | 请求的频道规范化 URL。 |
isAgeRestricted | boolean | YouTube 是否将该 Short 标记为有年龄限制。 |
aboutChannelInfo | object | 为方便起见,将所有频道字段重复收纳在一个对象中。 |
duration | string | 时长,格式为 HH:MM:SS。 |
commentsCount | integer | 评论数。低于 1,000 时为精确值,否则根据 YouTube 舍入后的数值解析(11K = 11000)。关闭评论时为 null。 |
text | string | Short 的完整描述文本。 |
descriptionLinks | array | 描述中找到的 URL,以 {url, text} 对象表示。 |
subtitles | array | 保留字段;此版本中为 null。字幕请使用 YouTube Transcripts API。 |
order | integer | 该 Short 在其频道返回列表中的从零开始的位置。 |
commentsTurnedOff | boolean | 创作者为该 Short 关闭评论时为 True。 |
fromYTUrl | string | 读取该 Short 时使用的 YouTube 页面:频道的 Shorts 标签页;如果是直接链接,则为 Short 链接本身。 |
isMonetized | boolean | 保留字段;YouTube 不公开提供变现信息,因此此字段为 null。 |
hashtags | array | 标题和描述中找到的话题标签,包含 # 符号。 |
tags | array | 创作者设置的视频关键词(在 YouTube Studio 中设置的标签),按 YouTube 返回的顺序排列,不包含 # 符号。创作者未设置标签时为空列表。不属于即插即用契约;这是一个额外的键,现有 pipe… |
isMembersOnly | boolean | 该 Short 仅限频道会员观看时为 True。 |
input | string | 生成此行的确切输入值(频道或链接)。 |
fromChannelListPage | string | 此行来自频道的 Shorts 标签页时为 shorts;对于直接链接则为 null。 |
error | string | 仅在错误行中出现:CHANNEL_DOES_NOT_EXIST、CHANNEL_HAS_NO_SHORTS、DATE_FILTER_TOO_STRICT、VIDEO_UNAVAILABLE、AGE_RESTRICTED、INVALID_INPUT、NO_RESULTS、YOUTUBE_BLOCKED 或 INPUT_TRUNCATED。错误行永远不会… |
note | string | 错误行中的易读说明。 |
数据来源与条款
通过抓取 YouTube 公开的频道和 Shorts 页面获取数据。服务会返回调用时发布的数据。您有责任按照来源的条款及适用法律使用这些数据。AlphaOSINT 与该来源无关联。
链接
- Apify 上的 Actor:https://apify.com/johnvc/youtube-shorts-api
- 文档页面:https://alphaosint.com/mcp/youtube-shorts/
- 所有 AlphaOSINT MCP 服务:索引
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。