keywordstringจำเป็น
Search keyword.
https://api.sandbase.ai/v1/api/bilibili/search-videoSearch Bilibili videos by keyword with page-based pagination and sorting by general ranking, play count, publish time, danmaku count, or favorites.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns one page of Bilibili video search results for a keyword. Each result has the video IDs, title-matched author, play, like, favorite and danmaku counts, duration and publish time. The only required input is keyword.
原神.order to click or stow.pubdate.bvid and mid values to feed into video detail or creator lookups.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/search-video" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keyword": "原神"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
keyword | string | Yes | Search keyword. |
order | string | No | Sorting criteria for search results. |
page | string | No | Page number for pagination. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"egg_hit": 0,
"exp_list": {
"100010": true,
"105208": true,
"106000": true,
"5502": true,
"55020101": true,
"64778101": true,
"65785101": true,
"6600": true,
"70529100": true,
"73163100": true,
"78757104": true,
"78772100": true
},
"in_black_key": 0,
"in_white_key": 0,
"is_hit_web_inf": false,
"next": 2,
"numPages": 50,
"numResults": 1000,
"page": 1,
"pagesize": 20,
"result": [
{
"aid": 117547651307164,
"arcurl": "http://www.bilibili.com/video/av117547651307164",
"area": 0,
"author": "原神",
"badgepay": false,
"biz_data": null,
"bvid": "BV19b4A6PECX",
"card_status": 0,
"cate_name": "",
"cny_flag": 0,
"corner": "",
"cover": ""
}
],
"rqt_type": "search"
},
"message": "OK",
"ttl": 1
}
| Field | Meaning |
|---|---|
data.result[].bvid / data.result[].aid | The BV ID and numeric AV ID of the video. arcurl holds the video page link when it is set. |
data.result[].author / data.result[].mid | Name and numeric ID of the uploader. |
data.result[].play / data.result[].danmaku / data.result[].favorites / data.result[].like | Counts of plays, danmaku comments, favorites and likes for the video. |
data.result[].duration | Video length as a text value such as 11:21. |
data.result[].pubdate | Publish time as a Unix timestamp in seconds. |
data.result[].description | Video description text. The desc field is empty in this response. |
data.result[].pic | Cover image URL. It starts with //, so add a scheme such as https: before use. |
data.result[].hit_columns | Lists which parts of the video matched the keyword, such as title, description, author or tag. It is null for some results. |
data.result[].rank_index | Position of the result in the ranking, starting at 1. |
data.result[].biz_data | Extra block that holds ad data. It is null for normal results and filled for ad slots, where is_ad_loc is true. |
data.page / data.pagesize / data.numPages / data.numResults / data.next | Current page number, results per page, total pages, total result count and the next page number. |
page to move through results. The response data.next gives the next page number, and data.page shows the current one.order values are general (default), click, pubdate, dm and stow.data.result[]. They have a filled biz_data object, and some have an empty arcurl, pic, or zero like and favorites.bvid with Bilibili Video Details or Bilibili Video Comments. Use mid with Bilibili User Profile.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/bilibili/search-video" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"order": "general",
"keyword": "原神"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
keywordstringจำเป็นSearch keyword.
pagestringPage number for pagination.
orderstringSorting criteria for search results.
ค่าเริ่มต้น: "general"
ค่าที่เป็นไปได้: general, click, pubdate, dm, stow
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Bilibili Video SearchAPI นี้ Bilibili | $0.014286 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/bilibili/search-video โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: keyword (string). ตัวเลือก: page (string) และ order (หนึ่งใน general, click, pubdate, dm, stow). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili Video Search ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก