folder_idstring필수
collection folder id
https://api.sandbase.ai/v1/api/bilibili/web/user-collection-videosReturns video data stored within a specified collection folder on Bilibili. Supports pagination to browse through items in the folder.
[
{
"data": {
"code": 0,
"data": {
"has_more": true,
"info": {
"attr": 22,
"cnt_info": {
"collect": 1,
"play": 0,
"share": 0,
"thumb_up": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"cover_type": 2,
"ctime": 1662826672,
"fav_state": 0,
"fid": 17560595,
"id": 1756059545,
"intro": "",
"is_kid_playlist": false,
"is_top": false,
"kid_playlist_desc": "",
"like_state": 0,
"media_count": 46,
"mid": 178360345,
"mtime": 1688349233,
"state": 0,
"title": "艺术",
"type": 11,
"upper": {
"face": "https://i1.hdslb.com/bfs/face/f31765ab779958c5e90ce4b6ff84d468f5342090.jpg",
"followed": false,
"mid": 178360345,
"name": "Azulsolitan",
"vip_statue": 0,
"vip_type": 1
}
},
"medias": [
{
"attr": 0,
"bv_id": "BV1MF411A7HS",
"bvid": "BV1MF411A7HS",
"cnt_info": {
"collect": 2736,
"danmaku": 287,
"play": 347040,
"play_switch": 0,
"reply": 0,
"view_text_1": "34.7万",
"vt": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"ctime": 1659170909,
"duration": 122,
"fav_time": 1785408355,
"id": 301480273,
"intro": "尔等年纪轻轻,便前来送死吗?——舒克B站唯一账号",
"link": "bilibili://video/301480273",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=301480273&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1659170909,
"season": null,
"title": "“子龙身故,国家损一栋梁,亮失一臂膀…”",
"type": 2,
"ugc": {
"first_cid": 788703910
},
"upper": {
"face": "https://i1.hdslb.com/bfs/face/74b6b861ccc21ebdb4ff3696fea991314071469d.jpg",
"jump_link": "",
"mid": 67365289,
"name": "舒克混剪"
}
},
{
"attr": 0,
"bv_id": "BV1834y1w7uR",
"bvid": "BV1834y1w7uR",
"cnt_info": {
"collect": 6706,
"danmaku": 42,
"play": 109597,
"play_switch": 0,
"reply": 0,
"view_text_1": "11万",
"vt": 0
},
"cover": "http://i2.hdslb.com/bfs/archive/3206739858fc698a247708310c79bf266e5a12e7.jpg",
"ctime": 1700803832,
"duration": 236,
"fav_time": 1766579609,
"id": 833784424,
"intro": "卓别林演讲 80年后依然振聋发聩-无bgm 纯享版",
"link": "bilibili://video/833784424",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=833784424&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1700803832,
"season": null,
"title": "卓别林演讲 80年后依然振聋发聩-无bgm 纯享版",
"type": 2,
"ugc": {
"first_cid": 1342452121
},
"upper": {
"face": "https://i0.hdslb.com/bfs/face/35dede8e0603bdaa9a2c7c2d88c18d4c6ed31df7.jpg",
"jump_link": "",
"mid": 154277550,
"name": "壹周新星_一周新星"
}
},
{
"attr": 0,
"bv_id": "BV1hp411o7VF",
"bvid": "BV1hp411o7VF",
"cnt_info": {
"collect": 7843,
"danmaku": 162,
"play": 430969,
"play_switch": 0,
"reply": 0,
"view_text_1": "43.1万",
"vt": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/116c3bb42911e55d43a3933d48ce0cb3da8e1ddc.jpg",
"ctime": 1526995842,
"duration": 91,
"fav_time": 1733831081,
"id": 23791865,
"intro": "所属作品: 囮物语\n简介补充: 还是那句话 香菜赛高!抚子赛高!",
"link": "bilibili://video/23791865",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=23791865&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1526995842,
"season": null,
"title": "[1080P超清] 妄想特快 - 千石抚子(CV.花泽香菜) [囮物语NCOP]",
"type": 2,
"ugc": {
"first_cid": 39777978
},
"upper": {
"face": "https://i1.hdslb.com/bfs/face/54514037c2d3f5ef9d85d671738e17c13859b152.jpg",
"jump_link": "",
"mid": 24248215,
"name": "小树ちゃん"
}
},
"… 17 more items in the full response"
],
"ttl": 1790689345
},
"message": "OK",
"ttl": 1
}
}
]예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
Returns the videos saved in one Bilibili collection folder, plus summary details about the folder and its owner. It needs a folder_id, and you can pass pn to request other pages.
cnt_info.play or cnt_info.collect to find the most watched items.fav_time.pn and has_more to copy its full contents.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/user-collection-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"folder_id": "1756059545"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
folder_id | string | Yes | collection folder id |
pn | integer | No | Page number |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"has_more": true,
"info": {
"attr": 22,
"cnt_info": {
"collect": 1,
"play": 0,
"share": 0,
"thumb_up": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"cover_type": 2,
"ctime": 1662826672,
"fav_state": 0,
"fid": 17560595,
"id": 1756059545,
"intro": "",
"is_kid_playlist": false,
"is_top": false,
"kid_playlist_desc": ""
},
"medias": [
{
"attr": 0,
"bv_id": "BV1MF411A7HS",
"bvid": "BV1MF411A7HS",
"cnt_info": {
"collect": 2733,
"danmaku": 287,
"play": 347087,
"play_switch": 0,
"reply": 0,
"view_text_1": "34.7万",
"vt": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"ctime": 1659170909,
"duration": 122,
"fav_time": 1785408355,
"id": 301480273,
"intro": "尔等年纪轻轻,便前来送死吗?——舒克B站唯一账号",
"link": "bilibili://video/301480273",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=301480273&otype=2"
}
],
"ttl": 1793690874
},
"message": "OK",
"ttl": 1
}
| Field | Meaning |
|---|---|
data.has_more | Shows whether more pages follow the current one. true means you can request the next pn. |
data.info.title / data.info.intro | The folder name and its description. intro can be an empty string. |
data.info.media_count | The number of items in the folder. |
data.info.upper.mid / data.info.upper.name | The ID and display name of the user who owns the folder. |
data.info.ctime / data.info.mtime | Timestamps for when the folder was created and last changed. They are Unix times in seconds. |
data.medias[].bvid | The BV ID of the saved video. bv_id holds the same value. |
data.medias[].title / data.medias[].intro | The title and description text of the video. |
data.medias[].cnt_info.play / collect / danmaku | Counts of plays, collects and danmaku comments for the video. view_text_1 is the play count as display text. |
data.medias[].duration | The length of the video. The value is a plain number, so check it against a known video before assuming the unit. |
data.medias[].pubtime / data.medias[].fav_time | Unix timestamps for when the video was published and when it was added to the folder. |
data.medias[].upper.mid / data.medias[].upper.name | The ID and name of the creator who uploaded the video. |
folder_id with Bilibili User Collection Folders, which lists the folders a user owns.pn to move between pages. Keep going while data.has_more is true.bvid to Bilibili Video Details to get full details for one item.ctime, pubtime and fav_time are Unix times in seconds.$0.001 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/user-collection-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"folder_id": "1756059545"
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
folder_idstring필수collection folder id
pnintegerPage number
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
[
{
"data": {
"code": 0,
"data": {
"has_more": true,
"info": {
"attr": 22,
"cnt_info": {
"collect": 1,
"play": 0,
"share": 0,
"thumb_up": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"cover_type": 2,
"ctime": 1662826672,
"fav_state": 0,
"fid": 17560595,
"id": 1756059545,
"intro": "",
"is_kid_playlist": false,
"is_top": false,
"kid_playlist_desc": "",
"like_state": 0,
"media_count": 46,
"mid": 178360345,
"mtime": 1688349233,
"state": 0,
"title": "艺术",
"type": 11,
"upper": {
"face": "https://i1.hdslb.com/bfs/face/f31765ab779958c5e90ce4b6ff84d468f5342090.jpg",
"followed": false,
"mid": 178360345,
"name": "Azulsolitan",
"vip_statue": 0,
"vip_type": 1
}
},
"medias": [
{
"attr": 0,
"bv_id": "BV1MF411A7HS",
"bvid": "BV1MF411A7HS",
"cnt_info": {
"collect": 2736,
"danmaku": 287,
"play": 347040,
"play_switch": 0,
"reply": 0,
"view_text_1": "34.7万",
"vt": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/970cd038dd3fdffd6824748be0425e8f71ba5c2f.jpg",
"ctime": 1659170909,
"duration": 122,
"fav_time": 1785408355,
"id": 301480273,
"intro": "尔等年纪轻轻,便前来送死吗?——舒克B站唯一账号",
"link": "bilibili://video/301480273",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=301480273&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1659170909,
"season": null,
"title": "“子龙身故,国家损一栋梁,亮失一臂膀…”",
"type": 2,
"ugc": {
"first_cid": 788703910
},
"upper": {
"face": "https://i1.hdslb.com/bfs/face/74b6b861ccc21ebdb4ff3696fea991314071469d.jpg",
"jump_link": "",
"mid": 67365289,
"name": "舒克混剪"
}
},
{
"attr": 0,
"bv_id": "BV1834y1w7uR",
"bvid": "BV1834y1w7uR",
"cnt_info": {
"collect": 6706,
"danmaku": 42,
"play": 109597,
"play_switch": 0,
"reply": 0,
"view_text_1": "11万",
"vt": 0
},
"cover": "http://i2.hdslb.com/bfs/archive/3206739858fc698a247708310c79bf266e5a12e7.jpg",
"ctime": 1700803832,
"duration": 236,
"fav_time": 1766579609,
"id": 833784424,
"intro": "卓别林演讲 80年后依然振聋发聩-无bgm 纯享版",
"link": "bilibili://video/833784424",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=833784424&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1700803832,
"season": null,
"title": "卓别林演讲 80年后依然振聋发聩-无bgm 纯享版",
"type": 2,
"ugc": {
"first_cid": 1342452121
},
"upper": {
"face": "https://i0.hdslb.com/bfs/face/35dede8e0603bdaa9a2c7c2d88c18d4c6ed31df7.jpg",
"jump_link": "",
"mid": 154277550,
"name": "壹周新星_一周新星"
}
},
{
"attr": 0,
"bv_id": "BV1hp411o7VF",
"bvid": "BV1hp411o7VF",
"cnt_info": {
"collect": 7843,
"danmaku": 162,
"play": 430969,
"play_switch": 0,
"reply": 0,
"view_text_1": "43.1万",
"vt": 0
},
"cover": "http://i1.hdslb.com/bfs/archive/116c3bb42911e55d43a3933d48ce0cb3da8e1ddc.jpg",
"ctime": 1526995842,
"duration": 91,
"fav_time": 1733831081,
"id": 23791865,
"intro": "所属作品: 囮物语\n简介补充: 还是那句话 香菜赛高!抚子赛高!",
"link": "bilibili://video/23791865",
"media_list_link": "bilibili://music/playlist/playpage/1934419845?page_type=3&oid=23791865&otype=2",
"ogv": null,
"page": 1,
"pubtime": 1526995842,
"season": null,
"title": "[1080P超清] 妄想特快 - 千石抚子(CV.花泽香菜) [囮物语NCOP]",
"type": 2,
"ugc": {
"first_cid": 39777978
},
"upper": {
"face": "https://i1.hdslb.com/bfs/face/54514037c2d3f5ef9d85d671738e17c13859b152.jpg",
"jump_link": "",
"mid": 24248215,
"name": "小树ちゃん"
}
},
"… 17 more items in the full response"
],
"ttl": 1790689345
},
"message": "OK",
"ttl": 1
}
}
]더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Bilibili | $0.001 / 호출 | 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/user-collection-videos에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.001, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: folder_id (string). 선택: pn (integer). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Bilibili User Collection Folder Videos은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Bilibili API 액세스를 별도로 신청할 필요는 없습니다.