
Youtube Shorts
io.github.johnisanerd由 GitHub 账号 johnisanerd 发布v1.1.0更新于 Nov 7, 2026
YouTube Shorts from a channel with views, likes and hashtags. Paid, on Apify's hosted MCP.
概览
通过 Apify 托管的 MCP 抓取任意频道公开的 YouTube Shorts 数据——播放量、点赞、评论、发布时间、话题标签与创作者标签,并以结构化行返回。
- 可以做什么
- 按频道句柄、频道链接或频道 ID,或直接按 Short 链接采集 Shorts,可按最新、最热门或最早排序,并支持日期筛选。
- 返回每条 Short 的指标:播放量与点赞数、评论数、精确的 UTC 发布时间、时长、话题标签、创作者标签及简介链接。
- 返回频道信息:名称、用户名、ID、订阅数、总播放量、视频总数、加入日期与 About 链接。
- 以 JSON、CSV 或 Excel 行输出,便于导入表格、数据库或仪表板;无法读取的频道或链接会返回错误行。
- 适用场景
- 适合对非自有频道做竞品与创作者研究,例如比较不同频道的互动率、统计头部创作者使用的话题标签、查询某条 Short 的精确发布时间,或建立定期的播放量追踪快照。
- 运行要求
- 通过 MCP 客户端访问 Apify 托管服务器上的远程 MCP 端点。需要付费的 Apify 账户,使用 OAuth 或通过 Authorization 请求头以 Bearer 方式传入 Apify API 令牌进行认证。README 中的 Python 方式还需 Python 3.11+ 与 uv。
安装
在 SourceWeft 中
- 打开 控制台中的 Youtube Shorts,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.johnisanerd%2Fyoutube-shorts/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"youtube-shorts": {
"type": "http",
"url": "https://mcp.apify.com/?tools=johnvc/youtube-shorts-api"
}
}
}README
📱 YouTube Shorts API: YouTube Shorts analytics for any channel, from Python or MCP
Pull YouTube Shorts analytics for channels you do not own: views, likes, comment counts, exact publish timestamps, durations, hashtags and the creator's tags for every Short, plus the channel's subscribers, total views and About links. This repo shows how to call the YouTube Shorts API from Python with uv, and how to add it as a tool in Claude, Cursor and ChatGPT through MCP.
Actor: YouTube Shorts API on Apify Store · Input schema
Give it one or more channels (a handle like siliconimist, a channel URL or a UC... id) and it reads each channel's Shorts tab, newest, most popular or oldest first. Or paste direct Short links. Every row is structured JSON you can load into a spreadsheet, a database or an AI agent, with no browser, no YouTube API quota and no login.
Video Walkthrough
Text walkthrough
YouTube Studio only shows Shorts analytics to a channel's owner, but the numbers that matter for competitor and creator research are public on every Short. The YouTube Shorts API reads them in bulk. Put a channel in channels, pick NEWEST, POPULAR or OLDEST in sortChannelShortsBy, and set maxResultsShorts (up to 500 per channel). Each row comes back with viewCount, likes, commentsCount, date as a full ISO 8601 UTC timestamp, duration, hashtags and tags, plus the channel block (channelName, numberOfSubscribers, channelTotalViews, channelDescriptionLinks). A typical use: read the 50 most popular Shorts from three channels in your niche and count which hashtags they carry, which is what the hashtags recipe below does. Add oldestPostDate: "30 days" and a schedule, and the same input becomes a weekly YouTube Shorts analytics snapshot.
Quick Start
You need Python 3.11+ and uv, plus a free Apify account for the API key: get your free API key.
The default run reads the three newest Shorts from one channel, so the first run costs a fraction of a cent. The recipes run with --example:
Sample output of the default run:
Why use this YouTube Shorts API?
Analytics for channels you do not own. Studio is owner-only. This API returns the public numbers for any channel: views, likes, comments and exact publish times per Short, and subscribers and total views per channel.
Only Shorts, no guesswork. The official YouTube Data API has no field that says a video is a Short, so people probe redirects or guess by duration. This API reads the channel's Shorts tab itself, so every row is a Short.
Exact numbers where YouTube gives them. viewCount and likes are exact. The publish date is a full timestamp, not "3 weeks ago".
Hashtags and tags. hashtags lists the # words from the title and description; tags lists the keywords the creator typed into YouTube Studio, which YouTube no longer shows on the page.
Cheap and quota-free. Pay per Short returned; error rows are never charged. No Google project, no API key from Google, no daily quota.
Features
Recipes
The three --example recipes in youtube-shorts-api-example.py cover the most searched use cases. Each keeps its inputs small; raise maxResultsShorts once you know your budget.
- Find the hashtags top YouTube Shorts channels really use (
--example hashtags): reads the most popular Shorts fromMrBeast,zachkingandDanielLaBellewithsortChannelShortsBy: "POPULAR"and tallies thehashtagsfield with combined views. The best hashtags for YouTube Shorts in your niche are the ones the top channels already use; swap in your own channel list. - Find the exact upload date of any YouTube Short (
--example upload-date): pastes two links intostartUrlsand prints each Short'sdate, the full publish timestamp the Shorts player hides. - Track YouTube Shorts views and likes on a schedule (
--example track-views): reads every ShortsiliconimistandMrBeastposted in the last 30 days (oldestPostDate: "30 days") and saves a dated JSON snapshot ofviewCount,likesandcommentsCount. Run it daily and diff the files.
Put it on a schedule. Save any of these inputs as a task in the Apify Console and add a daily or weekly schedule. Each run lands in a new dataset you can send to Google Sheets, a webhook or a database, which is all a YouTube Shorts analytics dashboard needs.
Usage Examples
Basic: the newest Shorts from one channel.
Advanced: the most popular Shorts from several channels, plus two direct links.
Everything a channel posted in the last two weeks (forces NEWEST order):
Input Parameters
Output Format
One row per Short (a real row from the default run; aboutChannelInfo, which repeats the channel fields, is left out here):
A channel or link that cannot be read returns a small error row instead, {url, input, error, note}, with a code such as CHANNEL_DOES_NOT_EXIST, CHANNEL_HAS_NO_SHORTS, DATE_FILTER_TOO_STRICT or VIDEO_UNAVAILABLE. The example script prints these and skips them. Error rows are never charged.
People also search for
Is this a YouTube Shorts scraper?
It does the job people search for as a YouTube Shorts scraper: it reads the public Shorts tab of any channel and returns every Short as structured data. It is packaged as an API, so you call it from code, a schedule or an MCP client instead of running a browser yourself.
How do I get YouTube Shorts analytics for a channel I do not own?
Run the API on the channel handle. Views, likes, comment counts, publish dates, durations and hashtags are public on every Short, and subscriber and total-view counts are public on the channel page; each row carries all of them. Studio-only metrics such as watch time, retention and revenue are private to the owner and not returned.
What are the best hashtags for YouTube Shorts?
Measure them instead of guessing: read the most popular Shorts from five to ten channels in your niche (sortChannelShortsBy: "POPULAR") and count the hashtags field, as the hashtags recipe does. Many of the largest channels use few or none, which is itself useful to know.
Can I extract the tags from a YouTube Short?
Yes. tags returns the keywords the creator entered in YouTube Studio, which the watch page no longer displays, next to hashtags, the title and the description. An empty list means the creator set no tags.
How do I see the upload date of a YouTube Short?
The Shorts player hides it. Put the link in startUrls and read date, the full publish timestamp in UTC.
What is a good engagement rate for YouTube Shorts?
Compute it per Short as likes plus comments over views; the default example prints it. Compare channels of similar size, since small channels often show higher rates on low view counts.
How do I detect which of a channel's videos are Shorts via an API?
Read the channel's Shorts tab, which is what this API does. Every row it returns is a Short, so there is no duration cutoff or redirect check to maintain.
Can I build a YouTube Shorts analytics dashboard with it?
Yes. Schedule a weekly run with oldestPostDate set, export the dataset as CSV or connect the Google Sheets integration, and point Looker Studio or Sheets charts at it.
How do I get YouTube Shorts transcripts?
This API returns metadata and metrics, not captions. The YouTube Transcripts API takes the same Short links and returns the spoken text.
Use from n8n
The YouTube Shorts API is also an n8n community node, n8n-nodes-youtube-shorts-api. In n8n: Settings → Community Nodes → Install, enter n8n-nodes-youtube-shorts-api, add your Apify API token as an Apify API credential, then use the YouTube Shorts node in any workflow (for example a weekly Schedule Trigger into Google Sheets for a YouTube Shorts analytics dashboard). It also works as an AI Agent tool. Self-hosted n8n only.
Install in Claude Cowork Desktop
[Install in Claude Cowork Desktop]
Cowork is the desktop app's automation mode. To give it the YouTube Shorts API as a tool, add the Apify MCP server as a connector.
- Open the Claude desktop app and go to Settings → Connectors (or Settings → Developer → Edit Config to edit
claude_desktop_config.jsondirectly).- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the Apify MCP server, preloaded with only this Actor:
- Restart the app. When Cowork first calls the tool, complete the OAuth prompt in your browser, or add your Apify API token in the connector settings to skip OAuth.
- In a Cowork chat, confirm the tool is available and ask it to run the YouTube Shorts API.
Download the desktop app and start a free trial: https://claude.ai/referral/uIlpa7nPLg More help: https://docs.apify.com/platform/integrations/claude-desktop
Install in Claude Code
Claude Code is the command-line tool. Add the Actor's MCP server with one command:
To use a token instead of browser OAuth:
Then verify with claude mcp list, or run /mcp inside a session. Ask Claude Code to call the YouTube Shorts API, for example: "Compare the last 20 Shorts from @siliconimist and @MrBeast by engagement rate."
Try Claude Code free: https://claude.ai/referral/uIlpa7nPLg Claude Code MCP docs: https://code.claude.com/docs/en/mcp
Install in Claude (website)
On claude.ai you add Apify as a connector, then enable just this Actor's tool.
- Go to Settings → Connectors → Browse connectors and search for Apify MCP server. Install it (enable or update if prompted).
- When connecting, authenticate with your Apify API token, and enable the tool
johnvc/youtube-shorts-api. - In any chat, open + → Connectors and turn on Apify.
- Alternatively, choose Add custom connector and paste the full MCP URL
https://mcp.apify.com/?tools=actors,docs,johnvc/youtube-shorts-api, using OAuth when prompted. - Ask Claude to run the YouTube Shorts API.
Open Claude on the web: https://claude.ai
Install in Cursor
Cursor reads MCP servers from a project file at .cursor/mcp.json.
- In your project, create
.cursor/mcp.json:
- If you prefer token auth over browser OAuth, add a header:
- Open Cursor → Settings → MCP and confirm the apify server is connected (green dot).
- In Composer or Chat, ask Cursor to call the YouTube Shorts API.
New to Cursor? Get it here: https://cursor.com/referral?code=XQP4VBLI3NNX
Install in ChatGPT
ChatGPT connects to the Apify MCP server through Developer mode (available on ChatGPT Pro, Plus, Business, Enterprise, and Education plans).
- Click your profile icon, then go to Settings > Apps. If you do not see a Create app button, open Advanced settings and enable Developer mode.
- Click Create app and fill out the form:
- Name: Apify
- MCP Server URL:
https://mcp.apify.com/?tools=actors,docs,johnvc/youtube-shorts-api - Authentication: OAuth
- Click Create and authorize the connection with Apify.
- To use the app in a conversation, click + in the chat, choose Developer mode, and select Apify.
More help: https://docs.apify.com/platform/integrations/mcp
This API is not affiliated with, endorsed by, or connected to YouTube or Google. Made with care by johnvc on Apify.
Last Updated: 2026.09.30
来源:README.md,提交 004efd9
工具
0版本历史
2- v1.1.0最新Nov 7, 2026
- v1.0.0Nov 4, 2026
评分
已满足适用检查项的 83%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证不适用
托管服务按其提供方的条款使用,因此这里不要求许可证。此检查项不计入百分比。