API Direct
Endpoints
Reddit Subreddit Posts

Reddit Subreddit Posts

GET /v1/reddit/subreddit/posts

Get a subreddit's posts by name or URL. Sort by hot, new, top, rising or controversial, with a time window (past hour to all time) for top and controversial, and optionally only posts with one flair. Returns title, text, author, date, score, upvote ratio, comment count, flair, shared link, video and gallery links and NSFW flags for each post, 25 per page, up to about 1,000 posts. Works for NSFW subreddits.

Cost
$0.003 per page
Free tier
50 requests/month

Parameters

subreddit
Subreddit name, with or without r/, e.g. Python. Provide exactly one of subreddit or url.
url
Subreddit URL, e.g. https://www.reddit.com/r/Python/ (max 500 characters). Provide exactly one of subreddit or url.
sort_by
Sort order: hot, most_recent, top, rising, or controversial (default: hot)
posted_ago
Time window for sort_by=top or sort_by=controversial: 1h, 24h, 7d, 30d, 12m, or all (default: 24h, Reddit's own default). Rejected with any other sort_by.
flair
Only posts with exactly this flair, e.g. Hiring (max 64 characters, not case-sensitive).
pages
Number of pages to fetch, 1-40 (default: 1). Each page returns up to 25 posts.
get_sentiment
Set to true to add AI emotion analysis (+$0.001/page)

Example Request

curl "https://apidirect.io/v1/reddit/subreddit/posts?subreddit=AskReddit&sort_by=top&posted_ago=7d&pages=2" \
  -H "X-API-Key: YOUR_API_KEY"

Example Response

{
  "posts": [
    {
      "post_id": "1x3uinu",
      "title": "What previously glorified careers are struggling now?",
      "url": "https://www.reddit.com/r/AskReddit/comments/1x3uinu/what_previously_glorified_careers_are_struggling/",
      "date": "2026-10-12 06:28:49",
      "author": "JAMIEISSLEEPWOKEN",
      "author_url": "https://www.reddit.com/user/JAMIEISSLEEPWOKEN",
      "source": "Reddit",
      "domain": "reddit.com",
      "snippet": "What previously glorified careers are struggling now?",
      "subreddit": "AskReddit",
      "upvotes": 10146,
      "upvote_ratio": 0.96,
      "comments": 5366,
      "crossposts": 6,
      "flair": "",
      "link_url": "",
      "thumbnail": "",
      "is_video": false,
      "nsfw": false,
      "spoiler": false,
      "locked": false,
      "stickied": false,
      "video_url": "",
      "video_hls_url": "",
      "images": [],
      "sentiment": {
        "emotions": {
          "joy": 40,
          "trust": 55,
          "fear": 0,
          "surprise": 10,
          "sadness": 0,
          "disgust": 0,
          "anger": 0,
          "anticipation": 30
        },
        "dominant_emotion": "trust",
        "emotional_intensity": 5,
        "polarity": "positive"
      }
    }
  ],
  "subreddit": "AskReddit",
  "sort_by": "top",
  "pages": 2,
  "count": 50
}

Your Usage

Free tier this month
Loading...
Recent Activity