---
title: "Bilibili ユーザープロフィール API (V2)"
description: "UIDで識別したBilibiliユーザープロフィールを取得します。これを使用して、クリエイターの研究、プロフィールレビュー、またはそのユーザーの動画の後続の取得を行ったりすることができます。"
lastUpdated: false
aiUsagePrompt: true
---

# Bilibili ユーザープロフィール API \(V2\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/bilibili/get-user-detail/v2\"")'
  :summary='JSON.parse("\"ユーザープロフィール (V2)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/bilibili/user-profile-v2-ja.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"APIのアクセストークン。\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"uid\",\"in\":\"query\",\"description\":\"BilibiliユーザーID (UID)。\",\"required\":true,\"schema\":{\"type\":\"string\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"OK\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":[\"object\",\"null\"],\"description\":\"ユーザースペースの検索結果。一部の成功した応答にはメッセージのみが含まれています。\",\"properties\":{\"message\":{\"type\":\"string\",\"description\":\"ユーザースペースを含まない場合に返されるメッセージ。\"},\"space\":{\"type\":\"object\",\"description\":\"プロフィールを含む場合のユーザースペースデータ。\",\"properties\":{\"mid\":{\"type\":\"integer\",\"description\":\"返されるユーザースペースのBilibili UID。\"},\"info\":{\"type\":\"object\",\"description\":\"ユーザースペースに表示されるプロフィール情報。\",\"properties\":{\"mid\":{\"type\":\"integer\",\"description\":\"プロフィールに報告されるBilibili UID。\"},\"name\":{\"type\":\"string\",\"description\":\"ユーザースペースに表示される表示名。\"},\"face\":{\"type\":\"string\",\"description\":\"プロフィールアバターのURL。\"},\"sign\":{\"type\":\"string\",\"description\":\"プロフィールの紹介テキスト。空でも構いません。\"},\"sex\":{\"type\":\"string\",\"description\":\"プロフィールに表示される性別ラベル。\"},\"birthday\":{\"type\":\"string\",\"description\":\"プロフィールに提供された場合の誕生日テキスト。\"},\"level\":{\"type\":\"integer\",\"description\":\"プロフィールに報告されるBilibiliアカウントレベル。\"},\"top_photo\":{\"type\":\"string\",\"description\":\"プロフィールスペースのカバー画像URL。\"},\"top_photo_v2\":{\"type\":\"object\",\"description\":\"プロフィールスペースカバー画像のバリアント。\",\"properties\":{\"sid\":{\"type\":\"integer\",\"description\":\"選択されたスペースカバー画像の識別子。\"},\"l_img\":{\"type\":\"string\",\"description\":\"大きなスペースカバー画像URL。\"},\"l_200h_img\":{\"type\":\"string\",\"description\":\"200件のバリアントのスペースカバー画像URL。\"}}},\"tags\":{\"type\":[\"array\",\"null\"],\"description\":\"利用可能な場合のプロフィールに表示されるタグ。\",\"items\":{\"type\":\"string\",\"description\":\"結果に表示されるプロフィールタグの一つ。\"}},\"certificate_show\":{\"type\":\"boolean\",\"description\":\"返されるプロフィールが認証を表示しているかどうか。\"},\"official\":{\"type\":\"object\",\"description\":\"プロフィールに関する公式検証情報の報告内容。\",\"properties\":{\"role\":{\"type\":\"integer\",\"description\":\"報告された公式検証のロールコード。\"},\"type\":{\"type\":\"integer\",\"description\":\"報告された公式検証のタイプコード。\"},\"title\":{\"type\":\"string\",\"description\":\"プロフィールに表示される公式検証のタイトル。\"},\"desc\":{\"type\":\"string\",\"description\":\"提供されている場合の公式検証の説明テキスト。\"}}},\"attestation\":{\"type\":\"object\",\"description\":\"プロフィールに表示される検証ラベルとアイコン。\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"プロフィールの報告された認証タイプコード。\"},\"icon\":{\"type\":\"string\",\"description\":\"提供されている場合の検証アイコンのURL。\"},\"desc\":{\"type\":\"string\",\"description\":\"検証表示に関連する説明テキスト。\"},\"common_info\":{\"type\":\"object\",\"description\":\"検証のタイトルとプレフィックス情報。\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"検証ラベルに表示されるタイトル。\"},\"prefix\":{\"type\":\"string\",\"description\":\"検証ラベルに返されるプレフィックス。\"},\"prefix_title\":{\"type\":\"string\",\"description\":\"検証プレフィックスに付随するタイトル。\"}}},\"splice_info\":{\"type\":\"object\",\"description\":\"検証表示の組み合わせ情報。\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"検証表示に表示される組み合わせタイトル。\"}}}}},\"vip\":{\"type\":\"object\",\"description\":\"プロフィールに報告されるVIP会員情報。\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"ユーザーに関する報告されたVIP会員のタイプコード。\"},\"status\":{\"type\":\"integer\",\"description\":\"ユーザーに関する報告されたVIP会員のステータスコード。\"},\"due_date\":{\"type\":\"integer\",\"description\":\"VIP会員の有効期限タイムスタンプ値。ゼロでもよい。\"},\"nickname_color\":{\"type\":\"string\",\"description\":\"VIP表示に関連するニックネームの色。\"},\"label\":{\"type\":\"object\",\"description\":\"プロフィールと共に返されるVIPバッジ情報。\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"VIPラベルに表示されるテキスト。\"},\"label_id\":{\"type\":\"integer\",\"description\":\"プロフィールと共に報告されるVIPラベルの識別子。\"},\"label_goto\":{\"type\":[\"object\",\"null\"],\"description\":\"VIPラベルがある場合、VIPラベルからリンクされる目的地。\",\"properties\":{\"mobile\":{\"type\":\"string\",\"description\":\"モバイル端末でVIPラベルによって開かれるリンク。\"},\"pc_web\":{\"type\":\"string\",\"description\":\"デスクトップウェブでVIPラベルによって開かれるリンク。\"}}},\"img_label_uri_hans\":{\"type\":\"string\",\"description\":\"簡体中国語用のVIPバッジ画像URL。\"},\"img_label_uri_hans_static\":{\"type\":\"string\",\"description\":\"簡体中国語用の静的VIPバッジ画像URL。\"},\"img_label_uri_hant_static\":{\"type\":\"string\",\"description\":\"繁体中国語用の静的VIPバッジ画像URL。\"}}}}},\"nameplate\":{\"type\":\"object\",\"description\":\"アカウントのプロフィールに表示されるプロフィール名板。\",\"properties\":{\"nid\":{\"type\":\"integer\",\"description\":\"表示されるプロフィール名板の識別子。\"},\"name\":{\"type\":\"string\",\"description\":\"表示されるプロフィール名板の名前。\"},\"image\":{\"type\":\"string\",\"description\":\"プロフィール名板の画像URL。\"},\"image_small\":{\"type\":\"string\",\"description\":\"小さなプロフィール名板の画像URL。\"},\"level\":{\"type\":\"string\",\"description\":\"プロフィール名板に付けられたレベルラベル。\"},\"condition\":{\"type\":\"string\",\"description\":\"プロフィール名板の条件を説明するテキスト。\"}}},\"pendant\":{\"type\":\"object\",\"description\":\"プロフィールに表示されるアバターペンダント情報。\",\"properties\":{\"pid\":{\"type\":\"integer\",\"description\":\"プロフィールに報告されるアバターペンダントの識別子。\"},\"name\":{\"type\":\"string\",\"description\":\"プロフィール画像の装飾の名前。\"},\"image\":{\"type\":\"string\",\"description\":\"アバターペンダントの画像URL。\"},\"image_enhance\":{\"type\":\"string\",\"description\":\"提供された場合のアップグレードされたアバターペンダントの画像URL。\"}}},\"fans_badge\":{\"type\":\"boolean\",\"description\":\"ユーザーに対して報告されるファンバッジフラグ。\"},\"fans_medal\":{\"type\":\"object\",\"description\":\"プロフィールに表示されるファンメダルの情報。\",\"properties\":{\"show\":{\"type\":\"boolean\",\"description\":\"プロフィールに表示するためにファンメダルがマークされているかどうか。\"},\"wear\":{\"type\":\"boolean\",\"description\":\"プロフィールがファンメダルが着用されていることを示しているかどうか。\"},\"detail\":{\"type\":[\"object\",\"null\"],\"description\":\"利用可能な場合の詳細なファンメダル情報。\",\"properties\":{\"medal_id\":{\"type\":\"integer\",\"description\":\"表示されるファンメダルの識別子。\"},\"medal_name\":{\"type\":\"string\",\"description\":\"詳細情報に表示されるファンメダルの名前。\"},\"level\":{\"type\":\"integer\",\"description\":\"詳細情報に報告されるファンメダルのレベル。\"}}},\"medal\":{\"type\":[\"object\",\"null\"],\"description\":\"ファンメダル情報が利用可能な場合に表示されます。\",\"properties\":{\"medal_name\":{\"type\":\"string\",\"description\":\"表示されるファンメダルの名前。\"},\"level\":{\"type\":\"integer\",\"description\":\"表示されるファンメダルのレベル。\"}}}}},\"live_room\":{\"type\":[\"object\",\"null\"],\"description\":\"プロフィールに報告されるライブルーム情報が利用可能な場合。\",\"properties\":{\"roomid\":{\"type\":\"integer\",\"description\":\"BilibiliライブルームのID。\"},\"roomStatus\":{\"type\":\"integer\",\"description\":\"報告されたライブルームの利用可能状態コード。\"},\"liveStatus\":{\"type\":\"integer\",\"description\":\"ライブルームの放送状態コード。\"},\"title\":{\"type\":\"string\",\"description\":\"ライブルームに表示されるタイトル。\"},\"cover\":{\"type\":\"string\",\"description\":\"ライブ配信ルームのカバー画像 URL。\"},\"url\":{\"type\":\"string\",\"description\":\"ライブ配信ルームの URL。\"},\"watched_show\":{\"type\":\"object\",\"description\":\"ライブルームに付随される視聴者数の表示。\",\"properties\":{\"num\":{\"type\":\"integer\",\"description\":\"ライブルーム表示に報告される数値の視聴者数。\"},\"text_small\":{\"type\":\"string\",\"description\":\"ライブルームに表示される短い視聴者数テキスト。\"},\"text_large\":{\"type\":\"string\",\"description\":\"ライブルームに表示される長い視聴者数テキスト。\"}}}}},\"elec\":{\"type\":\"object\",\"description\":\"プロフィールのクリエイターサポートセクションに関する情報。\",\"properties\":{\"show_info\":{\"type\":\"object\",\"description\":\"クリエイターサポートセクションの表示情報。\",\"properties\":{\"show\":{\"type\":\"boolean\",\"description\":\"クリエイターサポートセクションが表示されるかどうか。\"},\"title\":{\"type\":\"string\",\"description\":\"クリエイターサポートセクションに表示されるタイトル。\"},\"total\":{\"type\":\"integer\",\"description\":\"クリエイターサポート表示に報告される総数。\"}}}}}}},\"feedList\":{\"type\":\"object\",\"description\":\"プロフィールに返されるスペースフィード情報。\",\"properties\":{\"result\":{\"type\":\"array\",\"description\":\"プロフィール情報が存在する場合でも、配列が空になることがあるスペースフィード応答に含まれるエントリ。\"}}}}}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"有効でないリクエストパラメータまたはボディ。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"有効でないまたは無効なアクセストークン。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"権限拒否。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"リクエストレートまたは日次クォーターリミットを超過。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"内部サーバーエラー。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"サービスが一時的に利用できない。\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"グローバルプロダクションAPI（デフォルト）\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/bilibili/get-user-detail/v2\"")' />

<p>UIDで識別したBilibiliユーザープロフィールを取得します。これを使用して、クリエイターの研究、プロフィールレビュー、またはそのユーザーの動画の後続の取得を行ったりすることができます。</p>

## パラメータ

<div class="api-doc-table api-doc-table--params">

| 名前 | パラメーターの場所 | タイプ | 必須 | デフォルト | 説明 |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | はい | - | APIのアクセストークン。 |
| <code>uid</code> | query | <code>string</code> | はい | - | BilibiliユーザーID (UID)。 |

</div>

## コードサンプル

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE'
```

```text [🤖 AIプロンプト]
私はJustOneAPIの"ユーザープロフィール (V2)" APIを使用したいです。
基本URL: https://api.justoneapi.com.
APIパス: /api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE
APIエンドポイント: BASE_URL + /api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE
HTTPメソッド: GET
認証: "token"クエリパラメーターをURLに追加します。
OpenAPI定義: https://docs.justoneapi.com/openapi/bilibili/user-profile-v2-ja.json

パラメーター:
- token (query): APIのアクセストークン。 (必須)
- uid (query): BilibiliユーザーID (UID)。 (必須)

返信形式：実際のContent-Typeに応じて、JSONまたはテキストを安全に処理する。

レスポンスの処理とエラーコード：
1. API の処理結果はレスポンス本文の「code」フィールドで判定します。code が 0 なら成功です。
2. 推奨タイムアウト：リクエストのタイムアウトは 120 秒に設定してください。120 秒が長すぎる場合でも、最低 60 秒を確保してください。一部のリクエストは、結果を受け取る前にタイムアウトすることがあります。
3. 処理結果コード：
   - 0: 成功
   - 100: 無効または停止中のトークン
   - 301: データの取得に失敗しました。再試行してください。
   - 302: 呼び出し頻度の上限を超えました
   - 303: 日次の利用上限を超えました
   - 400: パラメーターが無効です
   - 500: サーバー内部エラー
   - 600: アクセス権限がありません
   - 601: 残高不足
   - 602: トークンの予算上限に達しました
