All endpoints
Reddit Subreddit Posts

Reddit Subreddit Posts API

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.

Price: $0.003 per page
Free tier: 50 requests/month
Endpoint
GET /v1/reddit/subreddit/posts

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)

Response fields

posts
The subreddit's posts
post_id
Post ID (the base-36 ID in the post URL)
title
Post title
url
Direct link to the post
date
Publication date and time (UTC)
author
Author's Reddit username ([deleted] for a deleted account)
author_url
Link to the author's profile (empty for a deleted account)
source
"Reddit"
domain
"reddit.com"
snippet
Post text (the title for link, image and video posts)
subreddit
Subreddit name
upvotes
Net upvotes (upvotes minus downvotes)
upvote_ratio
Fraction of votes that are upvotes, between 0 and 1
comments
Number of comments
crossposts
Number of times the post has been crossposted
flair
Post flair text, or empty string
link_url
The URL a link, image or video post shares (empty for text posts)
thumbnail
Thumbnail image URL, or empty string
is_video
Whether the post is a Reddit-hosted video
nsfw
Whether the post is marked NSFW
spoiler
Whether the post is marked as a spoiler
locked
Whether the post is locked to new comments
stickied
Whether the post is pinned in its subreddit
video_url
MP4 file of a Reddit-hosted video, or empty string. It can be silent (Reddit stores most video sound separately), so use video_hls_url for video with sound. Reddit can expire video links, so use them soon after fetching
video_hls_url
HLS stream (with sound) of a Reddit-hosted video, or empty string. Reddit can expire this link too
images
Image URLs: every image of a gallery post, in order, or the image of an image post (empty otherwise)
sentiment
Emotion analysis: emotions, dominant_emotion, emotional_intensity, polarity (when get_sentiment=true)
subreddit
The subreddit name
sort_by
The sort order used
pages
Number of pages returned
count
Number of posts returned

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
}

Frequently asked questions

How deep can I go?

Reddit lists up to about 1,000 posts per sort, so 40 pages of 25 is the deepest. Very long text posts can end a request earlier (responses are capped at about 3.5MB); you're billed only for the pages returned.

How do I get the top posts of the week?

Use sort_by=top&posted_ago=7d, or posted_ago=all for all time. Without posted_ago, top and controversial cover the past 24 hours, Reddit's own default.

How do I get only posts with one flair?

Add flair, e.g. flair=Hiring on r/forhire. The match is exact (Hiring doesn't match Hiring - Open) but not case-sensitive. Flair-filtered requests are slower: a few seconds per page, up to about 20 seconds for a rarely used flair.

Does it work for NSFW subreddits?

Yes. Private and banned subreddits return 404 not_found.

How does pricing work?

You only pay for successful requests. The Reddit Subreddit Posts API costs $0.003 per page. There are no monthly fees or commitments. You get 50 free requests per endpoint every month.

Do I need a credit card to start?

No. You can sign up and use the free tier (50 requests/endpoint/month) without adding a payment method. You only need to add a card when you want to exceed the free tier.

Are there rate limits?

Yes, there's a concurrency limit of 10 simultaneous requests per endpoint per user. If you need more, just get in touch.

Start using the Reddit Subreddit Posts API

Get your API key and start making requests in minutes. 50 requests/month free every month.

Get API Key