Skip to main content

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:

SettingValue
URLhttps://api.99digital.co.il/instagram/page/getComments
MethodJSON via POST
HeaderYour API key for the service (the apiKey header)

Body:

ParameterDescription / ExampleMandatoryExample
fromThe ID you received for the connectionyes463745743546345
mediaIdThe post ID (media ID) you want to get the comments fromno*15625364215_56994166514
commentIdThe comment ID you wish to get all the comments inside it (its replies)no*634645636423_5675674565
limitHow many comments to get (limit pagination), between 1 and 100. Default if not provided: 25no25
afterIf you are using limit paging, you can provide the "after" value from the previous response to load the next batchnoU56WDF34FA4TER3DA.....

* 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:

ParameterDescription
statusOK or FAIL
countTotal comments in this batch
targetThe mediaId or commentId you provided (the commentId, if you sent both)
fromYour ID for the service

comments and paging:

ValueInformation
idThis is the commentId
textThe body of the comment
usernameThe username of the person that wrote the comment
fromid, username of the comment creator
created_timeComment create time. UNIX UTC timestamp (int seconds)
like_countThe total likes this comment has
hiddentrue - the comment is hidden in the page. false - this comment is live on Instagram
parent_idThe parent comment id (in case this is a comment to a comment). It is part of a reply only (when you send commentId)
pagingKey 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:

ValueInformation
1Not FAIL. The status is OK
2Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error
3Wrong apiKey (the apiKey header is missing or wrong)
4mediaId or commentId is missing (or is not a valid ID)
6Wrong 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)
7The connection is not active (it was disabled)
8"limit" is not a number between 1 and 100
10You must do the onboarding again, the connection has expired
11A permission is missing: the connection does not have Meta's permission for this action
12Rate limit error. Too many requests. Please wait a few minutes and try again
13The mediaId or commentId is invalid or wrong: the post or comment was not found, or it is not accessible
15Meta rejected the request: an invalid parameter, or a policy violation
18General error, try again

Remarks:

Request​

Responses​

The request was processed. Both a successful and a failed request answer with HTTP 200 — check status, and reason when it is FAIL.