Instagram Comment
Webhook
Instagram Comment allows you to receive a webhook whenever a new comment, or a reply to a comment, is written on your Instagram account's posts (event "comment").
It is sent for an Instagram connection (facebook_type 4), to the URL you
set with Set Webhook for that
connection. Delivery, retries and duplicates are explained on the
Webhook Events page.
actionis always "created": a new comment on a post (parentIdis null), or a reply to a comment (parentIdis the comment it answers).- The text of the comment comes from Instagram itself, in
text. There is notextFetchedon Instagram events. - Instagram does not report when a comment is hidden, unhidden, deleted or edited — Meta has no webhook for it. So none of these sends you anything, also when you do it yourself with Hide Comment or Delete Comment.
- Instagram sends no webhook when a new post is published. A post that was
created in the Instagram app (or on the web) — or any older post that was
never announced — is announced to you when its first comment
arrives: you get an
Instagram Post event first, and
this comment about 5 seconds later. The few seconds are not exact: order
events by
timestamp. - A comment on an ad is sent to you as a comment event
(
mediaProductType"AD",adIdset), but it does not announce a post.
Comments that your own Instagram account writes — also replies you send
with Create Comment — arrive
here too, with fromSelf true. If you reply automatically to comments,
skip every event with fromSelf true, or your bot will answer itself in
a loop.
Settings:
| Setting | Value |
|---|---|
| URL | Your URL — set it with Set Webhook |
| Method | JSON via POST |
With every Instagram comment event, you will get some of the following:
{
"event": "comment",
"action": "created",
"eventId": "fbw_b8e1d4a7c0f95263e8b1d4a7c0f9e316",
"platform": "instagram",
"from": "463745743546390",
"facebook_type": 4,
"igUserId": "17841458392017465",
"mediaId": "18054729384756120",
"mediaProductType": "FEED",
"commentId": "17938475610293847",
"parentId": null,
"author": { "id": "17841401234567890", "username": "dana.cohen" },
"fromSelf": false,
"text": "Love it! How much is the big bouquet?",
"adId": null,
"timestamp": 1795620000
}
Response explained
| Parameter | Description / Example |
|---|---|
event | "comment" always, for comment webhooks. |
action | "created" always: a new comment or a reply. |
eventId | The unique ID of this event (fbw_ and 32 characters). The same comment always comes with the same eventId, so use it to ignore an event you already received. |
platform | "instagram" always, for Instagram. |
from | The ID of your connection — the from you use to call our API. |
facebook_type | 4 always (Instagram). |
igUserId | Your Instagram account ID. |
mediaId | The post the comment is on. Use it with All Comments, Create Comment and All Posts. |
mediaProductType | Where the post is, as Instagram reports it: for example "FEED", "REELS", "STORY", or "AD" for an ad. null when Instagram does not send it. |
commentId | The comment ID. Use it with Create Comment (to reply), Hide Comment, Delete Comment and Private Reply. |
parentId | On a reply: the comment it answers. null for a comment on the post itself. |
author | Who wrote the comment: id and username (username can be null). null when it is not known. |
fromSelf | true when the comment was written by your own Instagram account. |
text | The text of the comment, or null when it has none. |
adId | When the comment is on an ad: the ad ID. null otherwise. |
timestamp | When the comment was written, as Instagram reports it (Unix time in seconds, UTC). |
Webhook payload
Your response
- 200
- default
Received. Answer with any 2xx status (200, 201, 204 …) — we wait up to 5 seconds to connect and up to 15 seconds for your answer. The body of your answer is ignored.
Any other status, or no answer in time, counts as a failed delivery. We try again: immediately, then 5 minutes, 20 minutes, 1 hour, 4 hours and 24 hours after the previous failure. After that, the event is not sent again.