YouTube Transcripts (via Apify) について
YouTube Transcript Scraper は、YouTube の字幕を取得する Apify Actor です。AI エージェントや開発者向けに、字幕テキストとタイムスタンプ付きセグメント、動画やチャンネルの情報を返します。
主な機能
- 01動画、Shorts、チャンネル、再生リストを取得
- 02字幕テキストとタイムスタンプ付きセグメントを返却
- 03タイトル、チャンネル、再生数などを収録
- 04手動字幕を優先し、自動生成字幕にも対応
- 05チャンネルや再生リストの新着動画を定期処理
活用シーン
- 01AI エージェントに動画字幕を提供
- 02タイムスタンプ付き字幕の整理
- 03チャンネルの新着字幕を定期取得
MCP 対応
Apify のホスト型 MCP サーバーが、MCP クライアントに字幕取得機能を提供します。README にはローカル接続の設定も記載されています。
設定
リモートサーバーはインストール不要です。クライアントを選んで設定をコピーするか、ワンクリックで導入できます。
https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraperclaude mcp add --transport http retracn-youtube-transcripts https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper{"mcpServers":{"retracn-youtube-transcripts":{"type":"http","url":"https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper"}}}Cursor で開く{"servers":{"retracn-youtube-transcripts":{"type":"http","url":"https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper"}}}VS Code で開く{"mcpServers":{"retracn-youtube-transcripts":{"type":"http","url":"https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper"}}}{"mcpServers":{"retracn-youtube-transcripts":{"serverUrl":"https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper"}}}コマンドはターミナルで実行し、JSON は各クライアントの MCP 設定に貼り付けて再起動します。認可が必要なサーバーは初回接続時にログインを求めます。
https://mcp.apify.com/?tools=automationnation/youtube-transcript-scraper認証が必要ツール
詳細
YouTube Transcript Scraper & API:キャプションと字幕
YouTube Transcript Scraperは、任意のYouTube動画の文字起こしを、プレーンテキストとタイムスタンプ付きセグメントとして返すApify Actorです。キャプションの言語を問わず、タイトル、チャンネル、再生回数、長さも取得できます。動画、Shorts、チャンネル、プレイリストのURLに対応し、料金は文字起こし1,000件あたり$1.50です。キャプションのない動画には料金がかかりません。
**料金:**文字起こし1,000件あたり$1.50(Gold以上では$1.20) · 実行: https://apify.com/automationnation/youtube-transcript-scraper · ガイド: https://retracn.github.io/automationnation-actors/youtube-transcript-scraper/
主な情報
- 動画ごとに1行で、文字起こしテキスト、タイムスタンプ付きセグメント、言語、自動生成フラグ、すべてのキャプション言語、タイトル、チャンネル、再生回数、長さ、説明、タグを返します。
- youtube-transcript-apiをお使いですか?オープンソースのyoutube-transcript-cloudパッケージ(github.com/retracn/youtube-transcript-cloud)はそのインターフェースを維持したまま、このActor上で実行されます。そのため、AWS、GCP、その他のサーバーからRequestBlockedエラーなしで利用できます。
- 動画、Shorts、チャンネル、プレイリスト(最新15件の動画)に対応しています。
- 手動キャプションを優先し、次に自動生成キャプションを使用します。翻訳は可能な範囲で対応します。
- 料金:文字起こし1,000件あたり$1.50。キャプションのない動画は無料です。
- チャンネルを自動処理:Only new videosをオンにすると、スケジュール実行のたびに、チャンネルまたはプレイリストの新しいアップロードを1回ずつ文字起こしします。ガイド:https://retracn.github.io/automationnation-actors/guides/auto-transcribe-youtube-channel/
- Vercel、Lambda、RenderでNode.jsをお使いですか?オープンソースのyoutube-transcript-cloudパッケージ(github.com/retracn/youtube-transcript-cloud-js)は、youtube-transcriptのnpm APIとエラーを維持したまま、このActor上で実行されるため、本番環境でも文字起こしを利用できます。
入力例
{
"videos": [
"https://www.youtube.com/watch?v=UF8uR6Z6KLc"
],
"language": "en"
}
コードから実行
REST API
curl -X POST "https://api.apify.com/v2/acts/automationnation~youtube-transcript-scraper/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"videos": ["https://www.youtube.com/watch?v=UF8uR6Z6KLc"], "language": "en"}'
Python — examples/python_example.pyを参照してください
# pip install apify-client
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("automationnation/youtube-transcript-scraper").call(run_input={
"videos": [
"https://www.youtube.com/watch?v=UF8uR6Z6KLc"
],
"language": "en"
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item.get("title"), item.get("channel"), item.get("wordCount"), item.get("transcriptLanguage"))
JavaScript — examples/node_example.mjsを参照してください
// npm install apify-client
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('automationnation/youtube-transcript-scraper').call({
"videos": [
"https://www.youtube.com/watch?v=UF8uR6Z6KLc"
],
"language": "en"
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) console.log(item.title, item.channel, item.wordCount, item.transcriptLanguage);
AI エージェントで使用する(MCP)
ホスト型MCPサーバーのURL(Claude、ChatGPT、Cursor、およびリモートMCPに対応するその他のクライアント向け):
https://mcp.apify.com?tools=automationnation/youtube-transcript-scraper
Claude Desktop / Cursorのローカル設定 — mcp/claude_desktop_config.json:
{
"mcpServers": {
"youtube-transcript-scraper": {
"command": "npx",
"args": [
"-y",
"@apify/actors-mcp-server",
"--tools",
"automationnation/youtube-transcript-scraper"
],
"env": {
"APIFY_TOKEN": "YOUR_APIFY_TOKEN"
}
}
}
}
よくある質問
YouTubeに公式の文字起こしAPIはありますか? YouTube Data APIでは、自分が所有する動画のキャプションのみダウンロードできます。YouTube Transcript Scraperは、任意の動画の公開キャプションを返します。
音声を文字起こしできますか? いいえ。YouTubeにすでにあるキャプション(手動または自動生成)を返します。キャプションのない動画はno_transcriptとして返され、料金はかかりません。
チャンネルの新しい動画をすべて自動で文字起こしできますか? はい。チャンネルURLを追加し、Only new videosをオンにして、毎日実行するようスケジュールしてください。実行のたびに新しいアップロードのみを文字起こしします。まだキャプションがない動画は、次回実行時に再試行されます。
AutomationNationのその他のツール
- AI Visibility Tracker — チェックした回答1件あたり$0.05(Goldでは$0.04)+オプションレポート1件あたり$0.50 · GitHubの使用例
- Google Jobs Scraper — 求人1,000件あたり$2(有料プランでは$1.50)+検索1回あたり$0.03 · GitHubの使用例
- Google Shopping Scraper — 商品1,000件あたり$1(Gold以上では$0.80) · GitHubの使用例
- Google Flights Scraper — フライト1,000件あたり$0.20(Gold以上では$0.16) · GitHubの使用例
- Google Hotels Scraper — ホテル1,000件あたり$1(Gold以上では$0.80) · GitHubの使用例
- Google Ads Transparency Scraper — 広告1,000件あたり$1(Gold以上では$0.80) · GitHubの使用例
- Google News Scraper — 記事1,000件あたり$1(Gold以上では$0.80) · GitHubの使用例
- Google Images Scraper — 画像1,000件あたり$0.25(Gold以上では$0.20) · GitHubの使用例
- Google Custom Search API Alternative — 最大10件の結果を返す検索1,000回あたり$5(Gold以上では$4) · GitHubの使用例
- Google Videos Scraper — 動画1,000件あたり$1(Gold以上では$0.80) · GitHubの使用例
- Google Trends Scraper — キーワードレポート1,000件あたり$1(有料プランでは$0.27~$0.90) · トレンド検索1,000件あたり$0.50 · GitHubの使用例
- App Store Reviews Scraper — レビュー1,000件あたり$0.08(有料プランでは$0.05~$0.07) · GitHubの使用例
- Google Play Reviews Scraper — レビュー1,000件あたり$0.08(有料プランでは$0.05~$0.07) · GitHubの使用例
- AEO & GEO Tracker — Google AI Overview Citation Checker — キーワード1件あたり$0.04(Goldでは$0.032)、2026年11月17日から実行1回あたり$2を追加;2026年10月16日まではキーワード1件あたり$0.01 · GitHubの使用例
- Google Maps Leads Scraper — リード1件あたり$0.03(Goldでは$0.024);ウェブサイトなし、または未申請のフィルターで見つかったビジネス1件あたり$0.08 · GitHubの使用例
- Google Maps Leads Scraper UK — リード1件あたり$0.05(Goldでは$0.04) · GitHubの使用例
- App Store & Google Play Reviews Scraper + AI — アプリレポート1件あたり$0.05(Goldでは$0.04) · GitHubの使用例
- UK Companies House Leads — Filing Signals & AI Outreach — リード1件あたり$0.008
- Contact Waterfall Enrichment — Emails & Directors — 企業1社あたり$0.015
- すべてのActorsとガイド · AI可視性トラッカーの比較 · Google Jobsスクレイパーの比較 · Google Trendsスクレイパーの比較 · App Storeレビューのスクレイパー比較 · Google Playレビューのスクレイパー比較 · YouTube文字起こしスクレイパーの比較 · Google Flightsスクレイパーの比較 · Google Hotelsスクレイパーの比較 · Google Ads Transparencyスクレイパーの比較 · Google Shoppingスクレイパーの比較 · Google Newsスクレイパーの比較
このリポジトリには使用例が含まれています。スクレイパー自体はApify プラットフォーム上で実行されます。無料の Apify アカウントと API トークンが必要です。使用例は MIT ライセンスです。
コメント
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。