jpskill.com
💼 ビジネス コミュニティ

youtube-comments-api-skill

YouTube動画の検索やコメント抽出を自動化し、特定の動画テーマに対する視聴者の感情分析、競合動画の調査、トレンド分析など、市場調査に役立つ情報を効率的に収集・分析するSkill。

📜 元の英語説明(参考)

This skill helps users extract structured video list data and comment data from YouTube using the BrowserAct API. The Agent should proactively apply this skill when users request searching for YouTube videos and their comments, analyzing viewer sentiment for a specific video topic, gathering audience feedback on AI or automation, extracting a list of top videos and their viewer reactions, compiling YouTube video data along with user opinions, retrieving competitor video titles and related audience discussions, monitoring public response to specific YouTube search keywords, summarizing comments from search results for market research, tracking viewer engagement metrics and replies for trending topics, collecting YouTube video URLs and author details alongside community discussions, or automating the extraction of YouTube comments without manual scraping.

🇯🇵 日本人クリエイター向け解説

一言でいうと

YouTube動画の検索やコメント抽出を自動化し、特定の動画テーマに対する視聴者の感情分析、競合動画の調査、トレンド分析など、市場調査に役立つ情報を効率的に収集・分析するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o youtube-comments-api-skill.zip https://jpskill.com/download/17640.zip && unzip -o youtube-comments-api-skill.zip && rm youtube-comments-api-skill.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17640.zip -OutFile "$d\youtube-comments-api-skill.zip"; Expand-Archive "$d\youtube-comments-api-skill.zip" -DestinationPath $d -Force; ri "$d\youtube-comments-api-skill.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して youtube-comments-api-skill.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → youtube-comments-api-skill フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
2

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

YouTube Comments API 自動化スキル

📖 はじめに

このスキルは、BrowserAct YouTube Comments API テンプレートを通じて、YouTubeの動画とコメントデータを一括で抽出するサービスを提供します。YouTubeから構造化された動画の結果と、それに対応するコメントを直接抽出できます。検索キーワード、コメントの制限数、スクロール回数を指定するだけで、クリーンでそのまま使える動画とコメントのデータセットを直接取得できます。

✨ 特徴

  1. ハルシネーションゼロ、安定した正確なデータ抽出を保証: 事前設定されたワークフローにより、AIによる生成的なハルシネーションを回避します。
  2. CAPTCHAの問題なし: reCAPTCHAやその他の認証の課題に対処する必要はありません。
  3. IPアクセス制限やジオフェンシングなし: 地域ごとのIP制限に対処する必要はありません。
  4. よりアジャイルな実行速度: 純粋なAI駆動のブラウザ自動化ソリューションと比較して、タスクの実行が高速です。
  5. 非常に高い費用対効果: 大量のトークンを消費するAIソリューションと比較して、データ取得コストを大幅に削減します。

🔑 APIキーのガイダンスプロセス

実行する前に、まず BROWSERACT_API_KEY 環境変数が設定されているか確認する必要があります。設定されていない場合は、他のアクションを実行せず、ユーザーに要求して提供されるのを待つ必要があります。 この時点で、Agentはユーザーに以下を通知する必要があります:

「BrowserAct API Keyがまだ設定されていないため、まずBrowserAct ConsoleにアクセスしてKeyを取得してください。」

🛠️ 入力パラメータ

スクリプトを呼び出す際、Agentはユーザーのニーズに基づいて、以下のパラメータを柔軟に設定する必要があります。

  1. keywords

    • Type: string
    • Description: YouTubeで動画を検索するために使用される検索キーワード。任意のキーワードまたはフレーズを指定できます。
    • Example: AI, automation, web scraping
    • Default: AI
  2. Comments_limit

    • Type: number
    • Description: 動画ごとに抽出するコメントの最大数。
    • Example: 10, 20, 50
    • Default: 10
  3. Scroll_count

    • Type: number
    • Description: 抽出前に、コメントセクションをスクロールしてより多くのコメントをロードする回数。
    • Example: 1, 2, 5, 10
    • Default: 2

🚀 呼び出し方法 (推奨)

