Skip to content

Manage Instagram Comments API: List, Reply, Hide, and Delete

The Manage Instagram Comments API workflow covers listing comments on a post, posting a top-level comment, replying to a comment, hiding or unhiding a comment, and deleting a comment. This guide preserves the exact methods, paths, parameters, and field names for each operation so you can assemble them into a repeatable moderation loop.

Prerequisites and account eligibility

Before calling any comment endpoint, confirm three prerequisites. You need an access key sent on every request in the x-access-key header, a connected Instagram Business or Creator account, and a credit budget because each Comments API call spends 1 credit. Personal accounts cannot manage comments through this API, so account type is a hard eligibility check rather than a preference. The connected account is identified in later calls by accountId, which you obtain after connecting the account.

Get your API key

Retrieve your access key from the Access Keys page and treat it like a password. Every request in the examples below uses the x-access-key header with that key. If a request does not behave as expected, check that the header name is exactly x-access-key and that the key value is present before debugging the endpoint itself.

Connect your Instagram account and obtain accountId

Call GET /v1/connect/instagram with the x-access-key header to obtain an authorization URL, open that URL, and authorize the app so the Instagram Business account is linked. The authorization requests the instagram_business_manage_comments scope. Then call GET /v1/connect/integrations with the same header and read the id for the connected account. That id is the accountId you pass to every comment call. You can also retrieve it from the integrations dashboard instead of the endpoint.

List comments on a post

To List comments on a post, call GET /v1/comments with platform set to instagram, accountId, postId, and an optional limit. The response contains success, a comments array, and nextCursor. Each comment includes id, text, author with id and name, timestamp, likeCount, hidden, and a replies array containing the first level of replies. For a post with many comments, continue by sending the returned nextCursor as the after query parameter. The limit accepts 1 to 100 and defaults to 25. Check hidden on each returned comment so your moderation logic does not treat already-hidden comments as visible.

Post a top-level comment versus reply to a comment

To post a top-level comment, call POST /v1/comments with platform, accountId, postId, and text. The response contains success and the new commentId. To reply to a comment, use the same POST /v1/comments endpoint but replace postId with commentId. That single field decides threading: include postId for a new top-level comment and include commentId for a reply. The response shape is identical in both cases, with success and commentId, so your code can handle creation and replies through one response path.

Hide or unhide a comment

To Hide or unhide a comment, call PATCH /v1/comments/{commentId} with platform, accountId, and hidden. Set hidden to true to hide the comment and set hidden to false to restore it. Hiding is reversible and is the gentler option for spam or off-topic noise because the comment remains visible to its author while disappearing from others. This hide operation is Instagram-only among the Meta platforms covered by this contract, so do not reuse it for Facebook or Threads comments.

Delete a comment

To Delete a comment, call DELETE /v1/comments/{commentId} with platform and accountId as query parameters. You can delete your own comments and comments left on your posts. Deletion is permanent, so reach for hide first when you are unsure whether removal should be reversible. After a delete call, do not reuse the deleted commentId for replies or hide operations.

Building a moderation loop

Combine the operations into a moderation loop by polling GET /v1/comments for new comments, classifying each comment with your own spam check or language model, and then replying, hiding, or deleting based on the result. Each call in that loop spends 1 credit, including listing, replying, hiding, and deleting, so tune polling frequency and limit to your credit budget. Use nextCursor and after to avoid reprocessing earlier pages, track processed comment ids, and verify the hidden field before acting. Pair this loop with a posting flow if you also publish to Instagram from the same access key.

What's next

That covers listing, replying, hiding, and deleting Instagram comments in code. The next step is to test the full loop with a small limit, confirm pagination with after, and verify that postId creates top-level comments while commentId creates replies. Keep the exact field names accountId, postId, commentId, nextCursor, and hidden in your implementation so the contract remains consistent across list, create, hide, and delete calls.

