Instagram 主页或对象详情 API

按 username 读一个 Instagram 账号的主页资料:bio、follower_count、following_count、post_count 和 external_url,每千次 $0.56。

Instagram 主页详情按 username 读回一个账号当下公开展示的原始资料,计数、标记和链接都照平台给的值返回,不附任何评语。它回答「这个账号现在是什么状况」,常用来给账号建档、隔一段时间记一次粉丝涨跌,或者在达人报价时拿对方报的数字和当场读数对照。账号名写不带 @ 的 handle,或整条主页地址。

简介区的第一个链接单独放在 external_url;highlight_count 数精选快拍有几个,has_reels 只说明发没发过 Reels。建档时先存下 user_id,它是账号在原平台的唯一 ID,和别的能力返回的记录对上靠它。认证标记读到空值是平台没法判定,档案里记成第三种状态,别归进未认证。

  • 失败和空结果不收费
  • 不用登录 Instagram
  • 结果在同一个响应里返回
免费开始

接口健康状态

24h 健康值
100%
24h 平均耗时
22.77 s
  • 健康 / 正常
  • 可用
  • 少量可用
  • 基本不可用
健康

24 小时趋势

30 天趋势

  1. 1请求

    POST /api/v1/social
    {
      "platform": "instagram",
      "action": "profile",
      "params": {
        "username": "nasa"
      }
    }
  2. 2JSON 响应

    {
      "results": {
        "username": "nasa",
        "display_name": "NASA",
        "bio": "Making the seemingly impossible, possible. ✨",
        "follower_count": 104336090,
        …
      }
    }
  3. 3字段

    usernamedisplay_namebiofollower_count
    nasaNASAMaking the seemingly impossible, possible. ✨104336090
  4. 4CSV

    instagram-profile-sample.csv username,display_name,bio,follower_count,following_count,post_count,is_private,is_verified,is_business,is_professional,category,external_url,avatar_url,user_id,avatar_hd_url,external_urls,has_reels,highlight_count,recent_posts

请求带 username,返回一个 JSON 对象,里面有 bio、follower_count 等字段,列成字段表,也可下载为 CSV。

能拿到什么数据

下表是对 nasa 的一次真实调用,采集于 2026年9月26日 16:56(UTC),返回一个对象;灰条是隐去的个人信息(CSV 里是 •••)。你自己调用时,按字段表返回这些字段。

usernamedisplay_namebiofollower_countfollowing_countpost_countis_privateis_verifiedis_businessis_professionalcategoryexternal_urlavatar_urluser_idavatar_hd_urlexternal_urlshas_reelshighlight_countrecent_posts
nasaNASAMaking the seemingly impossible, possible. ✨104336090894934falsetruefalsefalsenullhttps://www.nasa.govnullnullnullnullnull[{"post_id":"DdHyaYAifb6","url":"https://www.instagram.com/p/DdHyaYAifb6","text":"Cementing their names in history.\n\nThe Artemis III crew is leaving their mark — literally. The astronauts recently signed their names on the hardware that will be inside their Orion spacecraft during their low Earth orbit mission, launching in 2027.\n\nImage descriptions:\n\n1. The A…","media_type":"image","like_count":0,"comment_count":0,"view_count":0,"author_username":"nasa","posted_at":"2026-09-10T00:00:00+00:00"},{"post_id":"DdWyDLcGiqo","url":"https://www.instagram.com/p/DdWyDLcGiqo","text":"Southern Hemisphere Milky Way galaxy view from the @••• cupola. This 3s exposure series captured two of my favorite cupola views, the particularly dense Milky Way galaxy as seen from the Southern Hemisphere, and the bright, colorful lights of squid fishing boats (here, the brig…","media_type":"image","like_count":0,"comment_count":0,"view_count":0,"author_username":"•••","posted_at":"2026-09-16T00:00:00+00:00"},{"post_id":"DdT_4GMka0z","url":"https://www.instagram.com/p/DdT_4GMka0z","text":"In a class of their own\n\nHidden within this star-forming nebula (captured by our Webb telescope in one of its largest images to date) are strange objects called brown dwarfs. Generally less massive than stars and more massive than planets, they are neither. They form the same way…","media_type":"image","like_count":0,"comment_count":0,"view_count":0,"author_username":"•••","posted_at":"2026-09-15T00:00:00+00:00"}]

