M
MesmerTools
GET/v1/reddit/subreddit/search

Subreddit search API

Keyword search restricted to a single subreddit. Returns a slim, normalized post object (id, title, url, votes, num_comments, subreddit, thumbnail) instead of the raw Reddit firehose — useful when you only need a card-style preview.

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 to scope the search to.
queryOptional
string
Search string. Empty string lists all posts ordered by `sort`.
sortOptional
enumdefault: relevance
Result ordering.
relevancehottopnewcomments
timeframeOptional
enumdefault: all
Time window for top/comments sort.
allhourdayweekmonthyear
cursorOptional
string
Pagination cursor — pass the previous response's "cursor" value.

Example request

curl "https://mesmer.tools/api/v1/reddit/subreddit/search?subreddit=Python&query=fastapi" \
  -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": "1n8ko5q",
      "post_id": "1n8ko5q",
      "position": 1,
      "relative_position": 0,
      "title": "Wrote a FastAPI/SQLAlchemy boilerplate — looking for feedback",
      "url": "https://www.reddit.com/r/Python/comments/1n8ko5q/wrote_a_fastapi/",
      "permalink": "/r/Python/comments/1n8ko5q/wrote_a_fastapi/",
      "subreddit": {
        "name": "Python",
        "prefixed": "r/Python",
        "id": "t5_2qh0y",
        "subscribers": 1322000,
        "type": "public"
      },
      "votes": 142,
      "num_comments": 24,
      "thumbnail": "https://b.thumbs.redditmedia.com/...jpg",
      "thumbnail_blurred": null,
      "nsfw": false,
      "spoiler": false,
      "is_crosspost": false,
      "created_at": 1768330810,
      "created_at_iso": "2026-01-13T19:00:10.000Z"
    },
    "...24 more posts"
  ],
  "cursor": "t3_1n7zghw"
}

Field reference

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

id
string
Reddit short-id (base36).
post_id
string
Same as id, kept for scrapecreators compatibility.
title
string
Post title.
url
string
Outbound or canonical Reddit URL.
permalink
string
Reddit-relative path to the post.
votes
number
Net upvote count (ups - downs, but Reddit returns ups already netted).
num_comments
number
Comment count at fetch time.
subreddit
object
{ name, prefixed, id, subscribers, type } — minimal sub metadata.
thumbnail
string
URL of the thumbnail Reddit chose, or empty string.
created_at
number
Post creation time, Unix epoch seconds.