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
}
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
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.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォーム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キーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_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 |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/bilibili/web/user-relation-stat に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.001。各組織には UTC 日ごとに 100 回の無料呼び出しが付与され、この API を含む対象の SandBase API 全体で共有されます。それ以降は、各呼び出しが SandBase 残高からこの料金で課金されます。サブスクリプションはありません。
必須: uid (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Bilibili User Relation Statistics は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Bilibili の API アクセスを別途申請する必要はありません。