Facebook
IG Comment - Instagram Platform - Documentation - Meta for Developers

Instagram (IG) Comment

Represents a comment on an Instagram media object .

Requirements

Instagram API with Instagram Login
Instagram API with Facebook Login

Access Tokens

  • Instagram User access token

Host URL

graph.instagram.com

graph.facebook.com

Login Type

Business Login for Instagram

Facebook Login for Business

  • instagram_business_basic
  • instagram_business_manage_comments
  • instagram_basic
  • instagram_manage_comments
  • pages_read_engagement
  • pages_show_list

If the app user was granted a role via the Business Manager on the Page connected to the targeted IG User, you will also need one of:

  • ads_management
  • business_management

Creating

This operation is not supported.

Reading

GET <HOST_URL>/<IG_COMMENT_ID>?fields=<LIST_OF_FIELDS>

Get fields and edges on an IG Comment.

Limitations

  • Requests cannot be performed on comments discovered through the Mentions API unless the request is made by the comment owner. Instead, use the Mentioned Comment node.
  • Comments on age-gated media are not returned.
  • Comments created by IG Users who have been restricted by the app user will not be returned unless the IG Users are unrestricted and the Comments are approved.
  • Comments on live video IG Media can only be read while the IG Media upon which the comment was created is being broadcast.

Request Syntax

GET https://<HOST_URL>/<API_VERSION>/<IG_COMMENT_ID>
  ?fields=<LIST_OF_FIELDS>
  &access_token=<ACCESS_TOKEN>

Path Parameters

Placeholder Value

<API_VERSION>

API version .

<HOST_URL>

API version .

<IG_COMMENT_ID>

Required.IG Comment ID.

Query String Parameters

Key Placeholder Value

access_token

<ACCESS_TOKEN>

Required.App user's User access token.

fields

<LIST_OF_FIELDS>

Comma-separated list of IG Comment fields you want returned for each IG Comment in the result set.

Fields

Field Name
Description

from

An object containing:

  • id — The Instagram-scoped ID (IGSID) of the Instagram user who created the IG Comment.
  • username — Username of the Instagram user who created the IG Comment.

hidden

Indicates if comment has been hidden ( true ) or not ( false ).

id

IG Comment ID.

like_count

Number of likes on the IG Comment.

media

An object containing:


  • id — ID of the IG Media upon which the IG Comment was made.
  • media_product_type — Published surface of the IG Media (i.e. where the IG Media appears) upon which the IG Comment was made.

parent_id

ID of the parent IG Comment if this comment was created on another IG Comment (i.e. a reply to another comment.

replies

A list of replies (IG Comments) made on the IG Comment.

text

IG Comment text.

timestamp

ISO 8601 formatted timestamp indicating when IG Comment was created.


Example: 2017-05-19T23:27:28+0000 .

user

ID of IG User who created the IG Comment. Only returned if the app user created the IG Comment, otherwise username will be returned instead.

username

Username of Instagram user who created the IG Comment.

Starting August 27, 2024, the instagram_manage_comments permission (if your app uses Facebook login) and instagram_business_manage_comments permission (if your app uses Instagram login) will be required to access the username field of an Instagram user who commented on media of an app user's Instagram professional account.

Edges

Edge Description

replies

Get a list of IG Comments on the IG Comment; Create an IG Comment on an IG Comment.

Response

A JSON-formatted object containing default and requested fields and edges .

{
  "<FIELD>":"<VALUE>",
  ...
}

cURL Example

Request

curl -i -X GET \
 "https://graph.instagram.com/ v21.0 
/17881770991003328?fields=hidden%2Cmedia%2Ctimestamp&access_token=EAAOc..."

Response

{
  "hidden": false,
  "media": {
    "id": "17856134461174448"
  },
  "timestamp": "2017-05-19T23:27:28+0000",
  "id": "17881770991003328"
}

Updating

Hiding/Unhiding a Comment

POST <HOST_URL>/<IG_COMMENT_ID>?hide=<BOOLEAN>

Query String Parameters

  • hide (required) — Set to true to hide the comment, or false to show the comment.

Limitations

  • Comments made by media object owners on their own media objects will always be displayed, even if the comments have been set to hide=true .
  • Comments on live video IG Media are not supported.

Access token

A user access token from the user who owns the media object that was commented on.

Example Request

Hiding a comment:

POST graph.instagram.com
  /17873440459141021?hide=true

Example Response

{
  "success": true
}

Deleting

Deleting a Comment

DELETE <HOST_URL>/<IG_COMMENT_ID>

Access token

A User access token from a User who created the comment.

Limitations

  • A comment can only be deleted by the owner of the object upon which the comment was made, even if the user attempting to delete the comment is the comment's author.
  • Comments on live video IG Media are not supported.

Example Request

DELETE graph.instagram.com
  /17873440459141021

Example Response

{
  "success": true
}
Build a Mobile Site
View Site in Mobile | Classic
Share by: