Instagram 话题内容 API
一个话题标签(hashtag)下的帖子,同步返回 text、media_type、like_count、view_count 和作者粉丝数,每千次 $0.56。
Instagram 话题内容按 hashtag 列出一个话题标签下的帖子,每条带链接、正文、媒体类型、点赞评论和浏览数、作者用户名与昵称、发布时间、地点,以及正文里的话题数组 hashtags 和展示的几条评论 top_comments。它回答「这个话题下大家在发什么、哪些互动高」,适合选题调研、活动话题监测和寻找在这个话题里发帖的创作者。
hashtag 不带 #,例如 photography,列的是标签下的内容,不是账号。默认返回 30 条,单次最多 100 条。author_follower_count 直接给出发帖人的粉丝数,null 表示不公开;is_comments_disabled 标出帖子是否关了评论。
- 一次最多 100 条
- 传
reels取短视频 - 不用登录 Instagram
接口健康状态
- 24h 健康值
- 55%
- 24h 平均耗时
- 14.60 s
- 健康 / 正常
- 可用
- 少量可用
- 基本不可用
24 小时趋势
30 天趋势
1请求
POST /api/v1/social { "platform": "instagram", "action": "hashtag", "params": { "hashtag": "photography" } }2JSON 响应
{ "results": [ { "text": "📸@••• @••• @••• #photography #hobbymodel #jewelry #tattoo #quarry", "post_id": "DdvvbQ1ufeL", "media_type": "image", "like_count": 0 }, … ], "count": 30 }3表格行
text post_id media_type like_count 📸@••• @••• @••• #photography #hobbymodel #jewelry #tattoo #quarry DdvvbQ1ufeL image 0 ✨..♠️❤️..✨ #instareels #viralpost #malvan #instagram #photography Ddvva9EEUmp image 0 4CSV
instagram-hashtag-sample.csv post_id,url,text,media_type,like_count,comment_count,view_count,author_username,author_name,posted_at,location,id,image_url,video_url,author_id,width,height,is_comments_disabled,author_follower_count,hashtags,top_comments,platform
hashtag(不带 #)和可选的 results_type、limit,同一个响应里回来这个标签下的帖子行,再变成表格行和 CSV。能拿到什么数据
表里是一次真实调用的结果:话题 photography,2026年9月26日 16:56(UTC)采集,返回 30 条;灰条是隐去的个人信息(CSV 里是 •••)。你自己调用时,按字段表返回这些字段。
| post_id | url | text | media_type | like_count | comment_count | view_count | author_username | author_name | posted_at | location | id | image_url | video_url | author_id | width | height | is_comments_disabled | author_follower_count | hashtags | top_comments | platform |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DdvvbQ1ufeL | https://www.instagram.com/p/DdvvbQ1ufeL/ | 📸@••• @••• @••• #photography #hobbymodel #jewelry #tattoo #quarry | image | 0 | 0 | null | 2026-09-26T09:43:53+00:00 | Aschaffenburg, Germany | null | null | null | null | null | null | null | null | ["photography","hobbymodel","jewelry"] | null | |||
| Ddvva9EEUmp | https://www.instagram.com/p/Ddvva9EEUmp/ | ✨..♠️❤️..✨ #instareels #viralpost #malvan #instagram #photography | image | 0 | 0 | null | 2026-09-26T09:43:48+00:00 | Malvan , Sindhudurg | null | null | null | null | null | null | null | null | ["instareels","viralpost","malvan"] | null |
用途
选题调研
读一个话题下的
text和like_count,看大家在发什么、哪些互动高。活动话题监测
为活动标签取帖,按
posted_at看新发了什么。寻找创作者
读
author_username和author_follower_count,找在这个话题里发帖的创作者。只看短视频
把
results_type设为reels,只取这个话题下的 Reels。
Hashtag Search 与 EveryInfra 对比
下面从查询量、每次条数和作者字段三方面比 Instagram 官方 Hashtag Search 和 EveryInfra hashtag。
| 对比项 | Hashtag Search | EveryInfra |
|---|---|---|
| 查询量 | "You can query a maximum of 30 unique hashtags on behalf of an Instagram Business or Creator Account within a rolling, 7 day period." | 一次调用查一个 hashtag,按次计费,每次 $0.000556。 |
| 每次条数 | "Responses are paginated with a maximum limit of 50 results per page." | limit 取 1 到 100,默认 30;一次调用最多 100 条,没有翻页参数。 |
| 作者字段 | "You cannot request the username field on returned media objects." | 每行带 author_username、author_name 和 author_follower_count。 |
引文出自 Meta 开发者文档,2026-11-09 核对。 官方出处: Hashtag Search (更新于 2026-08-17) · IG Hashtag Top Media (更新于 2026-08-17)
限制和注意事项
hashtag必填,不带 #,填标签词而不是账号 handle;tag是兼容写法,两个都传时以hashtag为准。results_type省略时取普通帖子,传reel或reels取短视频;不能显式传 posts,其他值返回 422。limit是 1 到 100 的整数,默认 30;超出范围返回 422,不扣费。- 没有翻页参数,一次调用最多 100 条,可能少于
limit。 - 返回的只是这个话题下的一批帖子,不能单独衡量趋势的总量。
author_follower_count、view_count为null表示不公开,不等于 0;hashtags、top_comments没有内容时整个字段不出现。
价格
每次调用 $0.000556,按次不按条,一次最多读 100 条。失败和空结果不收费。
| 调用次数 | 费用 |
|---|---|
| 10,000 | $5.56 |
| 100,000 | $55.56 |
| 1,000,000 | $555.56 |
合计按每次调用的标价算。
代码示例
#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": "hashtag",
"params": {
"hashtag": "photography"
}
}'OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。
API 参考
下面是 hashtag 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开给 AI 助手。
AI 提示词
#请帮我用 EveryInfra 的「Instagram 话题内容」接口(instagram/hashtag)写一个数据采集脚本。
接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 instagram,action 填 hashtag,参数放在 params 里。
- 必填参数:
- hashtag:Instagram 话题标签,不带 #,例如 coffee;用于列该标签下的 posts/reels,不是账号 handle。
- 可选参数:
- results_type:discover/hashtag 省略此参数时返回 posts(普通帖子);显式传参只接受 reel 或 reels,均切换到短视频结果。(可选值:reel / reels)
- tag:hashtag 的兼容输入,去掉开头 #;hashtag 同时存在时优先 hashtag,公开请求仍须提供必填 hashtag。
- limit:这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。(默认 30)
- 返回一组记录,每条记录的主要字段:post_id(帖子 ID)、url、text、media_type(媒体类型(图/视频/轮播))、like_count、comment_count、view_count、author_username、author_name、posted_at、location、id;一共 21 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=instagram。
- 示例请求体:
{
"platform": "instagram",
"action": "hashtag",
"params": {
"hashtag": "photography"
}
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "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 | 是 | hashtag | 能力标识,固定值。 |
hashtag | body.params | string | 是 | - | Instagram 话题标签,不带 #,例如 coffee;用于列该标签下的 posts/reels,不是账号 handle。 |
results_type | body.params | string (enum) | 否 | - | discover/hashtag 省略此参数时返回 posts(普通帖子);显式传参只接受 reel 或 reels,均切换到短视频结果。posts 不是可显式提交的枚举值,其他显式值也会在公开 API 参数校验阶段返回 422;该参数不是 JSON/CSV 输出格式选择。允许值reelreels |
tag | body.params | string | 否 | - | hashtag 的兼容输入,去掉开头 #;hashtag 同时存在时优先 hashtag,公开请求仍须提供必填 hashtag。 |
limit | body.params | integer (1–100) | 否 | 30 | 这次调用最多返回的条数,整数,1–100;不传按默认值,实际返回可能少于这个数。超过上限会在扣费前返回 422。 |
响应示例
#{ "id": "req_…", "platform": "instagram", "action": "hashtag", "results": [ { "post_id": "DdvvbQ1ufeL", "url": "https://www.instagram.com/p/DdvvbQ1ufeL/", "text": "📸@••• \n\n@••• \n@••• \n\n#photography #hobbymodel #jewelry #tattoo #quarry", "media_type": "image", "like_count": 0, "comment_count": 0, "author_username": "•••", "author_name": "•••", "posted_at": "2026-09-26T09:43:53+00:00", "location": "Aschaffenburg, Germany", "hashtags": [ "photography", "hobbymodel", "jewelry" ], "platform": "instagram" }, { "post_id": "Ddvva9EEUmp", "url": "https://www.instagram.com/p/Ddvva9EEUmp/", "text": "✨..♠️❤️..✨\n\n#instareels #viralpost #malvan #instagram #photography", "media_type": "image", "like_count": 0, "comment_count": 0, "author_username": "•••", "author_name": "•••", "posted_at": "2026-09-26T09:43:48+00:00", "location": "Malvan , Sindhudurg", "hashtags": [ "instareels", "viralpost", "malvan" ], "platform": "instagram" } ], "count": 30, "billing": { "charged": …, "charged_usd": …, "balance_after_usd": …, … }, "quota": { … }}
返回字段
#业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。
| 字段 | 含义 |
|---|---|
post_id | 帖子 ID。 |
url | 该记录在原平台上的可访问链接。 |
text | 正文内容,已去除 HTML 标签,全文返回、不截断(个别平台的列表结果本身只有摘要,以该平台的字段说明为准)。 |
media_type | 媒体类型(图/视频/轮播)。 |
like_count | 点赞数。null 表示该平台或该接口不公开此数据,不等于 0。 |
comment_count | 评论数。null 表示不公开,不等于 0。 |
view_count | 浏览/播放数。null 表示不公开,不等于 0。 |
author_username | 作者用户名(@handle),通常可用于拼 URL。 |
author_name | 作者昵称(显示名)。 |
posted_at | 发布时间,ISO 8601 格式、UTC 时区(如 2026-08-07T12:34:56+00:00)。平台只给非标准字符串时原样透传,解析前建议做容错。null 表示平台未公开。 |
location | 地理位置描述,原文透传,格式随平台而异。 |
id | 该记录在原平台上的唯一标识。仅在同一平台内唯一,跨平台可能重复。 |
image_url | 图片链接。多图能力可能返回 image_urls 数组。 |
video_url | 保留平台原语义 |
author_id | 作者在原平台的唯一 ID。 |
width | 保留平台原语义 |
height | 保留平台原语义 |
is_comments_disabled | 帖子是否关闭评论。 |
author_follower_count | 作者粉丝数。null 表示不公开。 |
hashtags | 正文里的话题标签数组,按出现顺序;没有时不出现这个字段。 |
top_comments | 帖子下展示的几条评论,每项含正文(text)和评论人(author_username);没有时不出现这个字段。 |
platform | 数据来源平台标识,与请求里的 platform 一致(如 xiaohongshu、tiktok)。 |
错误与计费
#- 401
- 缺少 Key 或 Key 无效。
- 402
- 余额不足,先充值。
- 422
- 参数名或取值不对,按错误信息给的候选改;不扣费。
- 429
- 超过每分钟请求上限,按 Retry-After 等待后再试。
- 503
- 暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
- 200 空结果
- 没有数据,不扣费。
常见问题
话题内容怎么只看 Reels?
给 results_type 传 reel 或 reels,两个值都会切换到短视频结果;不传这个参数,返回的就是普通帖子。普通帖子不能显式提交,写 posts 或其他任何值,公开接口在参数校验阶段都会返回 422。
hashtag 和 tag 该填哪一个?
填 hashtag,不带 #。tag 是它的兼容写法,同样要去掉开头的 #;两个都传时以 hashtag 为准,而且公开请求里 hashtag 仍然必填,只传 tag 过不了校验。
话题内容和单条内容那一页怎么分工?
话题内容是发现用的:给一个标签,返回一批帖子。手里已经有具体帖子链接时,用单条内容那一页,传链接数组读指定的帖子。两页的字段基本一致,所以可以先在这里发现,再用 url 到那一页补读。
Instagram 话题标签 API 返回什么?
返回标签下的帖子:text、media_type、like_count、view_count、author_follower_count,有就带 hashtags。
一次最多取多少条?怎么只看 Reels?
limit 取 1 到 100,默认 30,没有翻页参数。要 Reels,就把 results_type 设为 reel 或 reels;不传则是普通帖子。
取话题内容要花多少钱?
每千次调用 $0.56,每次 $0.000556,按次不按条。失败和空结果不收费。
取话题内容要登录 Instagram 吗?
不用。请求头里放一把 EveryInfra API Key(Authorization: Bearer),不需要 Instagram 登录,也不需要 Instagram 访问令牌。
hashtag 和 discover 有什么区别?
两者都按标签取帖子。话题内容(hashtag)用 hashtag,同步返回,一次最多 100 条;内容发现(discover)用 keyword,先返回 job_id,一次最多 200 条。
相关的 Instagram 能力
同一把 Key 还能调 Instagram 的其他能力,比如按链接读帖子,或读某个账号的 Reels。
- 单条内容
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。 - 评论
comments每千次 $0.79评论:返回列表,默认 50 条、单次最多 100 条;主要字段 id、text、url、like_count、reply_count、author_username。 - Reels 短视频
reels每千次 $1.19Reels 短视频:返回列表,默认 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 传回拿下一页,其他参数不变,每页算一次调用。