# Facebook 批量查主页 API (facebook.profiles_batch)

- Canonical page: [https://everyinfra.com/facebook-api/profiles_batch](https://everyinfra.com/facebook-api/profiles_batch?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "facebook", "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=facebook&action=profiles_batch

## Parameters

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

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | 该记录在原平台上的唯一标识。仅在同一平台内唯一，跨平台可能重复。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| category | 分类名称，取值为原平台的分类体系，未做跨平台归一。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| phone | 联系电话，原文透传，未做号码格式归一。 |
| email | 邮箱（主页公开信息）。 |
| website | 账号或商家填写的外链网址。 |
| rating | 评分。**分制随平台而异**，同一行的 `rating_scale` 给出该平台满分 (多数是 5，Booking/豆瓣/爱奇艺/NAVER 是 10)。跨平台比较前必须先按 rating_scale 换算。直接比数字会得出反的结论。 |
| rating_scale | 上一列 `rating` 的满分。5 表示五星制、10 表示十分制。只在该行有 rating 时出现。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| input | 这一行对应你传的哪一项，按你传的写法原样带回：profiles_batch 是 usernames 里的一项，posts_batch 是 urls 里的一项。用它把行和你传的项对上；返回的 url、id 可能和你传的写法不同，比如你传的是主页链接，返回的是主页 ID，你传的是短链，返回的是帖子的完整链接。 |

## 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": "facebook",
  "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": "facebook",
        "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": "facebook",
  "action": "profiles_batch",
  "results": [
    {
      "id": …,
      "name": …,
      "url": …,
      "bio": …,
      "category": …,
      "like_count": …,
      "follower_count": …,
      "is_verified": …,
      "phone": …,
      "email": …,
      "website": …,
      "rating": …,
      "rating_scale": …,
      "avatar_url": …,
      "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=facebook
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
