Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Bilibili User Relation Statistics

Tài liệu API
https://api.sandbase.ai/v1/api/bilibili/web/user-relation-stat

Returns relationship statistics, including following and follower counts, for a specified Bilibili account using their user ID.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn
100 lượt gọi miễn phí / ngày100 lượt gọi đầu tiên mỗi ngày miễn phí (chia sẻ theo tổ chức) · Đặt lại lúc 00:00 UTC. Sau đó tính phí theo mỗi lượt gọi.

Phòng thử nghiệm

Đầu vào
User UID
Đầu raVí dụ
Phản hồioutputs · 196 B · 13 dòng
[
  {
    "data": {
      "black": 0,
      "fans_effect": null,
      "fans_medal_toast": null,
      "follower": 71,
      "following": 32,
      "mid": 178360345,
      "whisper": 0
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Bilibili User Relation Statistics API

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.

Use cases

  • Record the follower count of a Bilibili creator each day to chart audience growth.
  • Show following and follower numbers on a creator card inside your own dashboard.
  • Compare follower to following across a list of accounts to sort them by audience size.
  • Confirm that a uid matches the mid you expect before you run further lookups on the account.

Request

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.

Parameters

NameTypeRequiredDescription
uidstringYesUser UID

Example response

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
}

Response fields

FieldMeaning
followerNumber of accounts that follow this user.
followingNumber of accounts this user follows.
midNumeric Bilibili user ID of the account. It matches the uid you sent.
blackBlacklist count for the account. The response shows 0 and gives no further detail.
whisperWhisper count for the account. The response shows 0 and gives no further detail.
fans_effect / fans_medal_toastFan-related display settings. Both are null in this response.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Bilibili$0.001 mỗi lần gọiJSON
Bilibili$0.001 mỗi lần gọiJSON
Bilibili$0.001 mỗi lần gọiJSON
Bilibili$0.001 mỗi lần gọiJSON
Bilibili$0.001 mỗi lần gọiJSON
Bilibili$0.001 mỗi lần gọiJSON

Hướng dẫn:Best Bilibili API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Bilibili User Relation Statistics?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/bilibili/web/user-relation-stat với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Bilibili User Relation Statistics có giá bao nhiêu?

$0.001 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.

API Bilibili User Relation Statistics chấp nhận những tham số nào?

Bắt buộc: uid (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Bilibili User Relation Statistics trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Bilibili không?

Không. Bilibili User Relation Statistics chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Bilibili.