SuperAPI AI 工具集

reddit-scraper

营销与增长

查看项目

更新于 10-16 05:49

技能介绍

用途:抓取并搜索 Reddit 帖子,用于查找讨论、追踪竞品提及、监控产品反馈和发掘痛点。底层调用 Apify 的 parseforge/reddit-posts-scraper actor。\n\n主要能力:按子版块抓取帖子;支持多子版块(逗号分隔);关键词过滤(逗号分隔,OR 逻辑);按最近天数过滤;按 hot/top/new/rising 排序;top 排序可选时间窗口;输出 JSON 或可读摘要表;结果按分数降序排列。\n\n使用方式:需设置 APIFY_API_TOKEN 环境变量(或 --token),安装依赖 pip install requests。示例:python3 skills/reddit-scraper/scripts/search_reddit.py --subreddit growthhacking --days 7 --sort top --time week。常用 CLI 参数包括 --subreddit(必填)、--keywords、--days(默认30)、--max-posts(默认50)、--sort(默认top)、--time(默认week)、--output(json/summary)、--timeout(默认300)。脚本流程:构建完整 Reddit URL,经 REST API 调用 Apify actor,轮询完成后取回数据集,在客户端做关键词与日期过滤并排序。\n\n适用场景:竞品追踪、痛点发现、品牌监控等,向用户呈现结果时须附带原帖 URL。\n\n限制:小流量子版块用 hot 可能返回零结果,建议改用 top + week/month;直接调用 API 时需提供 startUrls、maxPostCount、scrollTimeout、searchType 和 proxyConfiguration(proxyConfiguration 必填,排序与时间由 URL 路径控制)。详细配置见 references/apify-config.md。其余信息暂未提供。