Agentは、以下のスタンドアロンスクリプトを実行して、「ワンコマンドで結果を取得」を実現する必要があります。

# Example invocation
python -u ./scripts/youtube_comments_api.py "keywords" "Comments_limit" "Scroll_count"

⏳ 実行状況の監視

このタスクには自動化されたブラウザ操作が含まれるため、長い時間がかかる場合があります(数分)。実行中、スクリプトはタイムスタンプ付きのステータスログを継続的に出力します(例:[14:30:05] Task Status: running)。 Agentへの指示:

  • スクリプトが結果を返すのを待っている間、ターミナル出力を監視し続けてください。
  • ターミナルが新しいステータスログを出力している限り、タスクは正常に実行されています。デッドロックまたは無応答と誤って判断しないでください。
  • ステータスが長時間変化しない場合、またはスクリプトが結果を返さずに停止した場合にのみ、再試行メカニズムをトリガーすることを検討してください。

📊 データ出力の説明

正常に実行されると、スクリプトはAPIレスポンスから直接結果を解析して出力します。結果には、2つのリンクされたデータセットが含まれます。

動画のフィールド:

  • video_name: リストに表示される動画のタイトル
  • video_url: 動画のURL
  • video_publication_time: 公開時間
  • video_view_count: 視聴回数

コメントのフィールド:

  • commenter_name: コメント投稿者の表示名
  • commenter_url: コメント投稿者のチャンネルURL
  • comment_text: コメントの内容
  • comment_publish_date: コメントの公開日時
  • comment_likes: コメントへのいいね数
  • reply_count: 返信数

⚠️ エラー処理と再試行

スクリプトの実行中に、エラーが発生した場合(ネットワークの変動やタスクの失敗など)、Agentは次のロジックに従う必要があります。

  1. 出力内容の確認:

    • 出力に"Invalid authorization"含まれている場合、API Keyが無効または期限切れであることを意味します。この時点で、再試行しないでください。ユーザーに再確認して正しいAPI Keyを提供するように指示する必要があります。
    • 出力に"Invalid authorization"含まれていないが、タスクが失敗した場合(例:出力がError:で始まるか、空の結果を返す場合)、Agentは自動的にスクリプトをもう一度実行する必要があります
  2. 再試行制限:

    • 自動再試行は1回のみに制限されています。2回目の試行でも失敗した場合は、再試行を停止し、特定のエラーメッセージをユーザーに報告してください。

🌟 代表的なユースケース

  1. オーディエンスインサイト: 特定のキーワードに基づいて、コメントを製品フィードバックやセンチメントシグナルに変換します。
  2. コンテンツリサーチ: 人気のある動画トピックの下で、視聴者が何について議論しているかを理解します。
  3. 競合モニタリング: 競合他社のYouTubeチャンネルのコメントとフィードバックを追跡します。
  4. コミュニティインサイト: 自動化やAIなど、特定のニッチでユーザーが何を気にしているかを分析します。
  5. トピックトラッキング: トレンドの検索用語に対する世間の反応とインタラクションを監視します。
  6. センチメント分析: コメントから生のテキストデータを収集して、視聴者の意見を評価します。
  7. 異議と機能リクエスト: 製品関連の動画コメントから、ユーザーの不満点を特定します。
  8. 自動データ統合: API経由で動画とコメントデータをCRMまたはBIツールに直接送信します。
  9. エンゲージメント指標の収集: 上位のコメントに対するいいね数と返信数を追跡します。
  10. 市場調査: 大量の動画メタデータとユーザーの議論を組み合わせて、市場調査を行います。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

YouTube Comments API Automation Skill

📖 Introduction

This skill provides a one-stop extraction service for YouTube video and comment data through the BrowserAct YouTube Comments API template. It can extract structured video results along with their respective comments directly from YouTube. By simply providing search keywords, comment limits, and scroll counts, you can acquire clean and ready-to-use video and comment datasets directly.

