# Instagram 批量查账号 API (instagram.profiles_batch)

- Canonical page: [https://everyinfra.com/instagram-api/profiles_batch](https://everyinfra.com/instagram-api/profiles_batch?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "instagram", "action": "profiles_batch", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Billing unit: each element in `usernames` counts as one call; the number of elements you send sets the charge
- Returns: list
- Mode: sync only; everything it returns (every target of a batch, or every SKU of a product) is read in one call, and "mode": "async" returns 422 before any charge

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=instagram&action=profiles_batch

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| usernames | not declared | yes | not declared | 要查的 Instagram 账号，数组，一次最多 20 个，不收逗号分隔的字符串；同一个账号只能出现一次（大小写不同算同一个）。每项可以是用户名（如 natgeo，前面的 @ 会去掉）或主页链接。按账号个数计费；没查到的账号不收费，列在响应的 missed 里。 |
| limit | integer (1–) | no | not declared | 这次调用最多返回的条数，整数，至少为 1；不传按默认值，实际返回可能少于这个数。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| 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 | 主页上最新的几条帖子（含置顶帖），数组，每项是一条帖子，字段和 user_posts 的一行相同（有值才出现）。私密账号或没发过帖时不出现。 |
| url | 该记录在原平台上的可访问链接。 |
| reels_count | 这个账号发过的 Reels 条数（整数）。 |
| business_email | 商家账号在主页「联系」（Contact）按钮里公开的邮箱。没有时不出现。 |
| business_phone | 商家账号在主页「联系」（Contact）按钮里公开的电话。没有时不出现。 |
| threads_username | 主页上 Threads 徽章显示的名字，一般就是这个人的 Threads 用户名。 |
| fbid | Meta 给这个账号的另一个数字编号，和 user_id 不是同一个数。 |
| is_memorialized | 是纪念账号（本人去世后 Instagram 设成的纪念状态）。只在是纪念账号时出现，值为 true。 |
| is_joined_recently | 主页上标着「最近加入」（Joined recently）。只在有这个标记时出现，值为 true。 |
| account_type | 账号类型：personal 个人、business 商家、creator 创作者。 |
| emails | 联系邮箱列表（一条记录可能有多个），原文透传、去重。 |
| phones | 本人公开写在简介里的电话号码，数组。只收以 + 或 00 开头的号码，或者前面写明 WhatsApp、电话这类字样的号码。没有时不出现。 |
| pronouns | 主页上填写的人称代词，数组。 |
| bio_links_detail | 简介区的每个链接，一个链接一项：url（真实地址，已去掉 Instagram 包的那层跳转）、title（链接标题，有的才带）、type（Instagram 给的链接类型，如 external）。external_urls 是同一批链接的 url 和 title。 |
| messaging_ids | 简介里公开写的聊天账号，一个账号一项 {app, id}；app 如 wechat、line、telegram、kakao、skype、signal。 |
| business_address | 商家账号公开的地址，对象：street、city、zip、lat、lng，有的才带。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| input | （profiles_batch）这一行对应 usernames 里的哪一项，按你传的写法原样带回。用它把行和你传的项对上；返回的 username 可能和你传的写法不同，比如你传的是主页链接。 |

## Example

```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": "profiles_batch",
  "params": {
    "usernames": [
      "natgeo",
      "nasa"
    ]
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "instagram",
        "action": "profiles_batch",
        "params": {
            "usernames": [
                "natgeo",
                "nasa",
            ],
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "instagram",
  "action": "profiles_batch",
  "results": [
    {
      "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": …,
      "url": …,
      "reels_count": …,
      "business_email": …,
      "business_phone": …,
      "threads_username": …,
      "fbid": …,
      "is_memorialized": …,
      "is_joined_recently": …,
      "account_type": …,
      "emails": …,
      "phones": …,
      "pronouns": …,
      "bio_links_detail": …,
      "messaging_ids": …,
      "business_address": …,
      "platform": …,
      "input": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=instagram
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
