2020-03-04 18:55:14 +08:00
|
|
|
|
# 用户状态数
|
2020-03-04 12:14:14 +08:00
|
|
|
|
|
2020-11-20 20:13:12 +08:00
|
|
|
|
- [关系状态数](#关系状态数)
|
|
|
|
|
- [UP主状态数](#UP主状态数)
|
|
|
|
|
- [~~订阅&投稿状态数(已弃用)~~](#~~订阅&投稿状态数(已弃用)~~)
|
|
|
|
|
- [相簿投稿数](#相簿投稿数)
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2020-03-04 12:30:32 +08:00
|
|
|
|
## 关系状态数
|
2023-01-17 15:23:59 +08:00
|
|
|
|
> https://api.bilibili.com/x/relation/stat
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-10-23 18:53:01 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)或APP
|
|
|
|
|
|
2020-06-08 23:06:53 +08:00
|
|
|
|
**url参数:**
|
2020-04-16 18:47:19 +08:00
|
|
|
|
|
2020-10-23 18:53:01 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ---------- | ---- | ------------ | ----------- | ---- |
|
|
|
|
|
| access_key | str | APP登录Token | APP方式必要 | |
|
2021-07-12 21:31:27 +08:00
|
|
|
|
| vmid | num | 目标用户mid | 必要 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-04 19:40:19 +08:00
|
|
|
|
**json回复:**
|
2020-04-08 16:20:28 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | --------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-400:请求错误 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`对象:
|
|
|
|
|
|
2022-02-03 00:56:33 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| --------- | ---- | ----------- | ----------------------------------------------- |
|
|
|
|
|
| mid | num | 目标用户mid | |
|
|
|
|
|
| following | num | 关注数 | |
|
|
|
|
|
| whisper | num | 悄悄关注数 | 需要登录(Cookie或APP) <br />未登录或非自己恒为0 |
|
|
|
|
|
| black | num | 黑名单数 | 需要登录(Cookie或APP) <br />未登录或非自己恒为0 |
|
|
|
|
|
| follower | num | 粉丝数 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-03-04 12:30:32 +08:00
|
|
|
|
|
2021-07-12 21:31:27 +08:00
|
|
|
|
查询用户`mid=332704117`的关系状态数
|
2020-03-23 16:46:13 +08:00
|
|
|
|
|
2020-07-17 23:50:28 +08:00
|
|
|
|
```shell
|
2023-01-17 15:23:59 +08:00
|
|
|
|
curl -G 'https://api.bilibili.com/x/relation/stat' \
|
2020-10-16 19:31:41 +08:00
|
|
|
|
--data-urlencode 'vmid=332704117' \
|
2020-07-17 23:50:28 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
2020-03-23 16:46:13 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-03-06 17:23:49 +08:00
|
|
|
|
```json
|
2020-03-04 12:11:31 +08:00
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"mid": 332704117,
|
|
|
|
|
"following": 32,
|
|
|
|
|
"whisper": 0,
|
|
|
|
|
"black": 0,
|
|
|
|
|
"follower": 919515
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
## UP主状态数
|
2020-04-08 16:20:28 +08:00
|
|
|
|
|
2023-01-17 15:23:59 +08:00
|
|
|
|
> https://api.bilibili.com/x/space/upstat
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-03-04 12:30:32 +08:00
|
|
|
|
|
2020-10-23 18:53:01 +08:00
|
|
|
|
认证方式:Cookie(SESSDATA)或APP
|
|
|
|
|
|
|
|
|
|
注:该接口需要**任意用户**登录,否则**不会返回任何数据**
|
|
|
|
|
|
2020-06-08 23:06:53 +08:00
|
|
|
|
**url参数:**
|
2020-04-16 18:47:19 +08:00
|
|
|
|
|
2020-10-23 18:53:01 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ---------- | ---- | ------------ | ----------- | ---- |
|
|
|
|
|
| access_key | str | APP登录Token | APP方式必要 | |
|
2021-07-12 21:31:27 +08:00
|
|
|
|
| mid | num | 目标用户mid | 必要 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
|
|
|
|
**json回复:**
|
2020-04-16 18:47:19 +08:00
|
|
|
|
|
|
|
|
|
根对象:
|
|
|
|
|
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | --------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-400:请求错误 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`对象:
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ----- | ---------- | ----- |
|
|
|
|
|
| archive | obj | 视频播放量 | |
|
|
|
|
|
| article | obj | 专栏阅读量 | |
|
2020-03-04 18:55:14 +08:00
|
|
|
|
| likes | num | 获赞次数 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`中的`archive`对象:
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ---- | ----- | ---------- | ----- |
|
|
|
|
|
| view | num | 视频播放量 | |
|
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`中的`article`对象:
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ---- | ----- | ---------- | ----- |
|
|
|
|
|
| view | num | 专栏阅读量 | |
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-03-04 12:30:32 +08:00
|
|
|
|
|
2021-07-12 21:31:27 +08:00
|
|
|
|
查询用户`mid=456664753`的UP主状态数
|
2020-03-23 16:46:13 +08:00
|
|
|
|
|
2020-07-17 23:50:28 +08:00
|
|
|
|
```shell
|
2023-01-17 15:23:59 +08:00
|
|
|
|
curl -G 'https://api.bilibili.com/x/space/upstat' \
|
2020-10-23 18:53:01 +08:00
|
|
|
|
--data-urlencode 'mid=456664753' \
|
|
|
|
|
-b 'SESSDATA=xxx'
|
2020-07-17 23:50:28 +08:00
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-03-06 17:23:49 +08:00
|
|
|
|
```json
|
2020-03-04 12:11:31 +08:00
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"archive": {
|
|
|
|
|
"view": 213567370
|
|
|
|
|
},
|
|
|
|
|
"article": {
|
|
|
|
|
"view": 3230808
|
|
|
|
|
},
|
|
|
|
|
"likes": 20295095
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|
|
|
|
|
|
2020-08-28 21:30:19 +08:00
|
|
|
|
## ~~订阅&投稿状态数(已弃用)~~
|
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
<summary>查看折叠内容</summary>
|
2023-01-17 15:23:59 +08:00
|
|
|
|
> https://api.bilibili.com/x/space/navnum
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-03-04 12:30:32 +08:00
|
|
|
|
|
2020-06-08 23:06:53 +08:00
|
|
|
|
**url参数:**
|
2020-04-16 18:47:19 +08:00
|
|
|
|
|
2020-04-08 16:20:28 +08:00
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ------ | ---- | ----------- | ------ | ---- |
|
2021-07-12 21:31:27 +08:00
|
|
|
|
| mid | num | 目标用户mid | 必要 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-04 19:40:19 +08:00
|
|
|
|
**json回复:**
|
2020-03-21 14:37:55 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | --------------------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功<br />-400:请求错误 |
|
|
|
|
|
| message | str | 错误信息 | 默认为0 |
|
2020-07-17 23:50:28 +08:00
|
|
|
|
| ttl | num | 1 | |
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| data | obj | 信息本体 | |
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`对象:
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| --------- | ----- | ---------- | ------------ |
|
|
|
|
|
| video | num | 投稿视频数 | |
|
|
|
|
|
| bangumi | num | 追番数 | 无视隐私设置 |
|
|
|
|
|
| cinema | num | 追剧数 | 无视隐私设置 |
|
|
|
|
|
| channel | obj | 频道数 | |
|
|
|
|
|
| favourite | obj | 收藏夹数 | 无视隐私设置 |
|
|
|
|
|
| tag | num | 关注TAG数 | 无视隐私设置 |
|
|
|
|
|
| article | num | 投稿专栏数 | |
|
|
|
|
|
| playlist | num | 0 | 作用尚不明确 |
|
|
|
|
|
| album | num | 投稿相簿数 | |
|
|
|
|
|
| audio | num | 投稿音频数 | |
|
|
|
|
|
| pugv | num | 投稿课程数 | |
|
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`中的`channel`对象:
|
|
|
|
|
|
2020-03-04 12:11:31 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ----- | ---------- | ------------ |
|
|
|
|
|
| master | num | 频道数 | |
|
|
|
|
|
| guest | num | 频道数 | |
|
|
|
|
|
|
2020-03-21 14:37:55 +08:00
|
|
|
|
`data`中的`favourite`对象:
|
|
|
|
|
|
2020-03-25 12:05:53 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------ | ---- | ------------ | --------------------------------------- |
|
|
|
|
|
| master | num | 全部收藏夹数 | 需要登录(SESSDATA) <br />只能查看自己的 |
|
|
|
|
|
| guest | num | 公开收藏夹数 | 无视隐私设置 |
|
2020-03-04 18:55:14 +08:00
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-03-04 12:30:32 +08:00
|
|
|
|
|
2021-07-12 21:31:27 +08:00
|
|
|
|
查询用户`mid=239202390`的订阅&投稿状态数
|
2020-03-23 16:46:13 +08:00
|
|
|
|
|
2020-07-17 23:50:28 +08:00
|
|
|
|
```shell
|
2023-01-17 15:23:59 +08:00
|
|
|
|
curl -G 'https://api.bilibili.com/x/space/navnum' \
|
2020-10-16 19:31:41 +08:00
|
|
|
|
--data-urlencode 'mid=239202390' \
|
2020-07-17 23:50:28 +08:00
|
|
|
|
-b 'SESSDATA=xxx'
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-03-06 17:23:49 +08:00
|
|
|
|
```json
|
2020-03-04 12:11:31 +08:00
|
|
|
|
{
|
|
|
|
|
"code": 0,
|
|
|
|
|
"message": "0",
|
|
|
|
|
"ttl": 1,
|
|
|
|
|
"data": {
|
|
|
|
|
"video": 290,
|
|
|
|
|
"bangumi": 25,
|
|
|
|
|
"cinema": 13,
|
|
|
|
|
"channel": {
|
|
|
|
|
"master": 2,
|
|
|
|
|
"guest": 2
|
|
|
|
|
},
|
|
|
|
|
"favourite": {
|
|
|
|
|
"master": 6,
|
|
|
|
|
"guest": 6
|
|
|
|
|
},
|
|
|
|
|
"tag": 0,
|
|
|
|
|
"article": 1,
|
|
|
|
|
"playlist": 0,
|
|
|
|
|
"album": 150,
|
|
|
|
|
"audio": 4,
|
|
|
|
|
"pugv": 0
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2020-08-31 16:37:38 +08:00
|
|
|
|
|
|
|
|
|
</details>
|
2020-08-28 21:30:19 +08:00
|
|
|
|
</details>
|
2020-03-04 12:11:31 +08:00
|
|
|
|
|
2020-11-20 20:13:12 +08:00
|
|
|
|
## 相簿投稿数
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2023-01-17 15:23:59 +08:00
|
|
|
|
> https://api.vc.bilibili.com/link_draw/v1/doc/upload_count
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2020-07-14 18:44:44 +08:00
|
|
|
|
*请求方式:GET*
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2020-06-08 23:06:53 +08:00
|
|
|
|
**url参数:**
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
|
|
|
|
| 参数名 | 类型 | 内容 | 必要性 | 备注 |
|
|
|
|
|
| ------ | ---- | ----------- | ------ | ---- |
|
2021-07-12 21:31:27 +08:00
|
|
|
|
| uid | num | 目标用户mid | 必要 | |
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
|
|
|
|
**json回复:**
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
根对象:
|
|
|
|
|
|
2020-04-10 11:17:32 +08:00
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ------- | ---- | -------- | ------------- |
|
|
|
|
|
| code | num | 返回值 | 0:成功 |
|
|
|
|
|
| msg | str | 错误信息 | 默认为success |
|
|
|
|
|
| message | str | 错误信息 | 默认为success |
|
|
|
|
|
| data | obj | 信息本体 | |
|
|
|
|
|
|
|
|
|
|
`data`对象:
|
|
|
|
|
|
|
|
|
|
| 字段 | 类型 | 内容 | 备注 |
|
|
|
|
|
| ----------- | ---- | ---------------------- | ------------------ |
|
|
|
|
|
| all_count | num | 相簿总数 | 总数为以下三者之和 |
|
|
|
|
|
| draw_count | num | 发布绘画数 | |
|
|
|
|
|
| photo_count | num | 发布摄影数 | |
|
|
|
|
|
| daily_count | num | 发布日常(图片动态)数 | |
|
|
|
|
|
|
2020-04-16 18:47:19 +08:00
|
|
|
|
**示例:**
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2021-07-12 21:31:27 +08:00
|
|
|
|
查询用户`mid=53456`的投稿相簿数
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2020-07-17 23:50:28 +08:00
|
|
|
|
```shell
|
2023-01-17 15:23:59 +08:00
|
|
|
|
curl -G 'https://api.vc.bilibili.com/link_draw/v1/doc/upload_count' \
|
2020-07-17 23:50:28 +08:00
|
|
|
|
--data-urlencode 'uid=53456'
|
|
|
|
|
```
|
2020-04-10 11:17:32 +08:00
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
<details>
|
|
|
|
|
<summary>查看响应示例:</summary>
|
|
|
|
|
|
2020-04-10 11:17:32 +08:00
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"code":0,
|
|
|
|
|
"msg":"success",
|
|
|
|
|
"message":"success",
|
|
|
|
|
"data":{
|
|
|
|
|
"all_count":92,
|
|
|
|
|
"draw_count":5,
|
|
|
|
|
"photo_count":0,
|
|
|
|
|
"daily_count":87
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2020-08-31 16:37:38 +08:00
|
|
|
|
</details>
|