当前浏览的是 v7 预览版文档(v7 尚未正式发布,API 可能随版本调整)。本页是 v7 新增内容,去 v6 正式版文档首页
@ikenxuan/amagi

AV 号转换得到的 BV 号

把稿件 AV 号换算成 BV 号,本地计算不发请求,返回 `{ bvid }`。

GET
/api/bilibili/av_to_bv

Authorization

bearerAuth
AuthorizationBearer <token>

仅在 startServer 传了 token 时生效

In: header

Query Parameters

avid*integer

稿件 AV 号,纯数字不带 av 前缀

Range0 < value <= 9007199254740991

Response Body

application/json

application/json

curl -X GET "https://example.com/api/bilibili/av_to_bv?avid=1"
{  "success": true,  "data": {    "bvid": "string",    "property1": null,    "property2": null  },  "error": {    "kind": "validation",    "code": "string",    "message": "string",    "retryable": true,    "platform": {      "code": "string",      "message": "string"    },    "http": {      "status": 0,      "statusText": "string"    },    "issues": [      {        "path": "string",        "message": "string",        "received": null      }    ]  },  "message": "string",  "meta": {    "requestId": "string",    "clientId": "string",    "platform": "douyin",    "endpoint": "string",    "durationMs": 0,    "attempts": 0,    "trace": [      {        "url": "string",        "method": "string",        "status": 0,        "durationMs": 0,        "reason": "initial",        "retryOf": "string"      }    ]  },  "requestPath": "/api/bilibili/fetch_one_video?bvid=BV1xx"}