mcpField
R
reddit-post-finder

reddit-post-finder

github.com/gooseworks-aiマーケティング・グロース1.3k50 回インストール3 日前に更新
リポジトリ

reddit-post-finder について

Apify Actor を通じて Reddit の投稿やコメントを取得するコマンドラインスキルです。サブレディット、キーワード、日付で絞り込み、並べ替えた結果を投稿情報と URL 付きで JSON または要約として出力します。

主な機能

  1. 01複数のサブレディットから投稿を取得
  2. 02キーワードと日付範囲で絞り込み
  3. 03並べ替え方法と期間を指定
  4. 04JSON または要約で出力
  5. 05投稿とコメントの詳細を提供

活用シーン

  1. 01ブランドや競合への言及を監視
  2. 02顧客の課題に関する議論を発見
  3. 03指定コミュニティの人気投稿を追跡

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/gooseworks-ai/goose-skills --skill reddit-post-finder

インストール後、Claude Code で/reddit-post-finderを入力して読み込まれたか確認します。

同梱ファイル

SKILL.md と一緒にインストールされる参考資料やスクリプト。

skill.meta.json
references/
apify-config.md
scripts/
search_reddit.py

詳細

Reddit 投稿検索

Apify の trudax/reddit-scraper-lite アクターを使用して、Reddit の投稿とコメントをスクレイピングします。

クイックスタート

APIFY_API_TOKEN 環境変数(または --token フラグ)が必要です。

# Top posts from r/growthhacking in last week
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit growthhacking --days 7 --sort top --time week

# Hot posts from multiple subreddits
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit "growthhacking,gtmengineering" --days 7 --sort hot

# Keyword-filtered competitor tracking
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit LLMDevs \
  --keywords "Langfuse,Arize,Langsmith" \
  --days 30

# Human-readable summary table
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit growthhacking --days 7 --output summary

スクリプトの動作

  1. 各サブレディットの完全な Reddit URL を作成します(例:https://www.reddit.com/r/growthhacking/top/?t=week)
  2. REST API 経由で Apify の trudax/reddit-scraper-lite アクターを呼び出します
  3. 実行が完了するまでポーリングし、その後データセットを取得します
  4. クライアント側でキーワードと日付によるフィルタリングを行います
  5. アップボート数の降順で並べ替え、JSON または概要を出力します

CLI リファレンス

フラグデフォルト説明
--subreddit必須サブレディット名(複数指定する場合はカンマ区切り)
--keywordsなしフィルタリングするキーワード(カンマ区切り、OR 条件)
--days30過去 N 日間の投稿のみを含めます
--max-posts50サブレディットごとにスクレイピングする投稿の最大数
--sorttop並べ替え:hot、top、new、rising
--timeweektop で並べ替える場合の期間:hour、day、week、month、year、all
--outputjson出力形式:json または summary
--token環境変数Apify トークン(APIFY_API_TOKEN 環境変数の使用を推奨)
--timeout300Apify の実行を待つ最大時間(秒)

小規模なサブレディットでのヒント

小規模またはトラフィックの少ないサブレディット(例:r/gtmengineering)では、ホットフィードの投稿がほとんどないため、--sort hot を指定すると投稿が 0 件になる場合があります。代わりに --sort top --time week(または month)を使用してください。指定した期間内の上位投稿をスクレイピングするため、安定して結果を取得できます。

API の直接利用

Apify API を直接呼び出す場合(例:curl 経由)、以下の必須フィールドに注意してください。

{
  "startUrls": [{"url": "https://www.reddit.com/r/growthhacking/top/?t=week"}],
  "maxItems": 50
}

trudax/reddit-scraper-lite の主な注意点:

  • サブレディットの閲覧には searches 配列ではなく、完全な Reddit URL を startUrls に指定します
  • 並べ替えと期間は個別の入力フィールドではなく、URL パス(例:/top/?t=week)で制御します
  • 動作が確認されている入力フィールドは startUrls と maxItems のみです
  • proxyConfiguration、scrollTimeout、searchType はサポートしていません

出力フィールド:

  • dataType — "post" または "comment"
  • title — 投稿のタイトル
  • body — 投稿本文
  • communityName — サブレディット名(r/ 接頭辞なし)
  • upVotes — アップボート数
  • numberOfComments — コメント数
  • url — 投稿の完全な URL
  • createdAt — 投稿の作成日時を示す ISO タイムスタンプ

よくあるワークフロー

1. 競合の追跡
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit "LLMDevs,MachineLearning,LocalLLaMA" \
  --keywords "Langfuse,Arize,Weights & Biases,Langsmith,Braintrust" \
  --days 30 --sort top --time month
2. 課題の発見
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit LLMDevs \
  --keywords "frustrating,difficult,hard to,wish there was,better way" \
  --days 30
3. ブランドのモニタリング
python3 skills/reddit-post-finder/scripts/search_reddit.py \
  --subreddit "LLMDevs,MachineLearning" \
  --keywords "YourProductName" \
  --days 7 --sort new

重要:投稿 URL を必ず含めてください

Reddit の結果をユーザーに提示する際は、すべての投稿について元の投稿 URL を必ず含めてください。ユーザーが議論全体、コメント、背景情報を確認できるようにするために重要です。リンクのない要約表を返してはいけません。

出力形式

投稿はアップボート数順に並べ替えられた JSON 配列として返されます。各投稿には次の項目があります。

{
  "dataType": "post",
  "title": "Post title",
  "body": "Post body...",
  "communityName": "growthhacking",
  "upVotes": 42,
  "numberOfComments": 15,
  "createdAt": "2026-02-18T12:00:00.000Z",
  "url": "https://reddit.com/r/..."
}

設定

API の設定、トークンのセットアップ、レート制限の詳細については、references/apify-config.md を参照してください。

コメント