# Facebook 主页或对象详情 API (facebook.profile)

- Canonical page: https://everyinfra.com/facebook-api/profile
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "facebook", "action": "profile", "params": {...}}
- Price: $0.002778 per call ($2.78 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: async by default (202 + job_id, poll GET /api/v1/jobs/{job_id})

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| url | not declared | yes | not declared | 按接口传目标：profile/user_posts 传公开主页，post/comments 传帖子，group_posts 传群组主页或群组标识，reviews 传商家主页（会补 /reviews）。不是任意 Facebook 链接均可用于所有接口。 |

## 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）。 |

## 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": "profile",
  "params": {
    "url": "https://www.facebook.com/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": "profile",
        "params": {
            "url": "https://www.facebook.com/nasa",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-10-24T18:28:34Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "facebook",
  "action": "profile",
  "results": {
    "id": "•••",
    "name": "NASA - National Aeronautics and Space Administration",
    "url": "https://www.facebook.com/nasa",
    "bio": "Explore the universe and discover our home planet. \nThere's space for everybody. ✨",
    "category": [
      "Page",
      "Government organization"
    ],
    "like_count": 0,
    "follower_count": 28743710,
    "email": "•••",
    "website": "https://www.nasa.gov/nasa-app/",
    "avatar_url": "https://scontent-iad3-2.xx.fbcdn.net/•••",
    "platform": "facebook"
  },
  "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
