---
title: "B 站 API 数据接口 · SocialToAI"
canonical: https://socialtoai.app/zh/platforms/bilibili/
updated: 2026-10-17
---

# B 站 API 数据接口

B 站 API（数据接口）可以搜视频，读视频详情、评论、账号资料、账号发布的视频和热榜，不用登录 B 站账号，也不用提供 Cookie。每次调用 2 积分（约 $0.004–$0.0067），失败不扣。可以直接发 HTTP 请求，也可以通过 MCP 接到 AI 客户端里用。最近实测：2026-11-19。

- 页面：https://socialtoai.app/zh/platforms/bilibili/
- 最近更新：2026-10-17
- 最近实测：2026-11-19

## 可用的动作

| 动作 | 返回什么 | 由什么参数选中 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- | --- |
| `search` | 按关键词找视频：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | — | `bilibili.search` | 2 | [B 站搜索接口](https://socialtoai.app/zh/bilibili-search-api.md) |
| `trending` | 现在的热榜：标题、名次和热度。 | — | `bilibili.trending` | 2 | [B 站热榜接口](https://socialtoai.app/zh/bilibili-trending-api.md) |
| `trending` | 热门视频榜 | `type=videos` | `bilibili.trending:videos` | 2 | [B 站热榜接口](https://socialtoai.app/zh/bilibili-trending-api.md) |
| `detail` | 用编号或链接取一条视频：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | — | `bilibili.detail` | 2 | [B 站详情接口](https://socialtoai.app/zh/bilibili-detail-api.md) |
| `comments` | 一条视频下的评论：正文、点赞数、回复数和时间。 | — | `bilibili.comments` | 2 | [B 站评论接口](https://socialtoai.app/zh/bilibili-comments-api.md) |
| `comments` | 某条评论下的回复 | `reply_of` | `bilibili.comments:replies` | 2 | [B 站评论接口](https://socialtoai.app/zh/bilibili-comments-api.md) |
| `user_profile` | 一个账号：名称、简介、粉丝数、关注数和作品数。 | — | `bilibili.user_profile` | 2 | [B 站账号资料接口](https://socialtoai.app/zh/bilibili-user-profile-api.md) |
| `user_posts` | 一个账号最近发布的视频。 | — | `bilibili.user_posts` | 2 | [B 站账号作品接口](https://socialtoai.app/zh/bilibili-user-posts-api.md) |

和抖音比，B 站的视频少给图片。

给 AI 读更省：8 个接口实测，同样的录制数据，平台原始 JSON 合计约 274,162 token，SocialToAI 返回约 26,909 token，少 90%（2026-11-06，方法见“测量方法”页）。

## 调用示例

```bash
curl https://socialtoai.app/v1/search \
  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "bilibili",
    "query": "机械键盘"
  }'
```

## B 站给不了的字段

这些字段在对应的调用里始终是 null，并列在返回的 `unavailable` 里。

| 字段 | 哪些动作 |
| --- | --- |
| `author.username` | search, detail, user_posts |
| `author.verified` | search, user_posts |
| `author.followers` | search, user_posts |
| `metrics.shares` | search, user_posts |
| `metrics.reposts` | search, detail, user_posts |
| `images` | search, detail, user_posts |
| `is_pinned` | search, detail, user_posts |
| `id` | trending |
| `url` | trending, comments |
| `metrics.likes` | user_posts |
| `metrics.collects` | user_posts |
| `hashtags` | user_posts |

## 办成一件事多少钱

| 要做的事 | 怎么算 | 积分 | 约合 |
| --- | --- | --- | --- |
| 搜 1,000 条 B 站结果 | 每页通常 20 条，50 页 | 100 积分 | 约 ¥2.4（$0.33） |
| 读 1,000 条 B 站评论 | 每页通常 20 条，50 页 | 100 积分 | 约 ¥2.4（$0.33） |
| 回填一个 B 站账号：200 条视频列表加 20 条全文 | 7 页列表 + 20 次全文 | 54 积分 | 约 ¥1.3（$0.18） |
| 每天盯 1 个 B 站账号，一个月最多 | 每次 10 积分 × 31 天 | 310 积分 | 约 ¥7.4（$1.03） |

按 $10 档算，买得越多单价越低。监控只在你开启时运行，随时可以暂停，没有订阅。

## 在 AI 里直接问

- 这周 B 站上，家用咖啡和抹茶哪个更火？ → search, search: 4 积分

- 读一下这条 B 站视频的评论，告诉我大家在抱怨什么。 → detail, comments × 3: 8 积分

- B 站上现在什么在火？ → trending: 2 积分

[B 站 MCP 服务器](https://socialtoai.app/zh/mcp/bilibili.md)

## 能读 B 站的现成工具

- [品牌口碑](https://socialtoai.app/zh/tools/brand-buzz.md)：各平台上的态度占比、提到最多的事，以及背后的帖子
- [评论分析](https://socialtoai.app/zh/tools/comment-insights.md)：评论里的话题和各自占比，还有提问、想买和投诉
- [账号动态](https://socialtoai.app/zh/tools/account-watch.md)：每个账号最近发了什么，哪条明显好于平时
- [找达人](https://socialtoai.app/zh/tools/find-creators.md)：做这类内容的达人：体量、近期作品和契合度
- [达人档案](https://socialtoai.app/zh/tools/creator-card.md)：这个人在其他平台的账号、各自的数据，以及是同一人的把握
- [批量链接数据](https://socialtoai.app/zh/tools/batch-stats.md)：每条链接一行，给出现在的数字；失效的链接会标出来
- [爆款发现](https://socialtoai.app/zh/tools/viral-finder.md)：明显超出作者平时水平的内容

## 官方 API

B 站开放平台面向机构、UP 主和企业等。其视频与数据接口只返回授权该应用的用户的稿件和数据，每项权限都需单独申请。

来源：[B 站官方开发者文档](https://openhome.bilibili.com/doc/4/a24030b7-6b8f-b36c-32d8-a4aae67fcc35)，核对于 2026-10-17。

在这里读 1,000 条视频：约 50 次 `bilibili.search` 调用（每页通常 20 条），共 100 积分，按第一档约 $0.33。 [算一下要多少钱](https://socialtoai.app/zh/free-tools/api-cost-estimator.md)

[B 站官方 API 的申请条件和价格](https://socialtoai.app/zh/does-bilibili-have-an-api.md)

- [各平台评论接口对比](https://socialtoai.app/zh/comments-api.md)：哪些平台能取评论、每页多少条、多少积分。
- [视频评论分析：让 AI 读完评论，带上原话](https://socialtoai.app/zh/how-to/analyze-comments-with-quotes.md)：评论在说什么，带原话：用工具还是让 AI 读，各平台价格，一次录制
- [每天盯竞品账号：发了什么，哪条比平时好](https://socialtoai.app/zh/monitors/competitors.md)：每天盯竞品账号：新发了什么、哪条比平时好，每个账号 9 积分起
- [B 站今日热榜](https://socialtoai.app/zh/trending/bilibili.md)：每天更新的榜单，一页看全。
- [B 站 MCP 服务器](https://socialtoai.app/zh/mcp/bilibili.md)：让你的 AI 直接读 B 站。
