a_idstring필수
Video id
https://api.sandbase.ai/v1/api/bilibili/web/one-video-v2Returns detailed metadata and playback information for a specific Bilibili video using its unique video and CID identifiers.
[
{
"data": {
"code": 0,
"data": {
"aid": 114006081739452,
"allow_bp": false,
"answer_status": 2,
"arc_aigc": null,
"asr_language": "",
"bgm_info": null,
"block_time": 0,
"bvid": "BV1GYAAefEjL",
"cid": 28400484458,
"disable_show_up_info": false,
"elec_high_level": {
"button_text": "",
"intro": "",
"jump_url": "",
"new": false,
"privilege_type": 0,
"qa_title": "",
"question_text": "",
"show_button": false,
"sub_title": "",
"title": ""
},
"fawkes": {
"config_version": 39052,
"ff_version": 21289
},
"guide_attention": [],
"has_next": false,
"ip_info": {},
"is_owner": false,
"is_ugc_pay_preview": false,
"is_upower_exclusive": false,
"is_upower_exclusive_with_qa": false,
"is_upower_play": false,
"jump_card": [],
"last_play_cid": 0,
"last_play_time": 0,
"level_info": {
"current_exp": 0,
"current_level": 0,
"current_min": 0,
"level_up": 0,
"next_exp": 1
},
"login_mid": 3546560478578925,
"login_mid_hash": "7f025234",
"max_limit": 3000,
"name": "bili_83640626021",
"need_login_subtitle": false,
"no_share": false,
"now_time": 1790689341,
"ocr_language": "",
"online_count": 1,
"online_switch": {
"enable_gray_dash_playback": "500",
"new_broadcast": "1",
"realtime_dm": "1",
"subtitle_submit_switch": "1"
},
"operation_card": [],
"options": {
"is_360": false,
"without_vip": false
},
"page_no": 1,
"permission": "5000,1001",
"preview_toast": "为创作付费,购买观看完整视频|购买观看",
"role": "0",
"script_pace": 4.664,
"script_pace_exp": "0",
"self_visible": null,
"show_switch": {
"long_progress": false
},
"subtitle": {
"allow_submit": false,
"font_size_type": 0,
"lan": "",
"lan_doc": "",
"subtitle_position": null,
"subtitles": [
{
"ai_status": 2,
"ai_type": 0,
"id": 1689850260387946200,
"id_str": "1689850260387946240",
"is_lock": false,
"lan": "ai-zh",
"lan_doc": "中文",
"subtitle_url": "//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/1140060817394522840048445829058a24de68ec57ef3a7c4ccbbd139b?auth_key=1790689341-6408fd4482c1427588887ba133579cd6-0-6ac6b936704edd8f4c2f507ea49ec04f",
"subtitle_url_v2": "//subtitle.bilibili.com/%01%1B%5C=_%04%12%12%049f%2F%07H%08%29~%16$5%0D.%0B%0AL%03%2C%01%1A%00M:%1Ce%00%0F%1FF%03%003%1A6%17%0A%25U%14%16Q%16%2CI%16o%16G%5C%0DAkACTR%5D%5E%1EFwUf_@%13~Z%5DX%5CZ%5BUYvM%1F~%15%1C%16H%5E%3BEGwB%10%5B%5CF%3EE%18%06%07%0C%03%1B@%7C%05?auth_key=1790689341-6408fd4482c1427588887ba133579cd6-0-6ac6b936704edd8f4c2f507ea49ec04f",
"type": 1
}
]
},
"toast_block": false,
"view_points": [],
"vip": {
"avatar_icon": {
"icon_resource": {}
},
"avatar_subscript": 0,
"avatar_subscript_url": "",
"due_date": 0,
"label": {
"bg_color": "",
"bg_style": 0,
"border_color": "",
"img_label_uri_hans": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
"img_label_uri_hant": "",
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png",
"img_label_uri_i18n": "",
"img_label_uri_i18n_static": "",
"label_goto": null,
"label_id": 0,
"label_theme": "",
"label_type": 0,
"path": "",
"text": "",
"text_color": "",
"use_img_label": true
},
"nickname_color": "",
"ott_info": {
"overdue_time": 0,
"pay_channel_id": "",
"pay_type": 0,
"status": 0,
"vip_type": 0
},
"role": 0,
"status": 0,
"super_vip": {
"is_super_vip": false
},
"theme_type": 0,
"tv_due_date": 0,
"tv_vip_pay_type": 0,
"tv_vip_status": 0,
"type": 0,
"vip_pay_type": 0
}
},
"message": "OK",
"ttl": 1
}
}
]예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
Returns player-side metadata for one Bilibili video, such as its bvid, cid, permission flags, paid-preview status and the current online viewer count. It needs the numeric video id as a_id and the part id as c_id.
aid and cid pair into the matching bvid for building a video link.is_ugc_pay_preview, is_upower_exclusive and preview_toast.online_count for a video at the moment of the call.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/one-video-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"a_id": "114006081739452", "c_id": "28400484458"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
a_id | string | Yes | Video id |
c_id | string | Yes | Video cid |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"aid": 114006081739452,
"allow_bp": false,
"answer_status": 2,
"arc_aigc": null,
"asr_language": "",
"bgm_info": null,
"block_time": 0,
"bvid": "BV1GYAAefEjL",
"cid": 28400484458,
"disable_show_up_info": false,
"elec_high_level": {
"button_text": "",
"intro": "",
"jump_url": "",
"new": false,
"privilege_type": 0,
"qa_title": "",
"question_text": "",
"show_button": false,
"sub_title": "",
"title": ""
},
"fawkes": {
"config_version": 39232,
"ff_version": 21289
}
},
"message": "OK",
"ttl": 1
}
| Field | Meaning |
|---|---|
data.aid / data.bvid / data.cid | The numeric video id, the BV-format video id and the part id (cid) of the video that was requested. |
data.online_count | Number of viewers shown as online for the video when the call was made. |
data.is_ugc_pay_preview | Whether the video is shown as a paid preview. When it is true, data.preview_toast holds the prompt text for buying the full video. |
data.preview_toast | Text shown to viewers about purchasing the full video. It is returned in Chinese. |
data.is_upower_exclusive / data.is_upower_exclusive_with_qa / data.is_upower_play | Flags for exclusive-content status on the video. |
data.need_login_subtitle | Whether subtitles require a logged-in user. |
data.max_limit | A numeric limit value returned for the video. The response does not state which item it limits. |
data.has_next | Whether another item follows this one. |
data.page_no | The page (part) number of the video that this response covers. |
data.now_time | A Unix timestamp that marks when the response was generated. |
a_id and c_id are required and are sent as strings.bvid, call Bilibili BV to AID Converter to get the a_id.cid values of a video, call Bilibili Video Parts.$0.002 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 API 엔드포인트입니다.
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/one-video-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"a_id": "114006081739452",
"c_id": "28400484458"
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
a_idstring필수Video id
c_idstring필수Video cid
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
[
{
"data": {
"code": 0,
"data": {
"aid": 114006081739452,
"allow_bp": false,
"answer_status": 2,
"arc_aigc": null,
"asr_language": "",
"bgm_info": null,
"block_time": 0,
"bvid": "BV1GYAAefEjL",
"cid": 28400484458,
"disable_show_up_info": false,
"elec_high_level": {
"button_text": "",
"intro": "",
"jump_url": "",
"new": false,
"privilege_type": 0,
"qa_title": "",
"question_text": "",
"show_button": false,
"sub_title": "",
"title": ""
},
"fawkes": {
"config_version": 39052,
"ff_version": 21289
},
"guide_attention": [],
"has_next": false,
"ip_info": {},
"is_owner": false,
"is_ugc_pay_preview": false,
"is_upower_exclusive": false,
"is_upower_exclusive_with_qa": false,
"is_upower_play": false,
"jump_card": [],
"last_play_cid": 0,
"last_play_time": 0,
"level_info": {
"current_exp": 0,
"current_level": 0,
"current_min": 0,
"level_up": 0,
"next_exp": 1
},
"login_mid": 3546560478578925,
"login_mid_hash": "7f025234",
"max_limit": 3000,
"name": "bili_83640626021",
"need_login_subtitle": false,
"no_share": false,
"now_time": 1790689341,
"ocr_language": "",
"online_count": 1,
"online_switch": {
"enable_gray_dash_playback": "500",
"new_broadcast": "1",
"realtime_dm": "1",
"subtitle_submit_switch": "1"
},
"operation_card": [],
"options": {
"is_360": false,
"without_vip": false
},
"page_no": 1,
"permission": "5000,1001",
"preview_toast": "为创作付费,购买观看完整视频|购买观看",
"role": "0",
"script_pace": 4.664,
"script_pace_exp": "0",
"self_visible": null,
"show_switch": {
"long_progress": false
},
"subtitle": {
"allow_submit": false,
"font_size_type": 0,
"lan": "",
"lan_doc": "",
"subtitle_position": null,
"subtitles": [
{
"ai_status": 2,
"ai_type": 0,
"id": 1689850260387946200,
"id_str": "1689850260387946240",
"is_lock": false,
"lan": "ai-zh",
"lan_doc": "中文",
"subtitle_url": "//aisubtitle.hdslb.com/bfs/ai_subtitle/prod/1140060817394522840048445829058a24de68ec57ef3a7c4ccbbd139b?auth_key=1790689341-6408fd4482c1427588887ba133579cd6-0-6ac6b936704edd8f4c2f507ea49ec04f",
"subtitle_url_v2": "//subtitle.bilibili.com/%01%1B%5C=_%04%12%12%049f%2F%07H%08%29~%16$5%0D.%0B%0AL%03%2C%01%1A%00M:%1Ce%00%0F%1FF%03%003%1A6%17%0A%25U%14%16Q%16%2CI%16o%16G%5C%0DAkACTR%5D%5E%1EFwUf_@%13~Z%5DX%5CZ%5BUYvM%1F~%15%1C%16H%5E%3BEGwB%10%5B%5CF%3EE%18%06%07%0C%03%1B@%7C%05?auth_key=1790689341-6408fd4482c1427588887ba133579cd6-0-6ac6b936704edd8f4c2f507ea49ec04f",
"type": 1
}
]
},
"toast_block": false,
"view_points": [],
"vip": {
"avatar_icon": {
"icon_resource": {}
},
"avatar_subscript": 0,
"avatar_subscript_url": "",
"due_date": 0,
"label": {
"bg_color": "",
"bg_style": 0,
"border_color": "",
"img_label_uri_hans": "",
"img_label_uri_hans_static": "https://i0.hdslb.com/bfs/vip/d7b702ef65a976b20ed854cbd04cb9e27341bb79.png",
"img_label_uri_hant": "",
"img_label_uri_hant_static": "https://i0.hdslb.com/bfs/activity-plat/static/20220614/e369244d0b14644f5e1a06431e22a4d5/KJunwh19T5.png",
"img_label_uri_i18n": "",
"img_label_uri_i18n_static": "",
"label_goto": null,
"label_id": 0,
"label_theme": "",
"label_type": 0,
"path": "",
"text": "",
"text_color": "",
"use_img_label": true
},
"nickname_color": "",
"ott_info": {
"overdue_time": 0,
"pay_channel_id": "",
"pay_type": 0,
"status": 0,
"vip_type": 0
},
"role": 0,
"status": 0,
"super_vip": {
"is_super_vip": false
},
"theme_type": 0,
"tv_due_date": 0,
"tv_vip_pay_type": 0,
"tv_vip_status": 0,
"type": 0,
"vip_pay_type": 0
}
},
"message": "OK",
"ttl": 1
}
}
]더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Bilibili | $0.002 / 호출 | JSON |
Bilibili | $0.001 / 호출 | JSON |
Bilibili | $0.001 / 호출 | JSON |
Bilibili | $0.001 / 호출 | JSON |
Bilibili | $0.001 / 호출 | JSON |
Bilibili | $0.001 / 호출 | JSON |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/bilibili/web/one-video-v2에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.002, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: a_id (string) 및 c_id (string). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Bilibili Video Details (V2)은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Bilibili API 액세스를 별도로 신청할 필요는 없습니다.