用途

  • 核对达人粉丝数

    把达人报的粉丝量和当场读到的 follower_count 对照。

  • 给账号建档

    存下 user_id、display_name 和 category,给每个账号建一份基础档案。

  • 记录粉丝涨跌

    按期读 follower_count、following_count 和 post_count,前后相减得出这段时间的变化。

  • 跟踪简介和外链

    对比前后两次的 bio 和 external_urls,看账号什么时候改了简介或落地页。

Instagram Graph API 与 EveryInfra 对比

下面从账号字段、能读哪些账号、访问条件三方面,比 Instagram 官方 Graph API 和 EveryInfra profile。

对比项Instagram Graph APIEveryInfra
账号字段字段 media_count:"Total number of IG Media published on your app user’s account."username、display_name、bio、follower_count、following_count、post_count、is_private、is_verified、category、external_url、recent_posts 等字段,在一个对象里返回。
能读哪些账号"The Instagram Platform is a collection of APIs that allows your app to access data for Instagram professional accounts, including business and creator accounts."username 指定的账号,写不带 @ 的 handle,或整条主页地址;返回 is_private、is_business、is_professional 标记。
访问条件访问令牌:"Required. App user’s User access token."一把 EveryInfra API Key 放在 Authorization: Bearer 请求头里,不用登录 Instagram,也不用 Instagram 访问令牌。

引文出自 Meta 开发者文档,2026-11-09 核对。 官方出处: IG User (更新于 2026-04-22) · Instagram Platform overview (更新于 2026-10-29)

限制和注意事项

  • username 必填,写不带 @ 的 handle,或整条主页地址。
  • follower_count、following_count、post_count 为 null 表示账号没公开,不等于 0。
  • is_verified 为 null 表示无法判定。
  • is_verified、is_business、is_professional 只是账号标记,不能证明身份、收入或当前的商业活动。
  • avatar_url 是图片链接,带尺寸参数的 CDN 链接可能过期。
  • 一次调用读一个账号,返回一个对象。

价格

每次调用 $0.000556,按次计费,不按字段多少算;一次调用读一个账号。失败和空结果不收费。

调用次数费用
10,000$5.56
100,000$55.56
1,000,000$555.56

合计按每次调用的标价算。

代码示例

#
bash
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": "profile",
  "params": {
    "username": "nasa"
  }
}'

OpenAPI 定义 (JSON)示例从环境变量 EVERYINFRA_API_KEY 读取 Key,复制出去的代码不含你的 Key。

API 参考

下面是 profile 的参数、响应字段、错误和计费,可以复制整页,或用 Markdown 打开后交给 AI 助手。

POST

AI 提示词

#
请帮我用 EveryInfra 的「Instagram 主页或对象详情」接口(instagram/profile)写一个数据采集脚本。

接口约定:
- 请求:POST https://api.everyinfra.com/api/v1/social,请求头 Authorization: Bearer <API Key>;Key 从环境变量 EVERYINFRA_API_KEY 读取,不要写进代码。
- 请求体里 platform 填 instagram,action 填 profile,参数放在 params 里。
- 必填参数:
  - username:Instagram 账号 handle,建议不带 @ 或完整主页 URL。profile/persona/user_posts/reels 查询账号数据。
- 返回一个对象,主要字段:username、display_name、bio、follower_count、following_count、post_count、is_private(是否私密账号)、is_verified、is_business(是否为商家账号)、is_professional(是否为专业账号(商家或创作者))、category、external_url(主页外链);一共 19 个字段,完整列表见 https://api.everyinfra.com/api/v1/social/catalog?platform=instagram。
- 示例请求体:
{
  "platform": "instagram",
  "action": "profile",
  "params": {
    "username": "nasa"
  }
}
- 计费:$0.56 / 千次;失败和空结果不扣费。
- 一次要采几十上百个时,在请求体加 "mode": "async":先拿到 job_id,再轮询 GET https://api.everyinfra.com/api/v1/jobs/{job_id} 取结果。
- 返回 422 时,按错误信息里的候选参数和允许值修正;返回 429 或 503 时,按 Retry-After 等待后重试。

