Instagram Fetch Post Comments V2
Retrieve the comments for a post, with optional sorting and pagination. Inputs: - `media_id` (required): The post's media ID. - `sort_order` (optional, default `recent`): Use `recent` or `popular`. - `min_id` (optional): The pagination cursor returned as `next_min_id` by the previous response. Omit it on the first request. Returns a comment list and related metadata, including comment IDs, text, timestamps, commenter information, like counts, child-comment counts and previews, translation availability, the post caption, and pagination fields such as `next_min_id` and `has_more_headload_comments`.
Pricing
| Condition | Charge |
|---|---|
| Each call | 2.07 credits/call |
Each call has a fixed fee of 2.07 credits. Charges are per query. A successful query is billed even if it returns no results.
Recent and popular sorting use the same rate. Each request for another page using a pagination cursor is billed separately, regardless of the number of comments returned.
Parameters
Optional parameters use the platform defaults when omitted.
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
min_id | string | No | 分页游标,从上一次响应的next_min_id获取/Pagination cursor from previous response's next_min_id | — |
media_id | string | Yes | 帖子ID(媒体ID)/Post ID (Media ID) | — |
sort_order | string | No | 排序方式:popular(热门)/recent(最新)/Sorting: popular/recent | recent |
Invocation example
Copy the request and explore its response example.
/agent-api/v1/tool/executeX-Api-Keycurl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_instagram_fetch_post_comments_v2' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {
"media_id": "4014378417054070523",
"sort_order": "popular"
}
}'{
"detail": {
"code": 400,
"message": "Request failed. Please retry. Check the docs below to verify your parameters, test with the default demo parameters, and send the response JSON to support. You won't be charged for this request.",
"message_zh": "请求失败,请重试。请查看下方文档核对参数,使用默认演示参数测试,并将响应 JSON 提交给支持团队。本次请求不会被扣费。",
"request_id": "7086f191-0f06-4502-b35a-d34cbd84164f"
}
}This example shows part of the response. Copied content is valid JSON.
Guides using this tool
See how this tool fits into real workflows