4. コード 601 はアカウントの共有残高不足を示します。コード 602 は使用中の API トークン固有の累積予算上限に達したことを示します。トークンに予算上限を設定しても、共有残高から資金が移動することはありません。

お手伝いください。私が好むプログラミング言語でこのAPIを呼び出し、レスポンスを処理するスクリプトを作成してください。
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # オープンAPIサーバーによって提供される

url = BASE_URL + "/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // オープンAPIサーバーによって提供される
const url = BASE_URL + "/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // オープンAPIサーバーによって提供される
        final String url = BASE_URL + "/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // オープンAPIサーバーによって提供される

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // オープンAPIサーバーによって提供される
$url = $BASE_URL . '/api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/bilibili/user-profile-v2-ja.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI定義 (JSON)]</a>
</div>

## レスポンスフィールド

成功したレスポンスのキーフィールド（`code = 0`）。

<div class="api-doc-table api-doc-table--response">

| フィールドパス | タイプ | 説明 |
| --- | --- | --- |
| <code>data</code> | <code>object &#124; null</code> | ユーザースペースの検索結果。一部の成功した応答にはメッセージのみが含まれています。 |
| <code>data.message</code> | <code>string</code> | ユーザースペースを含まない場合に返されるメッセージ。 |
| <code>data.space</code> | <code>object</code> | プロフィールを含む場合のユーザースペースデータ。 |
| <code>data.space.mid</code> | <code>integer</code> | 返されるユーザースペースのBilibili UID。 |
| <code>data.space.info</code> | <code>object</code> | ユーザースペースに表示されるプロフィール情報。 |
| <code>data.space.info.mid</code> | <code>integer</code> | プロフィールに報告されるBilibili UID。 |
| <code>data.space.info.name</code> | <code>string</code> | ユーザースペースに表示される表示名。 |
| <code>data.space.info.face</code> | <code>string</code> | プロフィールアバターのURL。 |
| <code>data.space.info.sign</code> | <code>string</code> | プロフィールの紹介テキスト。空でも構いません。 |
| <code>data.space.info.sex</code> | <code>string</code> | プロフィールに表示される性別ラベル。 |
| <code>data.space.info.birthday</code> | <code>string</code> | プロフィールに提供された場合の誕生日テキスト。 |
| <code>data.space.info.level</code> | <code>integer</code> | プロフィールに報告されるBilibiliアカウントレベル。 |
| <code>data.space.info.top_photo</code> | <code>string</code> | プロフィールスペースのカバー画像URL。 |
| <code>data.space.info.top_photo_v2</code> | <code>object</code> | プロフィールスペースカバー画像のバリアント。 |
| <code>data.space.info.top_photo_v2.sid</code> | <code>integer</code> | 選択されたスペースカバー画像の識別子。 |
| <code>data.space.info.top_photo_v2.l_img</code> | <code>string</code> | 大きなスペースカバー画像URL。 |
| <code>data.space.info.top_photo_v2.l_200h_img</code> | <code>string</code> | 200件のバリアントのスペースカバー画像URL。 |
| <code>data.space.info.tags</code> | <code>array &#124; null</code> | 利用可能な場合のプロフィールに表示されるタグ。 |
| <code>data.space.info.tags[]</code> | <code>string</code> | 結果に表示されるプロフィールタグの一つ。 |
| <code>data.space.info.certificate_show</code> | <code>boolean</code> | 返されるプロフィールが認証を表示しているかどうか。 |
| <code>data.space.info.official</code> | <code>object</code> | プロフィールに関する公式検証情報の報告内容。 |
| <code>data.space.info.official.role</code> | <code>integer</code> | 報告された公式検証のロールコード。 |
| <code>data.space.info.official.type</code> | <code>integer</code> | 報告された公式検証のタイプコード。 |
| <code>data.space.info.official.title</code> | <code>string</code> | プロフィールに表示される公式検証のタイトル。 |
| <code>data.space.info.official.desc</code> | <code>string</code> | 提供されている場合の公式検証の説明テキスト。 |
| <code>data.space.info.attestation</code> | <code>object</code> | プロフィールに表示される検証ラベルとアイコン。 |
| <code>data.space.info.attestation.type</code> | <code>integer</code> | プロフィールの報告された認証タイプコード。 |
| <code>data.space.info.attestation.icon</code> | <code>string</code> | 提供されている場合の検証アイコンのURL。 |
| <code>data.space.info.attestation.desc</code> | <code>string</code> | 検証表示に関連する説明テキスト。 |
| <code>data.space.info.attestation.common_info</code> | <code>object</code> | 検証のタイトルとプレフィックス情報。 |
| <code>data.space.info.attestation.common_info.title</code> | <code>string</code> | 検証ラベルに表示されるタイトル。 |
| <code>data.space.info.attestation.common_info.prefix</code> | <code>string</code> | 検証ラベルに返されるプレフィックス。 |
| <code>data.space.info.attestation.common_info.prefix_title</code> | <code>string</code> | 検証プレフィックスに付随するタイトル。 |
| <code>data.space.info.attestation.splice_info</code> | <code>object</code> | 検証表示の組み合わせ情報。 |
| <code>data.space.info.attestation.splice_info.title</code> | <code>string</code> | 検証表示に表示される組み合わせタイトル。 |
| <code>data.space.info.vip</code> | <code>object</code> | プロフィールに報告されるVIP会員情報。 |
| <code>data.space.info.vip.type</code> | <code>integer</code> | ユーザーに関する報告されたVIP会員のタイプコード。 |
| <code>data.space.info.vip.status</code> | <code>integer</code> | ユーザーに関する報告されたVIP会員のステータスコード。 |
| <code>data.space.info.vip.due_date</code> | <code>integer</code> | VIP会員の有効期限タイムスタンプ値。ゼロでもよい。 |
| <code>data.space.info.vip.nickname_color</code> | <code>string</code> | VIP表示に関連するニックネームの色。 |
| <code>data.space.info.vip.label</code> | <code>object</code> | プロフィールと共に返されるVIPバッジ情報。 |
| <code>data.space.info.vip.label.text</code> | <code>string</code> | VIPラベルに表示されるテキスト。 |
| <code>data.space.info.vip.label.label_id</code> | <code>integer</code> | プロフィールと共に報告されるVIPラベルの識別子。 |
| <code>data.space.info.vip.label.label_goto</code> | <code>object &#124; null</code> | VIPラベルがある場合、VIPラベルからリンクされる目的地。 |
| <code>data.space.info.vip.label.label_goto.mobile</code> | <code>string</code> | モバイル端末でVIPラベルによって開かれるリンク。 |
| <code>data.space.info.vip.label.label_goto.pc_web</code> | <code>string</code> | デスクトップウェブでVIPラベルによって開かれるリンク。 |
| <code>data.space.info.vip.label.img_label_uri_hans</code> | <code>string</code> | 簡体中国語用のVIPバッジ画像URL。 |
| <code>data.space.info.vip.label.img_label_uri_hans_static</code> | <code>string</code> | 簡体中国語用の静的VIPバッジ画像URL。 |
| <code>data.space.info.vip.label.img_label_uri_hant_static</code> | <code>string</code> | 繁体中国語用の静的VIPバッジ画像URL。 |
| <code>data.space.info.nameplate</code> | <code>object</code> | アカウントのプロフィールに表示されるプロフィール名板。 |
| <code>data.space.info.nameplate.nid</code> | <code>integer</code> | 表示されるプロフィール名板の識別子。 |
| <code>data.space.info.nameplate.name</code> | <code>string</code> | 表示されるプロフィール名板の名前。 |
| <code>data.space.info.nameplate.image</code> | <code>string</code> | プロフィール名板の画像URL。 |
| <code>data.space.info.nameplate.image_small</code> | <code>string</code> | 小さなプロフィール名板の画像URL。 |
| <code>data.space.info.nameplate.level</code> | <code>string</code> | プロフィール名板に付けられたレベルラベル。 |
| <code>data.space.info.nameplate.condition</code> | <code>string</code> | プロフィール名板の条件を説明するテキスト。 |
| <code>data.space.info.pendant</code> | <code>object</code> | プロフィールに表示されるアバターペンダント情報。 |
| <code>data.space.info.pendant.pid</code> | <code>integer</code> | プロフィールに報告されるアバターペンダントの識別子。 |
| <code>data.space.info.pendant.name</code> | <code>string</code> | プロフィール画像の装飾の名前。 |
| <code>data.space.info.pendant.image</code> | <code>string</code> | アバターペンダントの画像URL。 |
| <code>data.space.info.pendant.image_enhance</code> | <code>string</code> | 提供された場合のアップグレードされたアバターペンダントの画像URL。 |
| <code>data.space.info.fans_badge</code> | <code>boolean</code> | ユーザーに対して報告されるファンバッジフラグ。 |
| <code>data.space.info.fans_medal</code> | <code>object</code> | プロフィールに表示されるファンメダルの情報。 |
| <code>data.space.info.fans_medal.show</code> | <code>boolean</code> | プロフィールに表示するためにファンメダルがマークされているかどうか。 |
| <code>data.space.info.fans_medal.wear</code> | <code>boolean</code> | プロフィールがファンメダルが着用されていることを示しているかどうか。 |
| <code>data.space.info.fans_medal.detail</code> | <code>object &#124; null</code> | 利用可能な場合の詳細なファンメダル情報。 |
| <code>data.space.info.fans_medal.detail.medal_id</code> | <code>integer</code> | 表示されるファンメダルの識別子。 |
| <code>data.space.info.fans_medal.detail.medal_name</code> | <code>string</code> | 詳細情報に表示されるファンメダルの名前。 |
| <code>data.space.info.fans_medal.detail.level</code> | <code>integer</code> | 詳細情報に報告されるファンメダルのレベル。 |
| <code>data.space.info.fans_medal.medal</code> | <code>object &#124; null</code> | ファンメダル情報が利用可能な場合に表示されます。 |
| <code>data.space.info.fans_medal.medal.medal_name</code> | <code>string</code> | 表示されるファンメダルの名前。 |
| <code>data.space.info.fans_medal.medal.level</code> | <code>integer</code> | 表示されるファンメダルのレベル。 |
| <code>data.space.info.live_room</code> | <code>object &#124; null</code> | プロフィールに報告されるライブルーム情報が利用可能な場合。 |
| <code>data.space.info.live_room.roomid</code> | <code>integer</code> | BilibiliライブルームのID。 |
| <code>data.space.info.live_room.roomStatus</code> | <code>integer</code> | 報告されたライブルームの利用可能状態コード。 |
| <code>data.space.info.live_room.liveStatus</code> | <code>integer</code> | ライブルームの放送状態コード。 |
| <code>data.space.info.live_room.title</code> | <code>string</code> | ライブルームに表示されるタイトル。 |
| <code>data.space.info.live_room.cover</code> | <code>string</code> | ライブ配信ルームのカバー画像 URL。 |
| <code>data.space.info.live_room.url</code> | <code>string</code> | ライブ配信ルームの URL。 |
| <code>data.space.info.live_room.watched_show</code> | <code>object</code> | ライブルームに付随される視聴者数の表示。 |
| <code>data.space.info.live_room.watched_show.num</code> | <code>integer</code> | ライブルーム表示に報告される数値の視聴者数。 |
| <code>data.space.info.live_room.watched_show.text_small</code> | <code>string</code> | ライブルームに表示される短い視聴者数テキスト。 |
| <code>data.space.info.live_room.watched_show.text_large</code> | <code>string</code> | ライブルームに表示される長い視聴者数テキスト。 |
| <code>data.space.info.elec</code> | <code>object</code> | プロフィールのクリエイターサポートセクションに関する情報。 |
| <code>data.space.info.elec.show_info</code> | <code>object</code> | クリエイターサポートセクションの表示情報。 |
| <code>data.space.info.elec.show_info.show</code> | <code>boolean</code> | クリエイターサポートセクションが表示されるかどうか。 |
| <code>data.space.info.elec.show_info.title</code> | <code>string</code> | クリエイターサポートセクションに表示されるタイトル。 |
| <code>data.space.info.elec.show_info.total</code> | <code>integer</code> | クリエイターサポート表示に報告される総数。 |
| <code>data.space.feedList</code> | <code>object</code> | プロフィールに返されるスペースフィード情報。 |
| <code>data.space.feedList.result</code> | <code>array</code> | プロフィール情報が存在する場合でも、配列が空になることがあるスペースフィード応答に含まれるエントリ。 |

</div>

## レスポンス例

<ApiExampleSection :api='JSON.parse("\"/api/bilibili/get-user-detail/v2\"")' />