Instagram comment operations contract
OperationMethod and pathKey fieldsResult
List comments on a postGET /v1/commentsplatform, accountId, postId, limit, aftersuccess, comments, nextCursor
Post top-level commentPOST /v1/commentsplatform, accountId, postId, textsuccess, commentId
Reply to a commentPOST /v1/commentsplatform, accountId, commentId, textsuccess, commentId
Hide or unhide a commentPATCH /v1/comments/{commentId}platform, accountId, hiddenHide with true; restore with false
Delete a commentDELETE /v1/comments/{commentId}platform, accountId as query paramsPermanent deletion

Exact captured contract; origin shown as {{API_BASE_URL}} in code examples.

Failure and edge-case matrix
CheckRule from contractFailure or edge case
Account typeInstagram Business or Creator account requiredPersonal accounts cannot manage comments via API
Authenticationx-access-key header on every requestCheck header name and key value if a request does not behave as expected
Paginationlimit 1 to 100, default 25; nextCursor passed as afterSupply after on the next request to continue from a returned cursor
ThreadingpostId for top-level; commentId for replyUse the field matching the intended threading
Hide scopehidden true/false; Instagram-onlyDo not reuse hide for Facebook or Threads
Delete permanenceDELETE is permanentPrefer hide first when unsure
Credit budget1 credit per Comments API callPolling and moderation loops consume credits per call

Exact captured contract; origin shown as {{API_BASE_URL}} in code examples. Error/status behavior not stated in source is not presented as a verified contract.

Frequently asked questions

How do I choose between postId and commentId when creating a comment?

Use postId for a new top-level comment and commentId for a reply. Both use POST /v1/comments with platform, accountId, and text, and both return success and the new commentId.

Should I hide or delete a comment?

Hide with PATCH and hidden set to true when you may want to restore the comment by setting hidden to false. Delete with DELETE when removal should be permanent, and prefer hiding first when you are unsure.

How do I page through comments on a busy post?

Supply the nextCursor value from a list response as the after query parameter on the next request. The limit parameter accepts 1 to 100 and defaults to 25.

Which Instagram account type is required?

Personal accounts cannot manage comments through this API contract. Use an Instagram Business or Creator account, connect it, and use the returned id as accountId.

Connect Instagram account
curl {{API_BASE_URL}}/v1/connect/instagram \
  -H "x-access-key: YOUR_API_KEY"
List connected integrations to obtain accountId
curl {{API_BASE_URL}}/v1/connect/integrations \
  -H "x-access-key: YOUR_API_KEY"
List comments on a post
curl "{{API_BASE_URL}}/v1/comments?platform=instagram&accountId=your-ig-id&postId=17901234567890123&limit=25" \
  -H "x-access-key: YOUR_API_KEY"
List comments response example
{
  "success": true,
  "comments": [
    {
      "id": "17851234567890111",
      "text": "An example comment.",
      "author": { "id": "17841400000000001", "name": "maria.builds" },
      "timestamp": "2026-08-05T14:22:10+0000",
      "likeCount": 3,
      "hidden": false,
      "replies": [
        {
          "id": "17851234567890222",
          "text": "An example comment.",
          "author": { "id": "17841400000000002", "name": "yourbrand" },
          "timestamp": "2026-08-05T14:31:04+0000",
          "likeCount": 0
        }
      ]
    }
  ],
  "nextCursor": "QVFIUlZ..."
}
Post a top-level comment
curl -X POST {{API_BASE_URL}}/v1/comments \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "accountId": "your-ig-id",
    "postId": "17901234567890123",
    "text": "An example comment."
  }'
Create comment response example
{
  "success": true,
  "commentId": "17851234567890333"
}
Reply to a comment
curl -X POST {{API_BASE_URL}}/v1/comments \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "accountId": "your-ig-id",
    "commentId": "17851234567890111",
    "text": "An example comment."
  }'
Hide or unhide a comment
curl -X PATCH {{API_BASE_URL}}/v1/comments/17851234567890111 \
  -H "x-access-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "instagram",
    "accountId": "your-ig-id",
    "hidden": true
  }'
Delete a comment
curl -X DELETE "{{API_BASE_URL}}/v1/comments/17851234567890111?platform=instagram&accountId=your-ig-id" \
  -H "x-access-key: YOUR_API_KEY"