All Comments
POST/instagram/page/getComments
This endpoint allows you to see all the comments of a post or a comment in your page (comments that were created by the API or directly on Instagram).
Settings:
| Setting | Value |
|---|---|
| URL | https://api.99digital.co.il/instagram/page/getComments |
| Method | JSON via POST |
| Header | Your API key for the service (the apiKey header) |
Body:
| Parameter | Description / Example | Mandatory | Example |
|---|---|---|---|
| from | The ID you received for the connection | yes | 463745743546345 |
| mediaId | The post ID (media ID) you want to get the comments from | no* | 15625364215_56994166514 |
| commentId | The comment ID you wish to get all the comments inside it (its replies) | no* | 634645636423_5675674565 |
| limit | How many comments to get (limit pagination), between 1 and 100. Default if not provided: 25 | no | 25 |
| after | If you are using limit paging, you can provide the "after" value from the previous response to load the next batch | no | U56WDF34FA4TER3DA..... |
* Either mediaId or commentId is required, not both. If you send both, the commentId is used.
Response:
{
"status": "OK",
"from": "463745743546345",
"target": "15625364215_56994166514",
"count": 25,
"comments": [{
"id": "119324881085321_122093459712345",
"text": "Hello fans!",
"username": "some_user",
"from": { "id": "1234567890", "username": "some_user" },
"created_time": 1783596120,
"like_count": 3,
"hidden": false,
"parent_id": "634532636346"
}],
"paging": { "after": "QVFIU...", "hasNext": true },
"reason": 1
}
Response-Explain:
| Parameter | Description |
|---|---|
| status | OK or FAIL |
| count | Total comments in this batch |
| target | The mediaId or commentId you provided (the commentId, if you sent both) |
| from | Your ID for the service |
comments and paging:
| Value | Information |
|---|---|
| id | This is the commentId |
| text | The body of the comment |
| username | The username of the person that wrote the comment |
| from | id, username of the comment creator |
| created_time | Comment create time. UNIX UTC timestamp (int seconds) |
| like_count | The total likes this comment has |
| hidden | true - the comment is hidden in the page. false - this comment is live on Instagram |
| parent_id | The parent comment id (in case this is a comment to a comment). It is part of a reply only (when you send commentId) |
| paging | Key that contains two values: "after", which represents the parameter to send if you wish to get the next batch, and "hasNext", which is true if you have more data to load, or false if this is the last data |
reason:
| Value | Information |
|---|---|
| 1 | Not FAIL. The status is OK |
| 2 | Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error |
| 3 | Wrong apiKey (the apiKey header is missing or wrong) |
| 4 | mediaId or commentId is missing (or is not a valid ID) |
| 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Instagram endpoint) |
| 7 | The connection is not active (it was disabled) |
| 8 | "limit" is not a number between 1 and 100 |
| 10 | You must do the onboarding again, the connection has expired |
| 11 | A permission is missing: the connection does not have Meta's permission for this action |
| 12 | Rate limit error. Too many requests. Please wait a few minutes and try again |
| 13 | The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible |
| 15 | Meta rejected the request: an invalid parameter, or a policy violation |
| 18 | General error, try again |
Remarks:
- Each comment's
idis thecommentIdfor Create Comment, Hide Comment, Delete Comment and Private Reply.
Request
Responses
- 200
The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.