NanoSkill
submit your skill

Reddit Content Retrieval Agent Skill

byReScienceLab911GitHub starsGitHub

Retrieve posts, comments, subreddit information, and user profiles from Reddit using its public JSON API. Access real-time discussions and community insights without needing an API key.

redditSecurity scan passed

Install command

$ npx skills add https://github.com/ReScienceLab/opc-skills/tree/main/skills/reddit

About

The Reddit Content Retrieval Skill provides a powerful and straightforward way to access the vast amount of information available on Reddit. By leveraging Reddit's public JSON API, this skill enables users to programmatically fetch posts, comments, subreddit details, and user profiles without the need for any API keys or complex authentication processes. It's an essential tool for anyone looking to analyze community discussions, track trends, or gather data from one of the internet's largest social platforms.

This skill offers a comprehensive suite of commands to interact with Reddit data. Users can retrieve posts from specific subreddits, sort them by various criteria like 'hot', 'new', or 'top', and apply time filters to narrow down results. Beyond general browsing, it supports keyword-based searches for posts, allowing for targeted research on specific topics. You can also delve into individual posts to extract comments or pull detailed information about subreddits and user profiles.

Ideal for researchers, data analysts, or developers, the Reddit Content Retrieval Skill simplifies the process of collecting Reddit content for sentiment analysis, trend monitoring, content aggregation, or building custom applications. Its ease of use, combined with the depth of data it can access, makes it a valuable asset for understanding public discourse and community dynamics on Reddit.

Key features

What makes it powerful

  • No API Key Required

    Access Reddit's public JSON API directly without the need for authentication or an API key, simplifying setup and immediate use.

  • Comprehensive Content Retrieval

    Effortlessly fetch various types of Reddit content, including individual posts, associated comments, detailed subreddit information, and user profiles.

  • Flexible Search and Sorting

    Utilize diverse sorting options like 'hot', 'new', 'top', 'rising', and 'controversial' for posts, along with time filters (hour, day, week, month, year, all) to refine your Reddit content searches.

  • Direct Subreddit and User Data Access

    Quickly retrieve information for specific subreddits or user profiles, including recent posts for users, to gain insights into community and individual activity.

Use cases

When to reach for it

  • Monitor Subreddit Discussions

    Track trending topics, new posts, or top discussions within specific subreddits to stay informed about community sentiment and popular content.

  • Analyze User Activity

    Retrieve user profiles and their recent posts to understand contributions, interests, or engagement patterns of specific Reddit users.

  • Research Specific Topics

    Search for posts across Reddit or within particular subreddits using keywords to gather information and insights on any given topic.

SKILL.md

Reddit Skill

Get posts, comments, subreddit info, and user profiles from Reddit via the public JSON API.

Prerequisites

No API key required! Reddit's public JSON API works without authentication.

Quick Check:

cd <skill_directory>
python3 scripts/get_posts.py python --limit 3

Commands

All commands run from the skill directory.

Subreddit Posts

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 10

Search Posts

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

Subreddit Info

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

Post & Comments

python3 scripts/get_post.py abc123                       # Get post by ID
python3 scripts/get_post.py abc123 --comments 50         # With more comments

User Profile

python3 scripts/get_user.py spez
python3 scripts/get_user.py spez --posts 10              # Include recent posts

Sort Options

SortDescriptionTime Options
hotTrending posts (default)-
newLatest posts-
topHighest votedhour, day, week, month, year, all
risingGaining traction-
controversialMixed voteshour, day, week, month, year, all

API Info

  • Method: Public JSON API (no auth needed)
  • Trick: Append .json to any Reddit URL
  • Rate Limit: 100 requests/minute
  • Docs: https://www.reddit.com/dev/api

FAQ