# B站 主页或对象详情 API (bilibili.profile)

- Canonical page: https://everyinfra.com/bilibili-api/profile
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "bilibili", "action": "profile", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: single object
- Mode: sync; add "mode": "async" for slow tasks

## Health

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

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| user_id | not declared | yes | not declared | B 站 UP 主的数字 mid，即 https://space.bilibili.com/<mid> 中的数字。将数字放入 user_id，不要把昵称、BV 号或整个主页链接填入这个参数。 |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| user_id | 用户在原平台的唯一 ID。 |
| name | 名称。用于账号/商品/商家类能力，指该对象本身的名字。 |
| url | 该记录在原平台上的可访问链接。 |
| bio | 个人简介，账号自己填写的文本。可能含换行和 emoji。 |
| avatar_url | 头像图片链接。部分平台给的是带尺寸参数的 CDN 链接，可能有时效。 |
| gender | 性别。 |
| level | 用户等级（0–6）。 |
| follower_count | 粉丝数。null 表示不公开，不等于 0。 |
| following_count | 关注数。null 表示不公开，不等于 0。 |
| video_count | 视频数。 |
| like_count | 点赞数。null 表示该平台或该接口不公开此数据，不等于 0。 |
| is_verified | 是否为平台认证账号（蓝V等）。null 表示无法判定。 |
| verified_title | 认证头衔（如「知名UP主」）。 |
| is_vip | 是否为大会员。 |
| vip_label | 会员标签。 |
| birthday | 生日。 |
| school | 学校。 |
| platform | 数据来源平台标识，与请求里的 platform 一致（如 xiaohongshu、tiktok）。 |
| recent_videos | 最近发布的视频列表，每项是一个视频（标题、链接、播放数、时长等）；没有时不出现这个字段。 |

## 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": "bilibili",
  "action": "profile",
  "params": {
    "user_id": "946974"
  }
}'
```

```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": "bilibili",
        "action": "profile",
        "params": {
            "user_id": "946974",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-09-26T08:56:04Z. `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": "bilibili",
  "action": "profile",
  "results": {
    "user_id": "946974",
    "name": "影视飓风",
    "url": "https://space.bilibili.com/946974",
    "bio": "无限进步！｜商务合作请联系邮箱：•••（邮件中麻烦备注公司、咨询内容）｜店铺名：影视飓风",
    "avatar_url": "https://i0.hdslb.com/•••",
    "gender": "•••",
    "level": 6,
    "follower_count": 18402297,
    "following_count": 686,
    "video_count": 932,
    "is_verified": true,
    "verified_title": "2025百大UP主、2023年度最高人气奖UP主、课堂优质讲师",
    "is_vip": true,
    "vip_label": "十年大会员",
    "birthday": "•••",
    "platform": "bilibili",
    "recent_videos": [
      {
        "id": "BV1J7hE6aEDQ",
        "url": "https://www.bilibili.com/video/BV1J7hE6aEDQ",
        "title": "比电影更夸张？专业保镖到底在做什么？",
        "view_count": 6840704,
        "comment_count": 6722,
        "posted_at": "2026-09-22T09:00:00+00:00"
      },
      {
        "id": "BV1cSec6tEux",
        "url": "https://www.bilibili.com/video/BV1cSec6tEux",
        "title": "选哪个？iPhone 18 Pro&Duo深度上手",
        "view_count": 13290851,
        "comment_count": 206473,
        "posted_at": "2026-09-16T12:00:00+00:00"
      },
      {
        "id": "BV17PYC6KEXu",
        "url": "https://www.bilibili.com/video/BV17PYC6KEXu",
        "title": "和五月天阿信见了他",
        "view_count": 1874796,
        "comment_count": 3815,
        "posted_at": "2026-09-14T09:05:38+00:00"
      }
    ]
  },
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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