
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 分
- 授權條款不適用
託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。