GET
/v1/reddit/subreddit/searchSubreddit 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 headersRequests without a valid key get a
401 Unauthorized. Revoked keys return 403 Forbidden.Parameters
Name
Type
Description
subredditRequiredstring
Subreddit name to scope the search to.
queryOptionalstring
Search string. Empty string lists all posts ordered by `sort`.
sortOptionalenumdefault: relevance
Result ordering.
relevancehottopnewcommentstimeframeOptionalenumdefault: all
Time window for top/comments sort.
allhourdayweekmonthyearcursorOptionalstring
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.
posts[].field
Type
Description
idstring
Reddit short-id (base36).
post_idstring
Same as id, kept for scrapecreators compatibility.
titlestring
Post title.
urlstring
Outbound or canonical Reddit URL.
permalinkstring
Reddit-relative path to the post.
votesnumber
Net upvote count (ups - downs, but Reddit returns ups already netted).
num_commentsnumber
Comment count at fetch time.
subredditobject
{ name, prefixed, id, subscribers, type } — minimal sub metadata.
thumbnailstring
URL of the thumbnail Reddit chose, or empty string.
created_atnumber
Post creation time, Unix epoch seconds.