Comments
Manages and stores Instagram comment interactions, including creating, deleting, and retrieving comments linked to media content. It includes features for moderation and analysis of user engagement. The required permissions are instagram_basic and instagram_manage_comments.
Only the select, delete, and insert operations are supported.
Select
The connector will use the Instagram APIs to filter results by MediaId and will execute other filters client-side within itself.
-
The following query returns all comments on all media in your account. UserId will be null if the comment is from an account that is not a business account.
SELECT * FROM Comments
-
To query comments for a specific media object, MediaId is required. The MediaId column supports the = operator. For example:
SELECT * FROM Comments WHERE MediaId = '1501471279105199430_5380790872'
Insert
Create a comment on a media object with the following rules:
- MediaId and Text are the only available and required fields.
- The total length of the comment cannot exceed 300 characters.
- The comment cannot contain more than 4 hashtags.
- The comment cannot contain more than 1 URL.
- The comment cannot consist of all capital letters.
INSERT INTO Comments (MediaId, Text) VALUES ('1501471279105199430_5380790872', 'My comment text #instadevelopers')
Update
UPDATE is not supported.Delete
Id (the comment's primary key) is required. For example, the following query removes a comment either on the authenticated user's media object or authored by the authenticated user.
DELETE FROM Comments WHERE Id = '1668776136772254'
Columns
| Name | Type | ReadOnly | Description |
| Id [KEY] | String | True |
A unique string identifier automatically assigned to each comment. This value can be used to retrieve or reference specific comments across the platform. |
| Text | String | False |
The full text content of the comment, as written by the user. This can include emojis, mentions, hashtags, or links, depending on the user's input. |
| MediaId | String | False |
The unique identifier associated with the media item (image, video, carousel) on which the comment was made. It links the comment to its corresponding media post. |
| Created | Datetime | True |
The exact Coordinated Universal Time (UTC) timestamp indicating when the comment was created. This is useful for sorting chronologically or filtering based on time. |
| UserId | String | True |
The unique identifier of the Instagram user who authored the comment. This ID is persistent across sessions and media interactions. |
| Username | String | True |
The Instagram handle of the user who posted the comment. This is the public-facing username visible on the platform. |
| Likes | Int | True |
The total number of likes that the comment has received from other users, indicating its popularity or relevance. |
| Hidden | Boolean | True |
Indicates whether the comment is hidden from public view. A value of true means the comment has been hidden due to moderation or user action. |
| InstagramBusinessAccountId | String | True |
The unique identifier for the Instagram business account that owns the media or manages the interaction. Used to differentiate comment data across multiple business profiles. |