uidstringจำเป็น
User UID
https://api.sandbase.ai/v1/api/bilibili/web/user-relation-statReturns relationship statistics, including following and follower counts, for a specified Bilibili account using their user ID.
[
{
"data": {
"black": 0,
"fans_effect": null,
"fans_medal_toast": null,
"follower": 71,
"following": 32,
"mid": 178360345,
"whisper": 0
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns relationship counts for one Bilibili account, including how many accounts it follows and how many follow it. It needs the numeric user ID in uid.
follower count of a Bilibili creator each day to chart audience growth.follower to following across a list of accounts to sort them by audience size.uid matches the mid you expect before you run further lookups on the account.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/user-relation-stat" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"uid": "178360345"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
uid | string | Yes | User UID |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"black": 0,
"fans_effect": null,
"fans_medal_toast": null,
"follower": 73,
"following": 27,
"mid": 178360345,
"whisper": 0
}
| Field | Meaning |
|---|---|
follower | Number of accounts that follow this user. |
following | Number of accounts this user follows. |
mid | Numeric Bilibili user ID of the account. It matches the uid you sent. |
black | Blacklist count for the account. The response shows 0 and gives no further detail. |
whisper | Whisper count for the account. The response shows 0 and gives no further detail. |
fans_effect / fans_medal_toast | Fan-related display settings. Both are null in this response. |
uid, for example 178360345.$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/user-relation-stat" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uid": "178360345"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
uidstringจำเป็นUser UID
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"black": 0,
"fans_effect": null,
"fans_medal_toast": null,
"follower": 71,
"following": 32,
"mid": 178360345,
"whisper": 0
}
}
]สำรวจเพิ่มเติม
| 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 |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/bilibili/web/user-relation-stat โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง ทุกองค์กรจะได้รับคำขอฟรี 100 ครั้งต่อวัน UTC โดยใช้ร่วมกันใน SandBase APIs ที่เข้าเงื่อนไขรวมถึงรายการนี้ หลังจากนั้นแต่ละคำขอจะคิดค่าบริการตามราคานี้จากยอดคงเหลือ SandBase ของคุณ ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: uid (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili User Relation Statistics ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก