Reddit Search Comments API - Find Matching Comments

Comments matching a keyword — globally or within a subreddit

Search Reddit comments by keyword. Optionally narrow to a specific subreddit. Results include comment body, score, author, subreddit, and permalink.

POST /search-comments Search
https://api.fetchlayer.dev/reddit/search-comments
OpenAPI JSON

Headers

Authorization string required

Bearer token — your FetchLayer API key.

Parameters

query string required

Search keyword or phrase.

subreddit string | null optional

Limit search to a specific subreddit.

sort string optional

Sort order: relevance, new, comments, top. (default: relevance)

time string | null optional

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

after string optional

Continue where a previous response stopped: pass its nextCursor. Use the same query, subreddit, sort and time.

limit integer optional

Maximum number of results to return. (default: 25)

pages integer optional

How many pages of results to return, at most. Each page is billed as one, so the credits a request costs equal the pages it actually returns (see `pagesScraped` in the response). (default: 1)

Response Fields

search-comments

Comments matching a keyword — globally or within a subreddit

requestedUrl string

The Reddit URL the request was for.

finalUrl string

Final URL after redirects.

listingType string

Always comment-search for a successful response.

listingTitle string | null

Display title of the result listing.

resultCountText string | null

Result count text displayed by Reddit.

items[].id string | null

Comment ID without the t1_ prefix.

items[].fullname string | null

Reddit comment fullname.

items[].subreddit string | null

Subreddit name without the r/ prefix.

items[].subredditPrefixed string | null

Subreddit name with the r/ prefix.

items[].author string | null

Comment author.

items[].parentPostTitle string | null

Parent post title.

items[].parentPostAuthor string | null

Parent post author.

items[].parentPostUrl string | null

Parent post URL.

items[].permalink string | null

Absolute comment permalink.

items[].contextUrl string | null

Comment URL including Reddit context.

items[].fullCommentsUrl string | null

URL of the full comments page.

items[].createdAt string | null

ISO 8601 creation timestamp.

items[].score number | null

Comment score.

items[].scoreText string | null

Score text as displayed by Reddit.

items[].replyCount number | null

Reply count when available.

items[].replyCountText string | null

Reply count text as displayed by Reddit.

items[].bodyText string

Plain-text comment body.

items[].bodyHtml string | null

HTML comment body when available.

items[].authorFlair string | null

The commenter’s flair in that community, as text (emoji as :code:). null means the commenter wears no flair; it means unknown only when the lookup failed, and notes then says so.

items[].authorFlairRichtext object[] | null

The same flair as parts: text parts ({ type, text }) and emoji parts ({ type, code, imageUrl }). null when authorFlair is null.

items[].distinguished string | null

Moderator/admin distinction, or null.

items[].stickied boolean

Whether the comment is stickied.

items[].removed boolean | null

Always null here: comment history and search results do not show whether a comment was removed. Use the post or comment permalink endpoint for removal status.

items[].removedBy string | null

Always null here, for the same reason as removed.

items[].authorId string | null

The author’s account id (t2_…).

items[].subredditId string | null

The subreddit’s id (t5_…).

items[].postFullname string | null

The fullname of the post the comment is on (t3_…).

items[].parentFullname string | null

What the comment replies to: another comment (t1_…), or the post itself (t3_…) for a top-level comment.

itemCount number

Number of comments returned in items.

nextCursorUrl string | null

The next page as an api.fetchlayer.dev address, or null at the end. POST it with your key to get the next page (a body is optional; fields you send override the address). Its `after` parameter is nextCursor.

prevCursorUrl string | null

Previous page address, or null.

nextCursor string | null

Pass as after, with the same query, subreddit, sort and time, to get the next page; null at the end.

pagesRequested number

Number of pages requested.

pagesScraped number

Pages of results returned. This is what the request is billed at: 1 credit per page actually returned, never per page requested.

scrapedAt string

ISO 8601 time the result was produced.

transport string

The data source: always the platform id, "reddit".

Request

curl -X POST "https://api.fetchlayer.dev/reddit/search-comments" \
  -H "Authorization: Bearer ss-your-key" \
  -H "Content-Type: application/json" \
  -d '{"query":"mcp","sort":"top","time":"all","limit":25}'

Response

{
  "listingType": "comment-search",
  "items": [
    {
      "id": "xyz123",
      "bodyText": "MCP has been a game changer for my workflow.",
      "subreddit": "programming",
      "author": "devuser",
      "score": 342,
      "permalink": "https://www.reddit.com/r/programming/comments/.../comment/...",
      "createdAt": "2026-08-13T03:00:00.000Z",
      "stickied": false
    }
  ],
  "itemCount": 1,
  "pagesRequested": 1,
  "pagesScraped": 1,
  "transport": "reddit"
}
Product overview Reddit API: what it returns, pricing and use cases