Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReddit Skill
Reddit Skill
Get posts, comments, subreddit info, and user profiles from Reddit via the public JSON API.
通过公开JSON API从Reddit获取帖子、评论、子版块信息和用户资料。
Prerequisites
前提条件
No API key required! Reddit's public JSON API works without authentication.
Quick Check:
bash
cd <skill_directory>
python3 scripts/get_posts.py python --limit 3无需API密钥! Reddit的公开JSON API无需认证即可使用。
快速验证:
bash
cd <skill_directory>
python3 scripts/get_posts.py python --limit 3Commands
命令
All commands run from the skill directory.
所有命令均在skill目录下运行。
Subreddit Posts
子版块帖子
bash
python3 scripts/get_posts.py python --limit 20 # Hot posts (default)
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 10bash
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 10Search Posts
搜索帖子
bash
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 yearbash
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 yearSubreddit Info
子版块信息
bash
python3 scripts/get_subreddit.py python
python3 scripts/get_subreddit.py ClaudeAIbash
python3 scripts/get_subreddit.py python
python3 scripts/get_subreddit.py ClaudeAIPost & Comments
帖子与评论
bash
python3 scripts/get_post.py abc123 # Get post by ID
python3 scripts/get_post.py abc123 --comments 50 # With more commentsbash
python3 scripts/get_post.py abc123 # 通过ID获取帖子
python3 scripts/get_post.py abc123 --comments 50 # 获取更多评论User Profile
用户资料
bash
python3 scripts/get_user.py spez
python3 scripts/get_user.py spez --posts 10 # Include recent postsbash
python3 scripts/get_user.py spez
python3 scripts/get_user.py spez --posts 10 # 包含近期帖子Sort Options
排序选项
| Sort | Description | Time Options |
|---|---|---|
| Trending posts (default) | - |
| Latest posts | - |
| Highest voted | hour, day, week, month, year, all |
| Gaining traction | - |
| Mixed votes | hour, day, week, month, year, all |
| 排序方式 | 描述 | 时间选项 |
|---|---|---|
| 热门帖子(默认) | - |
| 最新帖子 | - |
| 最高投票 | 小时, 天, 周, 月, 年, 全部 |
| 热度上升 | - |
| 争议性 | 小时, 天, 周, 月, 年, 全部 |
API Info
API信息
- Method: Public JSON API (no auth needed)
- Trick: Append to any Reddit URL
.json - Rate Limit: 100 requests/minute
- Docs: https://www.reddit.com/dev/api
- 方式:公开JSON API(无需认证)
- 小技巧:在任意Reddit URL后添加
.json - 请求限制:100次请求/分钟
- 文档:https://www.reddit.com/dev/api