Zernio
Zernio
API Reference

Reddit Search

Search postsGETGet subreddit feedGETGet the comments of a Reddit postGET
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Reddit Search

Get the comments of a Reddit post

Reads the comments of any Reddit post the connected account can see, for example one found through /v1/reddit/feed or /v1/reddit/search, straight from Reddit on every call. The tree comes flattened in thread order (a reply follows its parent); rebuild it from parentId, which is t3_… for a reply to the post and t1_… for a reply to a comment. Deleted and removed comments are passed through as Reddit sends them ([deleted] / [removed]). Where Reddit truncates a thread, the ids it left out are listed in more; commentId fetches one such comment with its replies. A post Reddit no longer serves answers 404 and a private subreddit 403, both with platform_api_error. For comments on posts published through Zernio, /v1/inbox/comments/{postId} adds caching, moderation and replies.


GET
/v1/reddit/comments/{postId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

postId*string

Reddit post id, with or without the t3_ prefix (as id or fullname on RedditPost).

Query Parameters

accountId*string

An active Reddit account the request is made as.

sort?string
Default"new"

Value in

  • "new"
  • "top"
  • "best"
  • "controversial"
  • "old"
  • "qa"
limit?integer

Maximum number of top-level comments.

Rangevalue <= 100
Default25
commentId?string

Return only this comment and its replies, with or without the t1_ prefix; pass an id from more to expand it.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.reddit.getRedditPostComments({  path: {    postId: 'post_abc123',  },  query: {    accountId: 'account_abc123',  },});console.log(data);
{  "post": {    "id": "1abc23",    "fullname": "t3_1abc23",    "title": "We moved our scheduling to an API",    "author": "founder_jo",    "subreddit": "saas",    "url": "https://www.reddit.com/r/saas/comments/1abc23/we_moved_our_scheduling_to_an_api/",    "permalink": "https://www.reddit.com/r/saas/comments/1abc23/we_moved_our_scheduling_to_an_api/",    "selftext": "Long story short...",    "score": 88,    "numComments": 41,    "createdUtc": 1791190000,    "over18": false,    "stickied": false,    "flairText": null,    "isGallery": false  },  "items": [    {      "id": "k9x2f1",      "fullname": "t1_k9x2f1",      "parentId": "t3_1abc23",      "author": "someone",      "body": "We moved to Zernio last month...",      "permalink": "https://www.reddit.com/r/saas/comments/1abc23/we_moved_our_scheduling_to_an_api/k9x2f1/",      "createdUtc": 1791200000,      "score": 12,      "numReplies": 1,      "depth": 0,      "isSubmitter": false,      "edited": false,      "stickied": false,      "distinguished": null    },    {      "id": "k9x3aa",      "fullname": "t1_k9x3aa",      "parentId": "t1_k9x2f1",      "author": "founder_jo",      "body": "Same here.",      "permalink": "https://www.reddit.com/r/saas/comments/1abc23/we_moved_our_scheduling_to_an_api/k9x3aa/",      "createdUtc": 1791200600,      "score": 3,      "numReplies": 0,      "depth": 1,      "isSubmitter": true,      "edited": false,      "stickied": false,      "distinguished": null    }  ],  "more": [    "k9x9zz",    "k9xa01"  ]}
Was this page helpful?

Get subreddit feed

Fetch posts from a subreddit feed. Supports sorting, time filtering, and cursor-based pagination.

Search recent tweets

Search public tweets from the last 7 days matching an X search query, e.g. to discover tweets to reply to. The query string is passed through to X unchanged and supports X's search operators (`from:user`, `-is:retweet`, `is:reply`, `lang:en`, `"exact phrase"`, `conversation_id:123`, boolean `OR`, ...). Standalone operators like `is:` / `has:` / `lang:` must be combined with a keyword or `from:` clause. To reply to a found tweet, pass its `id` as the twitter platform entry's `platformSpecificData.replyToTweetId` when creating a post. Rate limit: 300 requests per 15-min window per connected account.