M
MesmerTools
GET/v1/reddit/subreddit

Subreddit posts API

Returns Reddit's raw post listing for the given subreddit (every t3_* field, verbatim) sorted and filtered per the standard Reddit knobs. Use this when you need the complete post object — including media metadata, awards, and flair structures.

Authentication

Include x-api-key: <your_key> in your request headers
Requests without a valid key get a 401 Unauthorized. Revoked keys return 403 Forbidden.
Get a key

Parameters

subredditRequired
string
Subreddit name without the r/ prefix (e.g. "Python").
sortOptional
enumdefault: hot
Listing order.
besthotnewtoprising
timeframeOptional
enumdefault: all
Time window. Only meaningful when sort=top.
allhourdayweekmonthyear
afterOptional
string
Pagination cursor — pass the previous response's "after" value (a t3_* id).
trimOptional
boolean
Set to "true" to omit selftext_html from each post (saves ~30% of payload).

Example request

curl "https://mesmer.tools/api/v1/reddit/subreddit?subreddit=Python&sort=hot" \
  -H "x-api-key: <YOUR_API_KEY>"

Try it now

Hits the live endpoint with your API key.

Saved locally in your browser. Mint a key in /admin/api-keys.

Response schema

Trimmed example — see Field reference for descriptions.

{
  "success": true,
  "credits_remaining": -1,
  "posts": [
    {
      "id": "1t8r5sf",
      "title": "Sunday Daily Thread: What's everyone working on this week?",
      "subreddit": "Python",
      "author": "AutoModerator",
      "url": "https://www.reddit.com/r/Python/comments/1t8r5sf/sunday_daily_thread_whats_everyone_working_on/",
      "permalink": "/r/Python/comments/1t8r5sf/sunday_daily_thread_whats_everyone_working_on/",
      "selftext": "# Weekly Thread: What's Everyone Working On This Week? ...",
      "ups": 6,
      "num_comments": 8,
      "created_utc": 1778371212,
      "link_flair_text": ":pythonLogo: Daily Thread",
      "is_self": true,
      "over_18": false,
      "spoiler": false,
      "stickied": true,
      "locked": false,
      "upvote_ratio": 0.95
    },
    "...24 more posts"
  ],
  "after": "t3_1t7zghw"
}

Field reference

Each posts[] entry — the fields you'll most likely use.

id
string
Base-36 Reddit post id (e.g. "1t8r5sf"). Pair with subreddit to rebuild a URL.
title
string
Post title as posted by the OP.
subreddit
string
Subreddit name without the r/ prefix.
author
string
Username of the OP, or [deleted] if removed.
url
string
Outbound link (for link posts) or full Reddit URL (for self posts).
permalink
string
Relative path on reddit.com (prepend https://www.reddit.com).
selftext
string
Body text in Markdown. Empty string for link posts.
ups
number
Upvote count (already net of downs on modern Reddit).
num_comments
number
Comment count at fetch time.
created_utc
number
Post creation time as a Unix epoch seconds float.