Instagram 评论 API
按帖子或 Reels 链接读取评论,每条带 text、author_username、like_count,每千次 $0.79。
- 失败和空结果不收费
- 不用登录 Instagram
- 一次最多 100 条
接口健康状态
- 24h 健康值
- 少量可用
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
24 小时趋势
30 天趋势
1请求
POST /api/v1/social { "platform": "instagram", "action": "comments", "params": { "url": "https://www.instagram.com/p/DbYmqpplO_N/" } }2JSON 响应
{ "results": [ { "author_username": "", "text": "https://app.emergent.sh/chat\nSo I developed an app that is called Earth's Cosmos 2 Cosmos watch and there is a small subscription to it is five dollars a month and you can cancel at any time I liked it for you to be my first subscriber it's based on research and information that …", "like_count": 0, "is_verified": false }, … ], "count": 15 }3表格行
author_username text like_count is_verified https://app.emergent.sh/chat So I developed an app that is called Earth's Cosmos 2 Cosmos watch and there is a small subscription to it is five dollars a month and you can cancel at any time I liked it for you to be my first subscriber it's based on research and information that … 0 false 🙏⚽ 0 false 4CSV
instagram-comments-sample.csv id,text,url,like_count,reply_count,author_username,author_name,is_verified,posted_at,post_url,platform
url 和可选的 limit;JSON 响应里每条评论有 text、like_count、reply_count 等字段,可以转成表格行或 CSV。能拿到什么数据
下表是对 instagram.com/p/DbYmqpplO_N 做的一次真实调用:2026年9月26日 16:56(UTC)采集,返回 15 条评论。灰条是隐去的个人信息(CSV 里是 •••);你自己调用时,会按字段表返回这些字段。
| id | text | url | like_count | reply_count | author_username | author_name | is_verified | posted_at | post_url | platform |
|---|---|---|---|---|---|---|---|---|---|---|
| https://app.emergent.sh/chat So I developed an app that is called Earth's Cosmos 2 Cosmos watch and there is a small subscription to it is five dollars a month and you can cancel at any time I liked it for you to be my first subscriber it's based on research and information that … | https://www.instagram.com/p/DbYmqpplO_N/c/17931449676404522 | 0 | null | null | false | 2026-09-20T21:43:10+00:00 | https://www.instagram.com/p/DbYmqpplO_N/ | |||
| 🙏⚽ | https://www.instagram.com/p/DbYmqpplO_N/c/17874993174565429 | 0 | null | null | false | 2026-09-16T01:41:58+00:00 | https://www.instagram.com/p/DbYmqpplO_N/ |
用途
抽样看口碑
读一条帖子下的
text,看用户对内容、商品或活动在说什么。挑出高赞评论
按
like_count从高到低排序,找出一条帖子下点赞最多的评论。找认证账号留言
筛出
is_verified为真的行,看哪些认证账号在这条帖子下留过言。追踪评论回复
用
reply_count找到有人回复的评论,把它的id交给comment_replies读回复。
Instagram Graph API 与 EveryInfra 对比
下面从能读哪些帖子、单次条数和访问条件三方面,比较 Instagram 官方 Graph API 和 EveryInfra comments。
| 对比项 | Instagram Graph API | EveryInfra |
|---|---|---|
| 能读哪些帖子 | "Your app can use the API to get comments, reply to comments, delete comments, hide/unhide comments, and disable/enable comments on Instagram media owned by your app user’s Instagram professional account." | url 填一条帖子或 Reels 的链接;不支持主页链接。 |
| 单次条数 | "Returns a maximum of 50 comments per query." | limit 取 1 到 100,默认 50;超出范围返回 422,不扣费。 |
| 访问条件 | 访问令牌:"An access token from a User who created the IG Media object, with the following permissions:" | 一把 EveryInfra API Key 放在 Authorization: Bearer 请求头里,不用登录 Instagram,也不用 Instagram 访问令牌。 |
引文出自 Meta 开发者文档,2026-11-09 核对。 官方出处: Comments (更新于 2026-10-20) · Instagram Platform overview (更新于 2026-10-29)
限制和注意事项
limit是 1 到 100 的整数,默认 50;超出范围返回 422,不扣费。- 没有翻页参数,一次调用最多返回 100 条。
- 返回的条数可能少于
limit,也不保证返回一条评论的完整对话树。 url要填一条帖子或 Reels 的链接,不支持主页链接。like_count、reply_count为null表示不公开,不等于 0;is_verified为null表示无法判定。
价格
每次调用 $0.000792,按次不按条;一次最多读取 100 条评论。失败和空结果不收费。
| 调用次数 | 费用 |
|---|---|
| 10,000 | $7.92 |
| 100,000 | $79.17 |
| 1,000,000 | $791.67 |
合计按每次调用的标价算。
代码示例
#curl -X POST 'https://api.everyinfra.com/api/v1/social' \
-H "Authorization: Bearer $EVERYINFRA_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"platform": "instagram",
"action": "comments",
"params": {
"url": "https://www.instagram.com/p/DbYmqpplO_N/"
}
}'OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
API 参考
下面是 comments 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开给 AI 助手。
AI 提示词
#请帮我用 EveryInfra 的「Instagram 评论」接口(instagram/comments)写一个数据采集脚本。
接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 instagram,action 填 comments,参数放在 params 里。
- 必填参数:
- url:comments 的单个 Instagram 帖子或 Reel 链接;不是账号主页。
- 可选参数:
- limit:这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。(默认 50)
- 返回一组记录,每条记录的主要字段:id、text、url、like_count、reply_count、author_username、author_name、is_verified、posted_at、post_url(帖子链接)。
- 示例请求体:
{
"platform": "instagram",
"action": "comments",
"params": {
"url": "https://www.instagram.com/p/DbYmqpplO_N/"
}
}
- 计费:$0.79 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。
写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。请求参数
#| 参数名 | 位置 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|---|
Authorization | header | string | 是 | - | Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。 |
platform | body | string | 是 | instagram | 平台标识,固定值。 |
action | body | string | 是 | comments | 能力标识,固定值。 |
url | body.params | string | 是 | - | comments 的单个 Instagram 帖子或 Reel 链接;不是账号主页。 |
limit | body.params | integer (1–100) | 否 | 50 | 这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。 |
响应示例
#{ "id": "req_…", "platform": "instagram", "action": "comments", "results": [ { "id": "•••", "text": "https://app.emergent.sh/chat\nSo I developed an app that is called Earth's Cosmos 2 Cosmos watch and there is a small subscription to it is five dollars a month and you can cancel at any time I liked it for you to be my first subscriber it's based on research and information that …", "url": "https://www.instagram.com/p/DbYmqpplO_N/c/17931449676404522", "like_count": 0, "author_username": "•••", "is_verified": false, "posted_at": "2026-09-20T21:43:10+00:00", "post_url": "https://www.instagram.com/p/DbYmqpplO_N/", "platform": "instagram" }, { "id": "•••", "text": "🙏⚽", "url": "https://www.instagram.com/p/DbYmqpplO_N/c/17874993174565429", "like_count": 0, "author_username": "•••", "is_verified": false, "posted_at": "2026-09-16T01:41:58+00:00", "post_url": "https://www.instagram.com/p/DbYmqpplO_N/", "platform": "instagram" } ], "count": 15, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
返回字段
#业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。
| 字段 | 含义 |
|---|---|
id | 该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。 |
text | 正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。 |
url | 该记录在原平台上的可访问链接。 |
like_count | 点赞数。null 表示该平台或该接口不公开此数据,不等于 0。 |
reply_count | 回复数,通常用于评论的子回复。null 表示不公开。 |
author_username | 作者用户名(@handle),通常可用于拼 URL。 |
author_name | 作者昵称(显示名)。 |
is_verified | 是否为平台认证账号(蓝V等)。null 表示无法判定。 |
posted_at | 发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。 |
post_url | 帖子链接。 |
platform | 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。 |
错误与计费
#- 401
- 缺少 Key 或 Key 无效。
- 402
- 余额不足,先充值。
- 422
- 参数名或取值不对,按错误信息给的候选改;不扣费。
- 429
- 超过每分钟请求上限,按 Retry-After 等待后再试。
- 503
- 暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
- 200 空结果
- 没有数据,不扣费。
常见问题
Instagram 评论 API 返回什么?
返回一条帖子或 Reels 下的评论,按 url 查询。每行有 id、text、like_count、reply_count、author_username 等字段。
一次能读多少条评论?能翻页吗?
一次最多 100 条。limit 取 1 到 100,默认 50,实际返回可能更少。没有翻页参数。
Instagram 评论接口多少钱?
按调用次数收费:每次 $0.000792,合每千次 $0.79;一次读回最多 100 条评论也只算一次。失败和空结果不收费。
读评论要登录 Instagram 吗?
不用。传帖子的 url,在 Authorization: Bearer 请求头里放 EveryInfra API Key 就行,不需要 Instagram 登录或访问令牌。
comments 和 comment_replies 有什么区别?
comments 读帖子下的评论。comment_replies 读某条评论下的回复,要 url 和 comment_id(comments 某行的 id),用 page_token 翻页。
相关的 Instagram 能力
同一把 API Key 还能调用 Instagram 的其他能力。
- 单条内容
post每千次 $0.56单条内容:返回列表,默认 11 条、单次最多 11 条;主要字段 post_id、url、text、media_type、like_count、comment_count。 - 主页或对象详情
profile每千次 $0.56主页或对象详情:返回单个对象;主要字段 username、display_name、bio、follower_count、following_count、post_count。 - 账号画像
persona每千次 $0.56账号画像:返回单个对象;主要字段 username、display_name、bio、follower_count、following_count、post_count。 - 用户内容
user_posts每千次 $0.56用户内容:返回列表,默认 30 条、单次最多 200 条;主要字段 post_id、url、text、media_type、like_count、comment_count。 - 内容发现
discover每千次 $0.56内容发现:返回列表,默认 30 条、单次最多 200 条;主要字段 post_id、url、text、media_type、like_count、comment_count。 - Reels 短视频
reels每千次 $1.19Reels 短视频:返回列表,默认 30 条、单次最多 100 条;主要字段 post_id、url、text、media_type、like_count、comment_count。 - 话题内容
hashtag每千次 $0.56话题内容:返回列表,默认 30 条、单次最多 100 条;主要字段 post_id、url、text、media_type、like_count、comment_count。 - 粉丝数量
followers每千次 $0.56粉丝数量:返回单个对象;主要字段 id、username、url、name、avatar_url、follower_count。 - 粉丝列表
followers_list每千次 $0.56粉丝列表:返回列表,默认 50 条、单次最多 500 条;主要字段 id、username、url、name、avatar_url、is_private。 - 关注列表
following_list每千次 $0.56关注列表:返回列表,默认 50 条、单次最多 500 条;主要字段 id、username、url、name、avatar_url、is_private。 - 账号搜索
user_search每千次 $4.81账号搜索:返回列表,默认 20 条、单次最多 30 条;主要字段 rank、username、user_id、display_name、is_verified、is_private。 - Reels 关键词搜索
reels_search每千次 $7.19Reels 关键词搜索:返回列表,默认 20 条、单次最多 200 条;主要字段 post_id、id、url、text、play_count、like_count。 - 相似账号
similar_profiles每千次 $8.81相似账号:返回列表,默认 20 条、单次最多 30 条;主要字段 rank、username、user_id、display_name、is_verified、is_private。 - 被标记的帖子
tagged_posts每千次 $7.44被标记的帖子:返回列表,默认 20 条、单次最多 200 条;主要字段 post_id、url、tagged_username、author_username、author_id、text。 - Stories 内容
stories每千次 $1.5Stories 内容:返回列表,默认 100 条、单次最多 100 条(传更大的数按 100 条返回);主要字段 id、url、media_url、media_type、duration_seconds、duration_sec。 - 精选合集
highlights每千次 $1.6精选合集:返回列表,默认 100 条、单次最多 100 条(传更大的数按 100 条返回);主要字段 id、url、title、media_count、cover_url、created_at。 - 评论回复
comment_replies每千次 $0.88评论回复:返回列表,每次一页、每页最多 10 条,条数不固定(短页不代表到底),要更多就把响应顶层的 next_page_token 作为 page_token 再调,没有 next_page_token 才是到底;limit 照收但不起作用;主要字段 id、text、like_count、posted_at、author_username、author_id。支持翻页:把响应里的 next_page_token 作为 page_token 传回拿下一页,其他参数不变,每页算一次调用。