threadapiDocs
Reddit

Comment search

searchComments(q, options?): Listing<Comment>

GET
https://api.threadapi.dev/v1/reddit/search/comments
1 Credit

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.

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

ParameterTypeRequiredDescription
qquery
stringYes

The search query, 1 to 500 characters.

subquery
stringNo

Only search this subreddit.

sortquery
stringNo

relevance (default), new or top.

tquery
stringNo

Time window: hour, day, week, month, year or all.

afterquery
stringNo

The previous page's after, for the next page.

nsfwquery
booleanNo

Include NSFW comments. Default false.

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.