reddit

reddit

熱門

搜尋並擷取 Reddit 的內容。透過公開 JSON API 取得貼文、留言、看板資訊與使用者個人檔案。當使用者提及 Reddit、某個看板或 r/ 連結時使用。

1173星標
115分支
更新於 2026/7/24
SKILL.md
readonlyread-only
name
reddit
description

搜尋並擷取 Reddit 的內容。透過公開 JSON API 取得貼文、留言、看板資訊與使用者個人檔案。當使用者提及 Reddit、某個看板或 r/ 連結時使用。

Reddit 技能

透過 Reddit 的公開 JSON API 取得貼文、留言、看板資訊與使用者個人檔案。

前置需求

不需要 API 金鑰! Reddit 的公開 JSON API 無需驗證即可使用。

快速測試

cd <技能目錄>
python3 scripts/get_posts.py python --limit 3

指令

所有指令請在技能目錄下執行。

看板貼文

python3 scripts/get_posts.py python --limit 20           # 熱門貼文(預設)
python3 scripts/get_posts.py python --sort new --limit 20
python3 scripts/get_posts.py python --sort top --time week
python3 scripts/get_posts.py python --sort top --time all --limit 10

搜尋貼文

python3 scripts/search_posts.py "AI agent" --limit 20
python3 scripts/search_posts.py "MCP server" --subreddit ClaudeAI --limit 10
python3 scripts/search_posts.py "async python" --sort top --time year

看板資訊

python3 scripts/get_subreddit.py python
python3 scripts/get_subreddit.py ClaudeAI

貼文與留言

python3 scripts/get_post.py abc123                       # 依 ID 取得貼文
python3 scripts/get_post.py abc123 --comments 50         # 包含更多留言

使用者個人檔案

python3 scripts/get_user.py spez
python3 scripts/get_user.py spez --posts 10              # 包含近期貼文

排序選項

排序 說明 時間選項
hot 熱門貼文(預設) -
new 最新貼文 -
top 最高票數 hour, day, week, month, year, all
rising 正在升溫 -
controversial 爭議貼文 hour, day, week, month, year, all

API 資訊

  • 方法:公開 JSON API(無需驗證)
  • 技巧:在任何 Reddit 網址後加上 .json
  • 速率限制:每分鐘 100 次請求
  • 文件https://www.reddit.com/dev/api