写代码前,先问清楚我要采哪些对象、一共多少个、需要哪些字段、结果存成什么格式,再把方案和大概花费讲给我确认。

请求参数

#
参数名位置类型必填默认值说明
Authorizationheaderstring是-Bearer 加你的 API Key。在控制台创建;不要放进网址或代码仓库。
platformbodystring是instagram平台标识,固定值。
actionbodystring是profile能力标识,固定值。
usernamebody.paramsstring是-Instagram 账号 handle,建议不带 @ 或完整主页 URL。profile/persona/user_posts/reels 查询账号数据;followers 只查粉丝数量,followers_list/following_list 才查粉丝/关注账号列表。

响应示例

#
2026年9月26日 16:56(北京时间)用上方代码示例的参数真实调用所得。results 与 count 是那次的真实返回,已隐去名字、账号、头像、主页链接、联系方式等个人信息;id、billing、quota 每次调用都不同,只给结构。
json
{  "id": "req_…",  "platform": "instagram",  "action": "profile",  "results": {    "username": "nasa",    "display_name": "NASA",    "bio": "Making the seemingly impossible, possible. ✨",    "follower_count": 104336090,    "following_count": 89,    "post_count": 4934,    "is_private": false,    "is_verified": true,    "is_business": false,    "is_professional": false,    "external_url": "https://www.nasa.gov",    "avatar_url": "https://scontent-mad1-1.cdninstagram.com/•••",    "recent_posts": [      {        "post_id": "DdHyaYAifb6",        "url": "https://www.instagram.com/p/DdHyaYAifb6",        "text": "Cementing their names in history.\n\nThe Artemis III crew is leaving their mark — literally. The astronauts recently signed their names on the hardware that will be inside their Orion spacecraft during their low Earth orbit mission, launching in 2027.\n\nImage descriptions:\n\n1. The A…",        "media_type": "image",        "like_count": 0,        "comment_count": 0,        "view_count": 0,        "author_username": "nasa",        "posted_at": "2026-09-10T00:00:00+00:00"      },      {        "post_id": "DdWyDLcGiqo",        "url": "https://www.instagram.com/p/DdWyDLcGiqo",        "text": "Southern Hemisphere Milky Way galaxy view from the @••• cupola. This 3s exposure series captured two of my favorite cupola views, the particularly dense Milky Way galaxy as seen from the Southern Hemisphere, and the bright, colorful lights of squid fishing boats (here, the brig…",        "media_type": "image",        "like_count": 0,        "comment_count": 0,        "view_count": 0,        "author_username": "•••",        "posted_at": "2026-09-16T00:00:00+00:00"      },      {        "post_id": "DdT_4GMka0z",        "url": "https://www.instagram.com/p/DdT_4GMka0z",        "text": "In a class of their own\n\nHidden within this star-forming nebula (captured by our Webb telescope in one of its largest images to date) are strange objects called brown dwarfs. Generally less massive than stars and more massive than planets, they are neither. They form the same way…",        "media_type": "image",        "like_count": 0,        "comment_count": 0,        "view_count": 0,        "author_username": "•••",        "posted_at": "2026-09-15T00:00:00+00:00"      }    ]  },  "billing": {    "charged": …,    "charged_usd": …,    "balance_after_usd": …,    …  },  "quota": { … }}

返回字段

#

业务数据在 results 里;下表是每条记录可能包含的字段,平台没有提供的值不会被编造。

