Comment search
searchComments(q, options?): Listing<Comment>
Finds comments matching a query. Comments come back as in Subreddit comments, each naming its post. 1 credit per page.
A page holds what Reddit's own comment search page shows, about a dozen comments, so there is no limit. Pass after for the next page; here it is an opaque string, not a fullname.
Security
API Key
All requests require a valid API key from the developer dashboard.
Headers: Authorization: Bearer YOUR_API_KEYorX-API-Key: YOUR_API_KEY
See Authentication for headers and rate limits.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
qquery | string | Yes | The search query, 1 to 500 characters. |
subquery | string | No | Only search this subreddit. |
sortquery | string | No |
|
tquery | string | No | Time window: |
afterquery | string | No | The previous page's |
nsfwquery | boolean | No | Include NSFW comments. Default |
Response
{
"subreddit": null,
"query": "golang generics",
"sort": "relevance",
"count": 9,
"items": [
{
"id": "p970s4x",
"name": "t1_p970s4x",
"post_id": "1wdjvd3",
"post_title": "Rune is now open source",
"subreddit": "programming",
"author": "jesseschalken",
"score": 17,
"body": "No null safety, implicit zero values you have to be careful to ignore, no sum types…",
"created_at": "2026-09-11T17:26:53Z",
"permalink": "/r/programming/comments/1wdjvd3/rune_is_now_open_source/p970s4x/",
"parent_id": "t1_p96roh6",
"is_submitter": false,
"controversiality": 1
}
],
"after": "eyJjYW5kaWRhdGVzX3JldHVybmVk…",
"filtered_nsfw": 0
}If Reddit changes its comment search page in a way threadapi can't read, this endpoint returns 503 upstream_changed until we update it. Other endpoints are unaffected.