Comments on one of your Instagram posts
instagram.instagram.post.commentsList the comments on one of your Instagram posts
- 价格
- free按供应商原价
- 成功率
- 100%近 30 天 · 1,777 次
- 延迟 p50
- 165 毫秒p95 481 毫秒
- 最后验证
- 2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/instagram.instagram.post.comments?limit=5&fields=id%2Ctext%2Cusername%2Ctimestamp%2Clike_count预览在线试用即将上线供应商文档 ↗
- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
reads comments on YOUR OWN media only — instagram_basic does not open other accounts' comment threads (use the scraped any_account route for those). Replying needs instagram_manage_comments, which treg does not request
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 路径参数 | ||||
ig_media_id | 字符串 | 必填 | media id from instagram.user.posts | 17900000000000000 |
| 查询参数 | ||||
limit | 整数 | 可选 | 25 | |
fields | 字符串 | 可选 | id,text,username,timestamp,like_count,replies{id,text,username,timestamp} | |
- 路径参数
ig_media_id字符串必填media id from instagram.user.posts
示例:
17900000000000000- 查询参数
limit整数可选示例:
25fields字符串可选示例:
id,text,username,timestamp,like_count,replies{id,text,username,timestamp}
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
预览
curl -X GET 'https://toolswitch.dev/v1/tools/instagram.instagram.post.comments?limit=5&fields=id%2Ctext%2Cusername%2Ctimestamp%2Clike_count' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/instagram.instagram.post.comments?limit=5&fields=id%2Ctext%2Cusername%2Ctimestamp%2Clike_count",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/instagram.instagram.post.comments?limit=5&fields=id%2Ctext%2Cusername%2Ctimestamp%2Clike_count", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 free 计费,已含服务费。