字段含义
username用户名(@handle)。
display_name显示名,可能与 username 不同。
bio个人简介,账号自己填写的文本。可能含换行和 emoji。
follower_count粉丝数。null 表示不公开,不等于 0。
following_count关注数。null 表示不公开,不等于 0。
post_count发布内容总数。null 表示不公开,不等于 0。
is_private是否私密账号。
is_verified是否为平台认证账号(蓝V等)。null 表示无法判定。
is_business是否为商家账号。
is_professional是否为专业账号(商家或创作者)。
category分类名称,取值为原平台的分类体系,未做跨平台归一。
external_url主页外链。
avatar_url头像图片链接。部分平台给的是带尺寸参数的 CDN 链接,可能有时效。
user_id用户在原平台的唯一 ID。
avatar_hd_url高清头像链接(avatar_url 是小图)。
external_urls简介里的全部外链:url、title(external_url 只是第一个)。
has_reels是否发过 Reels。
highlight_count精选快拍(Highlights)个数。
recent_posts保留平台原语义

错误与计费

#
401
缺少 Key 或 Key 无效。
402
余额不足,先充值。
422
参数名或取值不对,按错误信息给的候选改;不扣费。
429
超过每分钟请求上限,按 Retry-After 等待后再试。
503
暂时无法完成,预扣的费用退回;结果未知时先核对,不要直接重发。
200 空结果
没有数据,不扣费。

错误码

常见问题

只做存档和涨粉记录,需要换成账号画像吗?

不需要。两边回来的主页字段一模一样,画像只是外加模型写的行业归属、细分方向、真实性评语和概述。存档要的是平台原样给出的数,主页详情足够。核对报价也是这个道理:对方报的粉丝量和这里读到的数差得远,直接拿读数说话,截图日期和读取时刻一并记下。专业账号标记为真、商家标记为假的就是创作者号,分账号类型靠这两项即可;category 用的是 Instagram 自己的分类体系,没做跨平台归一,和别家平台的档案合并时单独放一列。

按期记录粉丝涨跌,快照里该存哪些值?

每次用同一个账号名读一遍,把粉丝、关注、发帖三项计数和读取时刻写成一行快照,两行相减就是这段时间的增减;发帖数的差值还能折算出这期间的更新频率。计数读到空值说明对方没公开,那一格留空,别记成零,否则下一期会算出一次凭空暴涨。精选快拍个数和 Reels 标记也值得每期记一笔,后者从假变真的那一期,就圈出了这个号开始发 Reels 的时间段;显示名 display_name 也记进快照,对方改名那一期就能看出来。隔多久读一次,按你关心的变化粒度定。

账号改了简介或外链,怎么从前后两期快照里看出来?

把 bio 和 external_urls 也放进快照,逐期比对。简介是账号自己写的,可能夹着换行和表情符号,先统一换行再比,免得误报。Instagram 简介里可以放多个链接,外链列表把每一个连同标题都列出来,external_url 只取第一个;看达人把粉丝引去哪里、哪天换了落地页,以完整列表为准。小头像链接可能过期,要留底就当场下载高清版 avatar_hd_url。最近的帖子在 recent_posts 里,入档前先拿一条真实返回看清结构。

Instagram 账号资料接口能返回哪些字段?

返回一个对象:username、display_name、bio、follower_count、following_count、post_count、is_private、is_verified、category、external_url、avatar_url、user_id、recent_posts 等。

一次调用能查几个账号?

一个。username 填一个账号,返回一个对象,所以没有 limit,也没有翻页。

读一次主页资料要多少钱?

每次 $0.000556,每千次 $0.56,按调用次数算,不按字段多少算。失败和空结果不收费。

读 Instagram 主页资料要登录 Instagram 吗?

不用。请求头里放一把 EveryInfra API Key(Authorization: Bearer),请求只带 username,不用登录 Instagram,也不用 Instagram 访问令牌。

profile 和 persona、followers 有什么区别?

persona 返回同样的主页字段,再多一个 AI 写的画像对象。followers 只返回粉丝数、关注数和 id、名称、头像、链接。profile 返回完整的主页资料,不加评语。

同一把 Key 还能调用 Instagram 的其他能力。

自有访问统计常开;Google Analytics 仅在你点「同意分析」后启用。 隐私政策