share_linkstringจำเป็น
User share link
https://api.sandbase.ai/v1/api/bilibili/web/get-user-idExtracts and returns a Bilibili user ID from a provided space share link. Takes a user profile URL and resolves the numeric account identifier.
[
{
"data": {
"user_id": "178360345"
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
This API takes a Bilibili user space share link in share_link and returns the numeric user ID found in it. The response has one field, user_id, returned as a string.
https://space.bilibili.com/... link into a numeric ID for storage or matching.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/get-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"share_link": "https://space.bilibili.com/178360345"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
share_link | string | Yes | User share link |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"user_id": "178360345"
}
| Field | Meaning |
|---|---|
user_id | The numeric Bilibili account ID taken from the share link. For the example link https://space.bilibili.com/178360345, the value is "178360345". |
user_id | The value is a JSON string, not a number. Keep it as text when you store it or pass it on. |
user_id | This is the only field in the response. It matches the number at the end of the space link in share_link. |
https://space.bilibili.com/178360345 in share_link.user_id is a string, so keep it as text if you pass it on to other calls.$0.001 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/web/get-user-id" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"share_link": "https://static.sandbase.ai/examples/1d420101-6aa7-4cbd-a4d5-e04674de7ca9/input/1094426c-12a0-4ab7-aa39-e91b0f14d3c4.bin"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
share_linkstringจำเป็นUser share link
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"user_id": "178360345"
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Bilibili User ID ExtractionAPI นี้ Bilibili | $0.001 ต่อการเรียก | 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/web/get-user-id โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: share_link (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili User ID Extraction ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก