Skip to main content

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.

  • action is always "created": a new comment on a post (parentId is null), or a reply to a comment (parentId is the comment it answers).
  • The text of the comment comes from Instagram itself, in text. There is no textFetched on 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", adId set), but it does not announce a post.
warning

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:

SettingValue
URLYour URL — set it with Set Webhook
MethodJSON 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​

ParameterDescription / Example
event"comment" always, for comment webhooks.
action"created" always: a new comment or a reply.
eventIdThe 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.
fromThe ID of your connection — the from you use to call our API.
facebook_type4 always (Instagram).
igUserIdYour Instagram account ID.
mediaIdThe post the comment is on. Use it with All Comments, Create Comment and All Posts.
mediaProductTypeWhere the post is, as Instagram reports it: for example "FEED", "REELS", "STORY", or "AD" for an ad. null when Instagram does not send it.
commentIdThe comment ID. Use it with Create Comment (to reply), Hide Comment, Delete Comment and Private Reply.
parentIdOn a reply: the comment it answers. null for a comment on the post itself.
authorWho wrote the comment: id and username (username can be null). null when it is not known.
fromSelftrue when the comment was written by your own Instagram account.
textThe text of the comment, or null when it has none.
adIdWhen the comment is on an ad: the ad ID. null otherwise.
timestampWhen the comment was written, as Instagram reports it (Unix time in seconds, UTC).

Webhook payload

​

Your response​

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.