Install
openclaw skills install reddit-researcherSearch and analyze Reddit posts and comments to summarize user opinions, troubleshoot issues, and track trends across communities and topics.
openclaw skills install reddit-researcherResearch and analyze Reddit discussions by searching posts, reading comments, and summarizing community sentiment on any topic. Useful for gathering user opinions, troubleshooting insights, market research, and trend analysis.
To access the Reddit API with higher rate limits, you need to create a Reddit app:
Go to Reddit Apps Page
Create a New App
Fill in App Details
http://localhost:8080 (required but not used for script apps)Get Your Credentials After creating the app, you'll see:
abc123def456ghi)jkl789mno012pqr)Configure Environment
export REDDIT_CLIENT_ID="your_client_id_here"
export REDDIT_CLIENT_SECRET="your_client_secret_here"
export REDDIT_USER_AGENT="ResearchBot/1.0 by u/yourusername"
For higher rate limits and authenticated access:
REDDIT_CLIENT_ID - From Reddit app registrationREDDIT_CLIENT_SECRET - From Reddit app registrationREDDIT_USER_AGENT - Custom user agent string (e.g., "MyResearchBot/1.0 by u/username")Least-Privilege Credentials:
Rate Limiting:
Anonymous Access (Limited):
https://www.reddit.com.json to any Reddit URL to get JSON dataOAuth Access (Recommended):
# Get access token
curl -X POST https://www.reddit.com/api/v1/access_token \
-H "User-Agent: $REDDIT_USER_AGENT" \
--basic -u "$REDDIT_CLIENT_ID:$REDDIT_CLIENT_SECRET" \
-d "grant_type=client_credentials"
Use the access token:
Authorization: Bearer $ACCESS_TOKEN
User-Agent: $REDDIT_USER_AGENT
Search for posts across Reddit or within specific subreddits.
curl "https://www.reddit.com/search.json?q=OpenCore+problems&sort=new&time=week&limit=25" \
-H "User-Agent: RedditResearchBot/1.0"
curl "https://www.reddit.com/r/hackintosh/search.json?q=OpenCore&restrict_sr=1&sort=new&time=week" \
-H "User-Agent: RedditResearchBot/1.0"
Query Parameters:
q - Search query (required)sort - Sort by: relevance, new, hot, top, commentstime - Time filter: hour, day, week, month, year, alllimit - Number of results (1-100, default 25)after - Pagination token for next pagerestrict_sr=1 - Restrict to subreddit (when searching within subreddit)curl "https://www.reddit.com/r/hackintosh/hot.json?limit=25" \
-H "User-Agent: RedditResearchBot/1.0"
curl "https://www.reddit.com/r/hackintosh/new.json?limit=25" \
-H "User-Agent: RedditResearchBot/1.0"
curl "https://www.reddit.com/r/hackintosh/top.json?t=week&limit=25" \
-H "User-Agent: RedditResearchBot/1.0"
Time periods: hour, day, week, month, year, all
curl "https://www.reddit.com/r/hackintosh/comments/ABC123/post_title.json" \
-H "User-Agent: RedditResearchBot/1.0"
Response Structure:
[0] - Post data (listing with one post)[1] - Comments data (listing with comment tree)curl "https://www.reddit.com/user/username/submitted.json" \
-H "User-Agent: RedditResearchBot/1.0"
{
"data": {
"children": [{
"data": {
"id": "post_id",
"title": "Post Title",
"selftext": "Post body text",
"author": "username",
"subreddit": "subreddit_name",
"score": 123,
"num_comments": 45,
"created_utc": 1704067200,
"permalink": "/r/subreddit/comments/id/title/",
"url": "https://external-link.com" // or "self" post
}
}]
}
}
{
"data": {
"body": "Comment text",
"author": "username",
"score": 10,
"created_utc": 1704067200,
"replies": {
"data": {
"children": [...] // Nested replies
}
}
}
}
Identify:
# Example: Find recent OpenCore problems
curl "https://www.reddit.com/r/hackintosh/search.json?q=OpenCore+issue+OR+problem+OR+error&sort=new&time=week&limit=50" \
-H "User-Agent: RedditResearchBot/1.0" | jq '.data.children[].data | {title, score, num_comments, permalink, created_utc}'
# Get full post with comments
curl "https://www.reddit.com/r/hackintosh/comments/POST_ID.json" \
-H "User-Agent: RedditResearchBot/1.0"
Extract:
# Find problems with a product in the last month
curl "https://www.reddit.com/search.json?q=ProductName+issue+OR+bug+OR+problem&sort=new&time=month&limit=50" \
-H "User-Agent: RedditResearchBot/1.0"
# Find feature requests in a specific subreddit
curl "https://www.reddit.com/r/apple/search.json?q=feature+request+OR+wish+OR+please+add&sort=top&time=month&restrict_sr=1" \
-H "User-Agent: RedditResearchBot/1.0"
# Find solutions to common problems
curl "https://www.reddit.com/r/techsupport/search.json?q=WiFi+disconnecting+fixed+OR+solved&sort=relevance&time=week" \
-H "User-Agent: RedditResearchBot/1.0"
# Compare two products
curl "https://www.reddit.com/search.json?q=ProductA+vs+ProductB&sort=top&time=month&limit=25" \
-H "User-Agent: RedditResearchBot/1.0"
Reddit supports search operators:
title:keyword - Search in titles onlyselftext:keyword - Search in post body onlyauthor:username - Posts by specific usersubreddit:name - Posts in specific subredditsite:example.com - Posts linking to specific domainurl:text - Posts with URL containing textnsfw:no - Exclude NSFW contentExample:
curl "https://www.reddit.com/search.json?q=title:OpenCore+selftext:problem&sort=new&time=week" \
-H "User-Agent: RedditResearchBot/1.0"
Best Practices:
curl -s "https://www.reddit.com/r/hackintosh/new.json?limit=10" \
-H "User-Agent: RedditResearchBot/1.0" | \
jq '.data.children[].data | {title, score, num_comments, url: "https://reddit.com" + .permalink}'
curl -s "https://www.reddit.com/r/hackintosh/comments/POST_ID.json" \
-H "User-Agent: RedditResearchBot/1.0" | \
jq '.[1].data.children[].data | {author, body, score, replies: (.replies.data.children | length)}'
curl -s "https://www.reddit.com/r/hackintosh/hot.json?limit=100" \
-H "User-Agent: RedditResearchBot/1.0" | \
jq '.data.children[].data | select(.score > 50) | {title, score, num_comments}'
When summarizing research, structure findings as:
## Research Summary: [Topic]
### Overview
Brief description of what was researched and scope.
### Key Findings
1. **Finding 1**: Description with supporting evidence
2. **Finding 2**: Description with supporting evidence
3. **Finding 3**: Description with supporting evidence
### Common Issues/Sentiments
- **Issue 1**: Frequency and context
- **Issue 2**: Frequency and context
### Notable Discussions
1. **[Post Title](link)** - r/subreddit, X comments
- Key insight or quote
2. **[Post Title](link)** - r/subreddit, X comments
- Key insight or quote
### Recommendations/Conclusions
Based on the research, actionable insights or conclusions.
### Data Points
- Posts analyzed: X
- Comments analyzed: X
- Time period: [dates]
- Primary subreddits: r/x, r/y