登录开始免费试用
easyCoexistence 官方 API

通过 API 获取 Instagram 粉丝数和个人资料字段

Instagram API 在 followers_count 字段中返回专业账户的粉丝数,同时返回 follows_count、media_count、username、name、profile_picture_url 和 account_type。使用 Instagram Login 时,以 instagram_business_basic 权限对 graph.instagram.com 发起 GET /me 请求并带上这些字段即可读取。Meta 的 IG User 参考文档还列出了 biography 和 website,粉丝数随时间的变化则来自洞察数据。

easyCoexistence 通过 Instagram Login 连接 Instagram 商业或创作者账户,因此 Claude、ChatGPT 或您自己的代码可通过 get_social_insights 读取触达、观看和关注数据,数据来源为 Meta 官方 API;个人资料上的粉丝数和帖子数没有对应的工具。

followers_count

关注该账户的 Instagram 用户总数,Meta 的 IG User 参考文档将其标记为公开字段。

9 fields

Meta 的 Instagram Login 指南列出的 User 字段,从 id 和 user_id 到 followers_count 和 media_count。

Media_Creator

创作者账户的 account_type 值为 Creator;商业账户返回 Business。

100 followers

低于此数值时,Meta 不会为该账户返回 follows_and_unfollows 或 follower_count 洞察数据。

Instagram Login 会返回哪些个人资料字段?

Meta 的 Instagram Login 指南为 User 对象列出了九个字段,通过 GET /me 并附带 fields 列表读取。访问令牌需要 instagram_business_basic 权限,之后的调用中,账户的 IG_ID 应使用 user_id 而非 id:

idThe app user's app-scoped ID
user_idThe professional account's ID, the id in its webhook notifications
usernameThe account's username
nameThe profile name
account_typeBusiness or Media_Creator
profile_picture_urlThe profile picture's URL
followers_countAccounts following it
follows_countAccounts it follows
media_countMedia published on the account

如何读取粉丝数?

在 /me 上请求 followers_count。Meta 的参考文档将其对应到令牌所属账户的 User 节点。该数值是调用时刻的累计总数,因此若控制台需要绘制趋势图,必须自行每天保存一次读数。

Counts and username with Instagram Login
GET https://graph.instagram.com/me
  ?fields=user_id,username,followers_count,follows_count,media_count
  &access_token=<ACCESS_TOKEN>

{
  "user_id": "<IG_ID>",
  "username": "<USERNAME>",
  "followers_count": 1840,
  "follows_count": 312,
  "media_count": 97
}

Meta 的参考文档还列出了哪些其他字段?

Meta 的 IG User 参考文档适用于三种设置,在 Instagram Login 指南列出的九个字段之外又增加了其他字段。其中部分字段标注为可用于由 Page 支持的账户,其余字段则未标注登录说明:

  • biography:个人资料的简介文本,标记为公开。
  • website:账户的网站 URL,标记为公开。
  • has_profile_pic:账户是否设置了头像。
  • is_published 和 legacy_instagram_user_id:适用于由 Page 支持的账户,后者是为 Marketing API 端点(直至 v21.0)生成的 ID。
  • shopping_product_tag_eligibility:账户是否已设置 Instagram 商店。

如何追踪粉丝增长?

通过账户洞察数据,而非个人资料。调用 GET /<IG_ID>/insights,指定 metric=follows_and_unfollows、metric_type=total_value 以及 follow_type 细分维度,即可返回新增关注,以及取消关注或离开 Instagram 的账户。使用 Instagram Login 时,令牌还需要 instagram_business_manage_insights 权限。只有粉丝数至少为 100 的账户,Meta 才会返回该数据和 follower_count。

API 能列出粉丝是谁吗?

不能。Meta 的 IG User 参考文档将 followers_count 和 follows_count 作为数字返回,没有列出可返回背后账户的边(edge)。它提供的是账户洞察中的 follower_demographics,可按年龄、城市、国家或性别细分,但仅适用于粉丝数至少为 100 的账户。

能读取其他账户的粉丝数吗?

可以,通过 Business Discovery。该功能由 Meta 随 Facebook Login 和 Unified Login 提供:GET /<IG_ID>?fields=business_discovery.username(<USERNAME>){followers_count,media_count} 即可返回另一个商业或创作者账户的数据。它读取的是对方的公开字段,即 IG User 参考文档标记为公开的字段,其中包括 biography、followers_count、id、media_count、username 和 website。

如何通过 easyCoexistence 读取个人资料?

list_social_accounts 返回每个已连接账户的 username、name 和 external_id,其中 external_id 即为 IG_ID。个人资料上的计数 followers_count、follows_count 和 media_count 没有对应的工具,Instagram 令牌也不会交给您;get_social_insights 则改为读取受众的变化情况,包括 follows_and_unfollows、reach 和 views。

常见错误

  • 以为能获取粉丝名单。Meta 返回的是数量;粉丝数达到 100 后还可返回人口统计数据,但不会返回账户本身。
  • 仅用 followers_count 绘制增长。该字段是累计总数;洞察数据中的 follows_and_unfollows 可区分新增关注与取消关注。
  • 用 CREATOR 判断 account_type。创作者账户返回 Creator,商业账户返回 Business。
  • 将 /me 返回的 id 当作账户 ID 使用。Meta 的指南将 user_id 而非 id 与 Webhook 通知以及 /<IG_ID>/media 等路径关联起来。
使用 EasyCoexistence 完成这些操作

每个连接每月 US$ 9 起,随连接增加最低降至 US$ 0.75,并享有前 3 天免费试用。

常见问题

Instagram API 会返回个人简介吗?

是的,以 biography 字段返回,Meta 的 IG User 参考文档将其标为公开。Instagram Login 指南列出的九个 User 字段未包含它,因此请在 GET /me 中请求该字段,并在您的设置中检查响应。

为什么 follows_and_unfollows 没有返回数据?

粉丝数少于 100 的账户,Meta 不会返回该数据。

能获取个人账户的粉丝数吗?

不能。Meta 的 API 服务于专业账户,Business Discovery 只能读取商业和创作者账户。

读取粉丝数需要哪项权限?

使用 Instagram Login 时需要 instagram_business_basic。粉丝洞察数据还需添加 instagram_business_manage_insights。

继续阅读

两分钟连接您的第一个渠道。

无需等待平台审核。连接 WhatsApp、Instagram、TikTok 或其他渠道,然后让您的 AI 发布、回复或生成报告,看它如何运作。

  • 免费试用 3 天
  • 随时取消
  • 仅使用官方 API
  • 全天候 24/7 监控

验证时间