Search Reddit by Comment Text
Search Reddit by comment text. Reddit matches your keyword against comments and returns the parent posts, surfacing threads plain title search misses.
/api/reddit/search/comments$0.002 / callSearch Reddit by comment text. This surfaces threads where your keyword appears in the replies, which a plain post-title search would miss.
How it works (read this first)
Reddit's comment search is a search mode, not a result type. It matches your query against comment bodies but returns the parent posts (the threads), not the individual comment objects. Reddit does not tell us which comment matched or expose its text.
So each result is a post whose discussion mentions your query, carrying the post's title, selftext, score, and comment count. A result may not contain the query in the post itself when the match is inside one of its comments, which is the point of this endpoint.
To get the matching comments themselves (body, score, author) in one call, use GET /api/reddit/search/comments/deep, which does the thread-fetch and comment-filtering for you. Or to read one specific thread, take a result's url and fetch it with GET /api/reddit/comments.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Search query. Supports Reddit search syntax. |
sort | string | No | relevance (default), hot, top, new, comments |
t | string | No | Time window: hour, day, week, month, year, all. Applies to relevance and top; defaults to all when omitted, so a broad relevance query can surface old high-upvote threads. |
nsfw | boolean | No | true to include NSFW results |
limit | number | No | Number of results to return, 1-100 (default 25) |
after | string | No | Pagination cursor. Pass back the after value from the previous response exactly as issued; it is opaque and carries your paging depth. See Pagination depth. |
Example
curl -H "Authorization: Bearer $TOKEN" \
"https://api.redditapis.com/api/reddit/search/comments?q=best%20mechanical%20keyboard&sort=top&t=year"const response = await fetch(
"https://api.redditapis.com/api/reddit/search/comments?q=best%20mechanical%20keyboard&sort=top",
{ headers: { Authorization: "Bearer TOKEN" } }
);import requests
response = requests.get(
"https://api.redditapis.com/api/reddit/search/comments",
params={"q": "best mechanical keyboard", "sort": "top"},
headers={"Authorization": "Bearer TOKEN"},
)Response Shape
{
"comments": [
{
"id": "1qtho3t",
"title": "New to mechanical keyboards - what's the best one to get?",
"author": "Small-Ad-2708",
"subreddit": "MechKeyboards",
"upvotes": 6,
"num_comments": 74,
"selftext": "Hey all, I'm pretty new to mechanical keyboards...",
"url": "https://reddit.com/r/MechKeyboards/comments/1qtho3t/new_to_mechanical_keyboards/",
"link_url": "https://www.reddit.com/r/MechKeyboards/comments/1qtho3t/new_to_mechanical_keyboards/",
"created": "2026-02-02T01:47:30.000Z"
}
],
"after": "t3_1qtho3t"
}The comments key is kept for backwards compatibility with existing integrations. Its value has always been posts; the field names above reflect that.
Response Fields
| Field | Type | Notes |
|---|---|---|
id | string | Post id (without the t3_ prefix) |
title | string | Post title |
author | string | Post author (no u/ prefix) |
subreddit | string | Subreddit name (no r/ prefix) |
upvotes | number | Post score |
num_comments | number | Number of comments on the post |
selftext | string | null | Post body text, or null for link posts |
url | string | Full reddit.com URL of the thread |
link_url | string | null | The post's outbound link, or the thread URL for self posts |
created | string | ISO-8601 timestamp of the post |
after | string | null | Cursor for the next page, or null when there is no next page to request. An empty cursor does not always mean you have every item, so read listing_status (below) to find out which. See Pagination depth. |
When after comes back empty
An empty cursor means there is no next page to ask for. It does not always mean
you have every post: Reddit often stops serving a busy listing long before it
runs out. Paging r/all on 2026-08-14 stopped after 400 posts covering about a
minute of a feed that plainly holds more.
The response tells you which happened. When after is null it also carries
listing_status, which reads complete, truncated or unknown. Only
complete means you have everything; treat the other two as a partial answer
and widen your search rather than stopping. The full field list and what to do
about each answer is in Pagination depth.
Independent third-party API for developers and researchers. Not affiliated with, endorsed by, or sponsored by Reddit, Inc.
User Gilded
Fetch the posts and comments a Reddit account has received an award on. Private data, requires that account's own session cookies from POST /api/reddit/login.
Deep Comment Search
Genuine Reddit comment search. Returns the actual comments whose body matches your query, with body, score, author and permalink, not the parent posts.
