Instagram (IG) Comment
Updated: Jan 21, 2025
Copy for LLM
Represents a comment on an Instagram media object.
If you are migrating from Marketing API Instagram Ads endpoints to Instagram Platform endpoints, be aware that some field names are different.
Introducing the following fields:
legacy_instagram_comment_id
The following fields are not supported:
comment_typementioned_instagram_users
Requirements
| Instagram API with Instagram Login | Instagram API with Facebook Login | |
|---|---|---|
Access Tokens |
| |
Host URL | graph.instagram.com | graph.facebook.com |
Login Type | Business Login for Instagram | Facebook Login for Business |
|
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:
|
Creating
This operation is not supported.
Reading
GET <HOST_URL>/<IG_COMMENT_ID>?fields=<LIST_OF_FIELDS>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:
|
hidden | Indicates if comment has been hidden ( true) or not (false). |
id | IG Comment ID. |
like_count | Number of likes on the IG Comment. |
legacy_instagram_comment_id | The ID for Instagram comment that was created for Marketing API endpoints for v21.0 and older. |
media | |
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 |
|---|---|
Get a list of IG Comments on the IG Comment; Create an IG Comment on an IG Comment. |
Response
{ "<FIELD>":"<VALUE>", ... }
cURL Example
Request
curl -i -X GET \
"https://graph.instagram.com/v25.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 totrueto hide the comment, orfalseto 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
}