OverviewProductsPlatformsAPI ReferenceResources
Comments

List commented posts

GEThttps://zernio.com/api/v1/inbox/comments

Returns posts with comment counts from all connected accounts. Aggregates data across multiple accounts.

Authentication

AuthorizationBearer tokenRequired

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

Query parameters

Optional
profileIdstring

Filter by profile ID

platformstringOne of facebook | instagram | twitter | bluesky | threads | youtube | linkedin | reddit | tiktok | metaads

Filter by platform. metaads is a synthetic value meaning the user's ads (boosted/dark posts) only; facebook/instagram return organic posts only. tiktok covers accounts connected through the TikTok Business app only; developer-app TikTok accounts are returned under meta.accountsSkipped.

minCommentsinteger

Minimum comment count, applied to each page after pagination

sincestring (date-time)

Posts created after this date

sortBystringDefault dateOne of date | comments

Sort field

sortOrderstringDefault descOne of asc | desc

Sort order

limitintegerDefault 50
viewstringDefault fullOne of full | summary

full returns every post as before. summary leaves out picture and cuts content to 280 characters, marking a cut caption with contentTruncated: true.

cursorstring
accountIdstring

Filter by specific account ID.

With platform=metaads it takes the Meta Ads account ID, or the Facebook or Instagram account ID the Meta Ads connection belongs to, which returns that connection's ad rows.

A Facebook or Instagram account with no Meta Ads connection returns no rows. An account on any other platform returns 400.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Caching

Responses are cached for up to 10 minutes, so the feed may lag new comments by that window.

Do not poll this endpoint for real-time updates. Subscribe to the comment.received webhook, which fires for every new comment across your posts and carries the post reference needed to keep this list current.

Meta ads

For users with the Ads add-on (accounts on usage-based billing always qualify), the user's Meta ads (boosted/dark posts) are included too.

There's one row per (ad, placement-with-comments). An ad that runs on both Facebook feed and Instagram feed produces up to two rows, since the Page dark post and the IG media have separate comment threads.

Each ad row is flagged isAd: true with adId and placement (id is {adId}:{placement}). Filter with platform:

  • ?platform=metaads: only ad rows.
  • facebook/instagram: organic posts only (no ads).
  • Omitted: both.

Fetch a row's thread from GET /v1/ads/{adId}/comments?placement={placement}.

Ad comment counts are read with the Marketing API token (Facebook side) or the connected Instagram account's token (Instagram side). A row whose count can't be read is omitted.

Pagination

Pagination walks each account's platform listing. Following nextCursor reaches past the first page on Facebook, Instagram, Threads, LinkedIn and YouTube, the platforms that support a server-side date window. On the others the listing stops at its first page.

Cursor pagination is only coherent for the default sort (sortBy=date, sortOrder=desc). With sortOrder=asc, or with sortBy=comments, the cursor filter does not match the sort order and the second page is unreliable.

minComments is applied to each page after pagination. A page can hold fewer than limit posts, even none, while hasMore is true; keep following nextCursor.

nextCursor is opaque: pass it back verbatim, never construct or parse it, its composition may change without notice. Because each page re-queries a live window, results can still shift between requests, so dedupe by id on the client.

Comment counts

commentCount semantics differ by platform:

  • YouTube's includes replies.
  • Facebook's counts top-level comments only.

Remove a label from a conversation

Facebook Messenger only. Removes one of the Page's custom labels from the person in this conversation (Graph `DELETE /{label-id}/label?user={psid}`). The label itself stays on the Page. The id must be one of the Page's custom labels, otherwise 404 `resource_not_found`. Other platforms answer 400 `platform_not_supported`.

Get post comments

Fetch comments for a specific post. Requires accountId query parameter. ### Replies to a comment Pass `commentId` (Facebook, Instagram, Reddit, TikTok) to fetch replies to a specific comment instead of the post's top-level comments. - Facebook, Instagram and TikTok return the comment's replies, paged by `limit`/`cursor`. - Reddit returns the focused comment thread instead. - On Facebook and Instagram the requested comment itself comes back in the top-level `comment` field. On Facebook, passing a COMMENT id as `postId` (instead of using `commentId`) is also supported for backwards compatibility. It returns that comment's replies the same way. Prefer `commentId` for new integrations; it also works on Instagram, which rejects a comment id passed as `postId`. YouTube does not support either form: `postId` must be a video id. ### Caching Responses are cached for up to 10 minutes, so a page may lag new comments by that window. Do not poll this endpoint for real-time updates: subscribe to the `comment.received` webhook, which delivers new comments as they arrive. Your own writes (creating, replying to, or deleting a comment) refresh the cache immediately. ### TikTok TikTok is served for accounts connected through the TikTok for Business app: - `postId` is the TikTok video id. - Each top-level comment carries up to three inline replies. - `commentId` pages the full reply list of one comment. Developer-app TikTok accounts return 400 with code `PLATFORM_LIMITATION`. ### X (Twitter) When `postId` is itself a reply rather than the thread's root post, only replies to that specific post are returned, not the whole conversation thread. ### Hidden comments - Facebook Pages and Instagram accounts connected through Instagram Login return them with `isHidden: true`. - Instagram accounts connected through Facebook Login do not return them at all (Meta omits them, together with their replies). So a hidden comment and a deleted one look the same on this read.

GET/v1/inbox/comments
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.comments.listInboxComments();console.log(data);
{  "data": [    {      "id": "string",      "platform": "string",      "accountId": "string",      "accountUsername": "string",      "content": "string",      "picture": "string",      "contentTruncated": true,      "permalink": "string",      "createdTime": "2019-08-24T14:15:22Z",      "commentCount": 0,      "likeCount": 0,      "cid": "string",      "subreddit": "string",      "isAd": true,      "adId": "string",      "placement": "facebook"    }  ],  "pagination": {    "hasMore": true,    "nextCursor": "string"  },  "meta": {    "accountsQueried": 0,    "accountsFailed": 0,    "failedAccounts": [      {        "accountId": "string",        "accountUsername": "string",        "platform": "string",        "error": "string",        "code": "string",        "retryAfter": 0      }    ],    "lastUpdated": "2019-08-24T14:15:22Z",    "accountsSkipped": [      {        "accountId": "string",        "platform": "string"      }    ]  }}
OpenAPI specification
Was this page helpful?