GET/v1/reddit/subreddit/search

Subreddit search API

Keyword search restricted to a single subreddit, 7 results per page. 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 (opaque).

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": "t3_1n8ko5q",
      "post_id": "t3_1n8ko5q",
      "position": 0,
      "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": {
        "id": "t5_2qh0y",
        "name": "Python",
        "nsfw": false,
        "quarantined": false,
        "icon": null,
        "banner": null,
        "description": null,
        "weekly_visitors": null,
        "weekly_contributions": null
      },
      "votes": 142,
      "num_comments": 24,
      "thumbnail": null,
      "thumbnail_blurred": false,
      "nsfw": false,
      "spoiler": false,
      "is_crosspost": false,
      "created_at": "2026-01-13T19:00:10.000+0000",
      "created_at_iso": "2026-01-13T19:00:10.000Z"
    },
    "...6 more posts"
  ],
  "cursor": "eyJjYW5kaWRhdGVzX3JldHVybmVkIjoi..."
}

Field reference

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

id
string
Post fullname (t3_*).
post_id
string
Same as id, kept for scrapecreators compatibility.
title
string
Post title.
url
string
Canonical Reddit URL of the post.
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
{ id, name, nsfw, quarantined, icon, … } — minimal sub metadata.
thumbnail
string
URL of the thumbnail Reddit chose, or null.
created_at
string
Post creation time, "YYYY-MM-DDTHH:MM:SS.000+0000".