✨ Features

  1. Zero Hallucination, Ensuring Stable and Accurate Data Extraction: Pre-configured workflows avoid AI generative hallucinations.
  2. No CAPTCHA Issues: No need to handle reCAPTCHA or other verification challenges.
  3. No IP Access Restrictions or Geo-fencing: No need to deal with regional IP limits.
  4. More Agile Execution Speed: Faster task execution compared to pure AI-driven browser automation solutions.
  5. Extremely High Cost-Efficiency: Significantly reduces data acquisition costs compared to AI solutions that consume a large number of tokens.

🔑 API Key Guidance Process

Before running, you must first check the BROWSERACT_API_KEY environment variable. If it is not set, do not take any other actions; you should request and wait for the user to provide it. At this point, the Agent must inform the user:

"Since you have not configured the BrowserAct API Key yet, please go to the BrowserAct Console first to get your Key."

🛠️ Input Parameters

When invoking the script, the Agent should flexibly configure the following parameters based on user needs:

  1. keywords

    • Type: string
    • Description: Search keywords used to find videos on YouTube. Can be any keyword or phrase.
    • Example: AI, automation, web scraping
    • Default: AI
  2. Comments_limit

    • Type: number
    • Description: Maximum number of comments to extract per video.
    • Example: 10, 20, 50
    • Default: 10
  3. Scroll_count

    • Type: number
    • Description: Number of times to scroll in the comments section to load more comments before extraction.
    • Example: 1, 2, 5, 10
    • Default: 2

🚀 Invocation Method (Recommended)

The Agent should execute the following standalone script to achieve "one command, get results":

# Example invocation
python -u ./scripts/youtube_comments_api.py "keywords" "Comments_limit" "Scroll_count"

⏳ Running Status Monitoring

Since this task involves automated browser operations, it may take a long time (several minutes). While running, the script will continuously output timestamped status logs (e.g., [14:30:05] Task Status: running). Agent Instructions:

  • While waiting for the script to return a result, please keep monitoring the terminal output.
  • As long as the terminal is still outputting new status logs, it means the task is running normally. Do not misjudge it as a deadlock or unresponsiveness.
  • Only if the status remains unchanged for a long time or the script stops outputting without returning a result, should you consider triggering the retry mechanism.

📊 Data Output Description

Upon successful execution, the script will directly parse and print the results from the API response. The results include two linked datasets:

Video fields:

  • video_name: Video title shown in the list
  • video_url: Video URL
  • video_publication_time: Published time
  • video_view_count: View count

Comment fields:

  • commenter_name: Comment author display name
  • commenter_url: Comment author channel URL
  • comment_text: Comment content
  • comment_publish_date: Comment publish time
  • comment_likes: Like count for the comment
  • reply_count: Number of replies

⚠️ Error Handling & Retry

During the execution of the script, if an error occurs (such as network fluctuations or task failure), the Agent should follow this logic:

  1. Check the Output Content:

    • If the output contains "Invalid authorization", it means the API Key is invalid or expired. At this time, do not retry; you should guide the user to recheck and provide the correct API Key.
    • If the output does not contain "Invalid authorization" but the task fails (e.g., the output starts with Error: or returns an empty result), the Agent should automatically try to execute the script one more time.
  2. Retry Limit:

    • Automatic retries are limited to one time only. If the second attempt still fails, stop retrying and report the specific error message to the user.

🌟 Typical Use Cases

  1. Audience Insight: Turning comments into product feedback and sentiment signals based on specific keywords.
  2. Content Research: Understanding what viewers are discussing under popular video topics.
  3. Competitive Monitoring: Tracking comments and feedback on competitors' YouTube channels.
  4. Community Insight: Analyzing what users care about in a specific niche like automation or AI.
  5. Topic Tracking: Monitoring the public response and interaction for trending search terms.
  6. Sentiment Analysis: Gathering raw text data from comments to evaluate viewer opinions.
  7. Objections and Feature Requests: Identifying user pain points from product-related video comments.
  8. Automated Data Integration: Sending video and comment data directly into CRM or BI tools via API.
  9. Engagement Metrics Collection: Tracking likes and reply counts for top comments.
  10. Market Research: Extracting a large set of video metadata combined with user discussions for market studies.

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。