Social Media Comments API
A social media comments API gives your application one consistent way to fetch discussion under posts, answer it, and apply moderation where a network allows it.
curl "{{API_BASE_URL}}/v1/comments?platform=instagram&accountId=INTEGRATION_ID&postId=MEDIA_ID&limit=25" \
-H "x-access-key: YOUR_ACCESS_KEY"curl "{{API_BASE_URL}}/v1/comments?platform=instagram&accountId=INTEGRATION_ID&postId=MEDIA_ID&limit=25" \
-H "x-access-key: YOUR_ACCESS_KEY"
This guide walks through the captured /v1/comments contract for the Instagram Comments API, Facebook Comments API, Threads Comments API, LinkedIn Comments API, YouTube Comments API and Twitter Comments API, so you can plan identifiers, pagination and per-platform controls before writing code.
Definition and scope: what a social media comments API does
Think of this interface as a bridge between your product and the discussion happening beneath social posts. Instead of wiring up a different connector for every network, you call one endpoint and let the platform value tell the service where to look. That design suits an agency juggling several client accounts, or a creator tool that wants replies sitting next to its own metrics.
Across Instagram, Facebook, YouTube and Threads you can fetch discussion and answer it through that single route, with extra moderation actions available only on networks that offer them. Before committing to a build, pin down three practical questions: which actions each network permits, which IDs your calls must carry, and how a long conversation is paginated.
Setup is presented in three stages. Stage one is obtaining an API key at signup, issued straight away without a sales conversation. Stage two is the integration itself: connect an account once, then use the same API for publishing, scheduling, analytics, comments and messages. Stage three is breadth: your users gain access to the major networks without you maintaining a bespoke integration for each. If authentication fails, check the x-access-key header from the list example first; credential problems will otherwise look like platform problems.
Captured contract: list comments and replies
The list operation returns predictable JSON. In the captured example, the request targets /v1/comments and carries platform, accountId, postId and limit as query values, with the key supplied in an x-access-key header. The example titled List comments request shows that call verbatim, and List comments response shows the shape it returns.
Instagram, Facebook and Threads share that one /v1/comments route. Your client code stays largely unchanged between them; only the platform value changes. Branching is then needed mainly where a network lacks an action, for example hiding or deleting.
For the List Comments and Replies operation, you retrieve the comments attached to a post together with who wrote them, what they said, when, how many likes they have, and any nested replies. Longer conversations are paged using a cursor that is normalised across networks. In the example payload, each entry contains id, text, an author object with id and name, timestamp, likeCount, hidden and a replies array, while the envelope contains success, comments and nextCursor. Treat nextCursor simply as a value present in the example; how it is passed back, and what its absence means, were not captured, so confirm that behaviour from a complete contract before relying on it. As a failure check, guard against a cursor that never changes: record the last good page rather than looping forever.
Captured contract: reply and create comment
Answering a comment and starting a fresh top-level comment share the same route; the difference is whether you identify the post or the existing comment. The captured pattern for a reply is a POST to /v1/comments carrying the linked account, the platform, a commentId and the reply wording. Threads uses the same shape, with its reply or thread identifier supplied as commentId. No JSON wrapper for this request was captured, so this guide describes those inputs in plain language rather than presenting a body schema.
Run a short pre-flight check: does the platform value match the linked account, does the commentId belong to that account, and is the text exactly what you intend to publish? Wait for the response before showing the reply as published in your interface, since an unsuccessful call must never be presented as a live reply. Because the source did not capture the full field list, types, or response and status details for this POST, anything beyond the linked account, platform, commentId and reply text should be treated as unconfirmed until a complete contract arrives.
Moderation: hide and unhide, and delete comments
Two moderation actions need to be kept separate. Hide and Unhide flips a comment between hidden and visible, which is useful for spam you may later want to restore. Delete Comments removes the comment entirely, addressed by its comment ID whichever network it sits on. The source did not capture the methods, paths, parameters or status behaviour for either action, so this guide deliberately does not invent them; build those calls only once a complete contract is available.
Scope is broader than content created through the API: any post belonging to a connected account is eligible, including material published elsewhere. That makes adoption easier for a product with an existing catalogue. Before offering a moderation button, verify both that the post belongs to the connected account and that the network supports that specific action, because availability differs from one network to the next.
Platform capability matrix
A single comments route covers the supported networks, yet each network exposes a different subset of actions. The Instagram Comments API covers listing comments and replies, creating top-level comments, answering existing comments, Hide and Unhide, and Delete Comments on connected Instagram Business accounts. The Facebook Comments API covers listing comments and replies on Page posts, creating comments, answering existing comments, and Delete Comments. The Threads Comments API covers reading replies, answering them, and creating new top-level Threads posts through the same route, while hiding or deleting replies is not currently supported there. The LinkedIn Comments API covers listing comments and nested replies, creating comments, answering existing comments, and Delete Comments whether acting as a member or for a company Page. The YouTube Comments API covers listing comments and replies on videos, creating comments, answering existing comments, and Delete Comments on your own channel. The Twitter Comments API covers listing replies on your tweets, posting replies, deleting your own replies, and hiding replies on your tweets through the same route.
Let the matrix below drive your interface decisions: omit controls a network does not support rather than letting people attempt them and fail. Threads replies, for instance, should not show hide or delete controls, and Facebook hiding should stay out of the UI until the conflicting source statements are resolved.
Existing posts, authorization, and browser tools
Sign-in for the supported networks runs through a hosted flow. With that flow in place, you do not need to set up your own Meta developer apps, nor maintain separate authentication and token-refresh handling for Instagram, Facebook and Threads. That does not remove account handling from your product: each person still authorises their own account on the network, and your interface must cope with connection and permission failures.
For a hands-on trial before coding, browser-based comment manager tools use the same API. The Instagram tool supports reading, replying, hiding and deleting, while the Facebook tool supports reading, replying and deleting on Page posts. Trying those flows first is a sensible way to learn the identifiers and moderation behaviour, then reproduce the same steps in your own integration.
| Parameter | Location | Type in captured example | Requiredness | Notes |
|---|---|---|---|---|
| platform | Query | string ("instagram") | Unconfirmed | Switch this value to change platform; same request shape across platforms. |
| accountId | Query | string ("INTEGRATION_ID") | Unconfirmed | Connected account identifier. |
| postId | Query | string ("MEDIA_ID") | Unconfirmed | Post whose comments are listed. |
| limit | Query | number (25) | Unconfirmed | Page size for the list request. |
| x-access-key | Header | string ("YOUR_ACCESS_KEY") | Unconfirmed | API key header shown in captured curl. |
Requiredness not captured in source; shown as unconfirmed.
| Field | Type in captured example | Notes |
|---|---|---|
| success | boolean (true) | Top-level status flag in example. |
| comments | array | List of comment objects. |
| comments[].id | string | Comment identifier; used for reply, hide and delete operations. |
| comments[].text | string | Comment body text. |
| comments[].author.id | string | Author identifier. |
| comments[].author.name | string | Author display name. |
| comments[].timestamp | string (ISO 8601) | Comment timestamp. |
| comments[].likeCount | number | Like count for the comment. |
| comments[].hidden | boolean | Whether the comment is currently hidden. |
| comments[].replies | array | Nested replies; reply objects carry id, text, author, timestamp and likeCount in the example. |
| nextCursor | string | Cursor value present in the example for paging a long thread; pass-back behaviour not captured. |
Field map derived only from captured example response; requiredness not captured.
| Conceptual input | Status in captured source | Notes |
|---|---|---|
| Platform | Captured in reply pattern | Platform value, e.g. instagram, facebook, threads. |
| Connected account | Captured in reply pattern | Linked account identifier; accountId is the name shown in the captured list request. |
| commentId | Captured in reply pattern | Existing comment to reply to; for Threads, the Threads reply or thread ID. |
| Reply text | Captured in reply pattern | Reply body text. |
| Post identifier | Captured for top-level comment pattern | Used instead of commentId when posting a top-level comment on a post. |
No JSON wrapper schema was captured for this POST; inputs are described conceptually only. Full required/optional list, types and response/status contract not captured.
| Platform | List comments and replies | Reply / create comment | Hide and Unhide | Delete comments |
|---|---|---|---|---|
| Instagram Comments API | Yes | Yes | Yes | Yes |
| Facebook Comments API | Yes | Yes | Unresolved in source (see qualification) | Yes |
| Threads Comments API | Yes (read replies) | Yes | No | No |
| LinkedIn Comments API | Yes (including nested replies) | Yes | Not stated in source | Yes |
| YouTube Comments API | Yes | Yes | Not stated in source | Yes |
| Twitter Comments API | Yes (list replies on your tweets) | Yes (post replies) | Yes (hide replies on your tweets) | Yes (delete your own replies) |
Facebook Hide and Unhide is unresolved in the source: one section says hide is available on platforms like Instagram and Facebook, while the FAQ says hide/unhide is not provided for Facebook. Do not build the Facebook hide control until this is resolved.
Frequently asked questions
What is a social media comments API?
It is a programmatic interface for pulling discussion from beneath posts and acting on it inside your own software. An agency, for instance, might centralise client engagement in one dashboard, while a creator platform might surface replies alongside its other analytics. A single endpoint covering the supported networks avoids writing a separate connector for every network.
Can I reply to social media comments through the API?
Yes, using a POST call to /v1/comments. Supply the linked account, the platform name, the target commentId and the wording you want published. Instagram, Facebook and Threads follow that same basic shape. On Threads, the value you pass as commentId should be the reply or thread identifier from that network.
Can I manage comments on posts that were not published through the API?
Yes, provided the post belongs to an account you have connected. Where the post originally appeared does not matter, so older material can be brought into a comment workflow without first moving it through the API. That lets an existing product adopt comment handling incrementally.
Can I hide or delete comments?
Support varies by network. Instagram allows comments to be hidden, shown again, or removed. Facebook allows removal, while the FAQ account says hide/show is not offered for Facebook. Replies on Threads can currently be neither hidden nor removed through this API. One source section describes hiding as available on networks such as Instagram and Facebook, which conflicts with that FAQ statement, so Facebook hiding remains unresolved here.
Do I need to create my own Meta developer apps to manage comments?
No, not with the hosted sign-in flow described here. That flow takes care of the OAuth connections and the permissions each network requires, so separate Meta app setup and your own token-refresh handling for Instagram, Facebook and Threads are unnecessary. People using your product still grant access to their own accounts on the network itself.
Can I manage social media comments without integrating the API first?
Yes, browser-based comment manager tools are available for that purpose. The Instagram version covers reading, replying, hiding and deleting, while the Facebook version covers reading, replying and deleting on Page posts. Because both sit on the same comments API, they are a practical way to try the workflow before coding it into a product.
{
"success": true,
"comments": [
{
"id": "123456789",
"text": "An example comment.",
"author": {
"id": "987654321",
"name": "Jane Doe"
},
"timestamp": "2026-07-14T10:00:00.000Z",
"likeCount": 3,
"hidden": false,
"replies": [
{
"id": "111222333",
"text": "An example comment.",
"author": {
"id": "444555666",
"name": "Your Page"
},
"timestamp": "2026-07-14T10:05:00.000Z",
"likeCount": 1
}
]
}
],
"nextCursor": "cursor_abc123"
}