---
title: "Bilibili User Profile API (V2)"
description: "Retrieves a Bilibili user profile identified by UID. Use it to look up a known account for creator research, profile review, or subsequent retrieval of that user's videos."
aiUsagePrompt: true
---

# Bilibili User Profile API \(V2\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/bilibili/get-user-detail/v2\"")'
  :summary='JSON.parse("\"User Profile (V2)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/bilibili/user-profile-v2-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Access token for the API.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"uid\",\"in\":\"query\",\"description\":\"Bilibili User 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\":\"User space lookup result. Some successful responses contain only a message.\",\"properties\":{\"message\":{\"type\":\"string\",\"description\":\"Message returned when the lookup does not include a user space.\"},\"space\":{\"type\":\"object\",\"description\":\"User space data when the lookup includes a profile.\",\"properties\":{\"mid\":{\"type\":\"integer\",\"description\":\"Bilibili UID of the returned user space.\"},\"info\":{\"type\":\"object\",\"description\":\"Profile information displayed in the user space.\",\"properties\":{\"mid\":{\"type\":\"integer\",\"description\":\"Bilibili UID reported in the profile.\"},\"name\":{\"type\":\"string\",\"description\":\"Display name shown in the user space.\"},\"face\":{\"type\":\"string\",\"description\":\"URL of the profile avatar.\"},\"sign\":{\"type\":\"string\",\"description\":\"Profile introduction text. It can be empty.\"},\"sex\":{\"type\":\"string\",\"description\":\"Gender label displayed in the profile.\"},\"birthday\":{\"type\":\"string\",\"description\":\"Birthday text shown in the profile when provided.\"},\"level\":{\"type\":\"integer\",\"description\":\"Bilibili account level reported in the profile.\"},\"top_photo\":{\"type\":\"string\",\"description\":\"Profile space cover image URL.\"},\"top_photo_v2\":{\"type\":\"object\",\"description\":\"Profile space cover image variants.\",\"properties\":{\"sid\":{\"type\":\"integer\",\"description\":\"Identifier of the selected space cover.\"},\"l_img\":{\"type\":\"string\",\"description\":\"Large space cover image URL.\"},\"l_200h_img\":{\"type\":\"string\",\"description\":\"Space cover image URL for the 200-high variant.\"}}},\"tags\":{\"type\":[\"array\",\"null\"],\"description\":\"Tags shown in the profile when available.\",\"items\":{\"type\":\"string\",\"description\":\"One profile tag shown in the result.\"}},\"certificate_show\":{\"type\":\"boolean\",\"description\":\"Whether the returned profile indicates that certification is displayed.\"},\"official\":{\"type\":\"object\",\"description\":\"Official verification information reported for the profile.\",\"properties\":{\"role\":{\"type\":\"integer\",\"description\":\"Reported official verification role code.\"},\"type\":{\"type\":\"integer\",\"description\":\"Reported official verification type code.\"},\"title\":{\"type\":\"string\",\"description\":\"Official verification title shown in the profile.\"},\"desc\":{\"type\":\"string\",\"description\":\"Official verification description text when provided.\"}}},\"attestation\":{\"type\":\"object\",\"description\":\"Verification labels and icon shown in the profile.\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"Reported attestation type code for the profile.\"},\"icon\":{\"type\":\"string\",\"description\":\"Verification icon URL when provided.\"},\"desc\":{\"type\":\"string\",\"description\":\"Description text associated with the verification display.\"},\"common_info\":{\"type\":\"object\",\"description\":\"Verification title and prefix information.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Title shown in the verification label.\"},\"prefix\":{\"type\":\"string\",\"description\":\"Prefix returned for the verification label.\"},\"prefix_title\":{\"type\":\"string\",\"description\":\"Title attached to the verification prefix.\"}}},\"splice_info\":{\"type\":\"object\",\"description\":\"Combined verification display information.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Combined title shown in the verification display.\"}}}}},\"vip\":{\"type\":\"object\",\"description\":\"VIP membership information reported in the profile.\",\"properties\":{\"type\":{\"type\":\"integer\",\"description\":\"VIP membership type code reported for the user.\"},\"status\":{\"type\":\"integer\",\"description\":\"VIP membership status code reported for the user.\"},\"due_date\":{\"type\":\"integer\",\"description\":\"VIP membership expiry timestamp value. It can be zero.\"},\"nickname_color\":{\"type\":\"string\",\"description\":\"Nickname color associated with the VIP display.\"},\"label\":{\"type\":\"object\",\"description\":\"VIP badge information returned with the profile.\",\"properties\":{\"text\":{\"type\":\"string\",\"description\":\"Text shown on the VIP label.\"},\"label_id\":{\"type\":\"integer\",\"description\":\"VIP label identifier reported with the profile.\"},\"label_goto\":{\"type\":[\"object\",\"null\"],\"description\":\"Destinations linked from the VIP label when present.\",\"properties\":{\"mobile\":{\"type\":\"string\",\"description\":\"Link opened by the VIP label on mobile.\"},\"pc_web\":{\"type\":\"string\",\"description\":\"Link opened by the VIP label on desktop web.\"}}},\"img_label_uri_hans\":{\"type\":\"string\",\"description\":\"VIP badge image URL for Simplified Chinese.\"},\"img_label_uri_hans_static\":{\"type\":\"string\",\"description\":\"Static VIP badge image URL for Simplified Chinese.\"},\"img_label_uri_hant_static\":{\"type\":\"string\",\"description\":\"Static VIP badge image URL for Traditional Chinese.\"}}}}},\"nameplate\":{\"type\":\"object\",\"description\":\"Profile nameplate displayed for the account.\",\"properties\":{\"nid\":{\"type\":\"integer\",\"description\":\"Identifier of the displayed nameplate.\"},\"name\":{\"type\":\"string\",\"description\":\"Name of the displayed nameplate.\"},\"image\":{\"type\":\"string\",\"description\":\"Nameplate image URL.\"},\"image_small\":{\"type\":\"string\",\"description\":\"Small nameplate image URL.\"},\"level\":{\"type\":\"string\",\"description\":\"Level label attached to the nameplate.\"},\"condition\":{\"type\":\"string\",\"description\":\"Text describing the conditions for the nameplate.\"}}},\"pendant\":{\"type\":\"object\",\"description\":\"Avatar pendant information shown in the profile.\",\"properties\":{\"pid\":{\"type\":\"integer\",\"description\":\"Avatar pendant identifier reported in the profile.\"},\"name\":{\"type\":\"string\",\"description\":\"Name of the avatar pendant.\"},\"image\":{\"type\":\"string\",\"description\":\"Avatar pendant image URL.\"},\"image_enhance\":{\"type\":\"string\",\"description\":\"Enhanced avatar pendant image URL when provided.\"}}},\"fans_badge\":{\"type\":\"boolean\",\"description\":\"Fan-badge flag reported for the user.\"},\"fans_medal\":{\"type\":\"object\",\"description\":\"Fan-medal information displayed in the profile.\",\"properties\":{\"show\":{\"type\":\"boolean\",\"description\":\"Whether the fan medal is marked for display in the profile.\"},\"wear\":{\"type\":\"boolean\",\"description\":\"Whether the profile indicates that the fan medal is worn.\"},\"detail\":{\"type\":[\"object\",\"null\"],\"description\":\"Detailed fan-medal information when available.\",\"properties\":{\"medal_id\":{\"type\":\"integer\",\"description\":\"Identifier of the displayed fan medal.\"},\"medal_name\":{\"type\":\"string\",\"description\":\"Fan-medal name shown in the detailed information.\"},\"level\":{\"type\":\"integer\",\"description\":\"Fan-medal level reported in the detailed information.\"}}},\"medal\":{\"type\":[\"object\",\"null\"],\"description\":\"Fan-medal display information when available.\",\"properties\":{\"medal_name\":{\"type\":\"string\",\"description\":\"Displayed fan-medal name.\"},\"level\":{\"type\":\"integer\",\"description\":\"Displayed fan-medal level.\"}}}}},\"live_room\":{\"type\":[\"object\",\"null\"],\"description\":\"Live-room information reported in the profile when available.\",\"properties\":{\"roomid\":{\"type\":\"integer\",\"description\":\"Bilibili live-room ID.\"},\"roomStatus\":{\"type\":\"integer\",\"description\":\"Reported live-room availability status code.\"},\"liveStatus\":{\"type\":\"integer\",\"description\":\"Reported broadcast status code for the live room.\"},\"title\":{\"type\":\"string\",\"description\":\"Title displayed for the live room.\"},\"cover\":{\"type\":\"string\",\"description\":\"Cover image URL for the live room.\"},\"url\":{\"type\":\"string\",\"description\":\"URL of the live room.\"},\"watched_show\":{\"type\":\"object\",\"description\":\"Audience-count display attached to the live room.\",\"properties\":{\"num\":{\"type\":\"integer\",\"description\":\"Numeric audience count reported in the live-room display.\"},\"text_small\":{\"type\":\"string\",\"description\":\"Short audience-count text shown for the live room.\"},\"text_large\":{\"type\":\"string\",\"description\":\"Long audience-count text shown for the live room.\"}}}}},\"elec\":{\"type\":\"object\",\"description\":\"Information for the creator-support section of the profile.\",\"properties\":{\"show_info\":{\"type\":\"object\",\"description\":\"Display information for the creator-support section.\",\"properties\":{\"show\":{\"type\":\"boolean\",\"description\":\"Whether the creator-support section is marked for display.\"},\"title\":{\"type\":\"string\",\"description\":\"Title shown in the creator-support section.\"},\"total\":{\"type\":\"integer\",\"description\":\"Total count reported in the creator-support display.\"}}}}}}},\"feedList\":{\"type\":\"object\",\"description\":\"Space-feed information returned with the profile.\",\"properties\":{\"result\":{\"type\":\"array\",\"description\":\"Entries included in the space-feed response. The array can be empty even when profile information is present.\"}}}}}}}}},\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"Invalid request parameters or body\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"Invalid or inactive access token\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"Permission denied\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"Request rate or daily quota limit exceeded\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"Internal server error\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"Service temporarily unavailable\",\"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\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"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},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

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

<p>Retrieves a Bilibili user profile identified by UID. Use it to look up a known account for creator research, profile review, or subsequent retrieval of that user's videos.</p>

## Parameters

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

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | Yes | - | Access token for the API. |
| <code>uid</code> | query | <code>string</code> | Yes | - | Bilibili User ID (UID). |

</div>

## Code Samples

::: 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 Prompt]
I want to use the "User Profile (V2)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE
API Endpoint: BASE_URL + /api/bilibili/get-user-detail/v2?token=YOUR_API_KEY&uid=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/bilibili/user-profile-v2-en.json

Parameters:
- token (query): Access token for the API. (Required)
- uid (query): Bilibili User ID (UID). (Required)

Return format: safely handle JSON or text according to the actual Content-Type.

Response Handling & Error Codes:
1. Business results should be determined by the "code" field in the response body (code 0 means success).
2. Timeout Recommendation: Set the request timeout to 120 seconds. If 120 seconds is too long for your use case, use at least 60 seconds, but a small number of requests may time out before receiving a result.
3. Business Code Reference:
   - 0: Success
   - 100: Invalid or Inactive Token
   - 301: Collection Failed. Please Retry.
   - 302: Rate Limit Exceeded
   - 303: Daily Quota Exceeded
   - 400: Invalid Parameters
   - 500: Internal Server Error
   - 600: Permission Denied
   - 601: Insufficient Balance
   - 602: Token Budget Exceeded
4. Code 601 means the shared account balance is insufficient. Code 602 means the current API token's own cumulative budget limit has been reached. Token budget limits do not transfer funds out of the shared account balance.

Please help me write a script in my preferred programming language to call this API and handle the response.
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # Provided by OpenAPI servers

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"; // Provided by OpenAPI servers
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"; // Provided by OpenAPI servers
        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" // Provided by OpenAPI servers

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'; // Provided by OpenAPI servers
$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-en.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI Definition (JSON)]</a>
</div>

## Response Fields

Key fields in a successful response (`code = 0`).

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

| Field path | Type | Description |
| --- | --- | --- |
| <code>data</code> | <code>object &#124; null</code> | User space lookup result. Some successful responses contain only a message. |
| <code>data.message</code> | <code>string</code> | Message returned when the lookup does not include a user space. |
| <code>data.space</code> | <code>object</code> | User space data when the lookup includes a profile. |
| <code>data.space.mid</code> | <code>integer</code> | Bilibili UID of the returned user space. |
| <code>data.space.info</code> | <code>object</code> | Profile information displayed in the user space. |
| <code>data.space.info.mid</code> | <code>integer</code> | Bilibili UID reported in the profile. |
| <code>data.space.info.name</code> | <code>string</code> | Display name shown in the user space. |
| <code>data.space.info.face</code> | <code>string</code> | URL of the profile avatar. |
| <code>data.space.info.sign</code> | <code>string</code> | Profile introduction text. It can be empty. |
| <code>data.space.info.sex</code> | <code>string</code> | Gender label displayed in the profile. |
| <code>data.space.info.birthday</code> | <code>string</code> | Birthday text shown in the profile when provided. |
| <code>data.space.info.level</code> | <code>integer</code> | Bilibili account level reported in the profile. |
| <code>data.space.info.top_photo</code> | <code>string</code> | Profile space cover image URL. |
| <code>data.space.info.top_photo_v2</code> | <code>object</code> | Profile space cover image variants. |
| <code>data.space.info.top_photo_v2.sid</code> | <code>integer</code> | Identifier of the selected space cover. |
| <code>data.space.info.top_photo_v2.l_img</code> | <code>string</code> | Large space cover image URL. |
| <code>data.space.info.top_photo_v2.l_200h_img</code> | <code>string</code> | Space cover image URL for the 200-high variant. |
| <code>data.space.info.tags</code> | <code>array &#124; null</code> | Tags shown in the profile when available. |
| <code>data.space.info.tags[]</code> | <code>string</code> | One profile tag shown in the result. |
| <code>data.space.info.certificate_show</code> | <code>boolean</code> | Whether the returned profile indicates that certification is displayed. |
| <code>data.space.info.official</code> | <code>object</code> | Official verification information reported for the profile. |
| <code>data.space.info.official.role</code> | <code>integer</code> | Reported official verification role code. |
| <code>data.space.info.official.type</code> | <code>integer</code> | Reported official verification type code. |
| <code>data.space.info.official.title</code> | <code>string</code> | Official verification title shown in the profile. |
| <code>data.space.info.official.desc</code> | <code>string</code> | Official verification description text when provided. |
| <code>data.space.info.attestation</code> | <code>object</code> | Verification labels and icon shown in the profile. |
| <code>data.space.info.attestation.type</code> | <code>integer</code> | Reported attestation type code for the profile. |
| <code>data.space.info.attestation.icon</code> | <code>string</code> | Verification icon URL when provided. |
| <code>data.space.info.attestation.desc</code> | <code>string</code> | Description text associated with the verification display. |
| <code>data.space.info.attestation.common_info</code> | <code>object</code> | Verification title and prefix information. |
| <code>data.space.info.attestation.common_info.title</code> | <code>string</code> | Title shown in the verification label. |
| <code>data.space.info.attestation.common_info.prefix</code> | <code>string</code> | Prefix returned for the verification label. |
| <code>data.space.info.attestation.common_info.prefix_title</code> | <code>string</code> | Title attached to the verification prefix. |
| <code>data.space.info.attestation.splice_info</code> | <code>object</code> | Combined verification display information. |
| <code>data.space.info.attestation.splice_info.title</code> | <code>string</code> | Combined title shown in the verification display. |
| <code>data.space.info.vip</code> | <code>object</code> | VIP membership information reported in the profile. |
| <code>data.space.info.vip.type</code> | <code>integer</code> | VIP membership type code reported for the user. |
| <code>data.space.info.vip.status</code> | <code>integer</code> | VIP membership status code reported for the user. |
| <code>data.space.info.vip.due_date</code> | <code>integer</code> | VIP membership expiry timestamp value. It can be zero. |
| <code>data.space.info.vip.nickname_color</code> | <code>string</code> | Nickname color associated with the VIP display. |
| <code>data.space.info.vip.label</code> | <code>object</code> | VIP badge information returned with the profile. |
| <code>data.space.info.vip.label.text</code> | <code>string</code> | Text shown on the VIP label. |
| <code>data.space.info.vip.label.label_id</code> | <code>integer</code> | VIP label identifier reported with the profile. |
| <code>data.space.info.vip.label.label_goto</code> | <code>object &#124; null</code> | Destinations linked from the VIP label when present. |
| <code>data.space.info.vip.label.label_goto.mobile</code> | <code>string</code> | Link opened by the VIP label on mobile. |
| <code>data.space.info.vip.label.label_goto.pc_web</code> | <code>string</code> | Link opened by the VIP label on desktop web. |
| <code>data.space.info.vip.label.img_label_uri_hans</code> | <code>string</code> | VIP badge image URL for Simplified Chinese. |
| <code>data.space.info.vip.label.img_label_uri_hans_static</code> | <code>string</code> | Static VIP badge image URL for Simplified Chinese. |
| <code>data.space.info.vip.label.img_label_uri_hant_static</code> | <code>string</code> | Static VIP badge image URL for Traditional Chinese. |
| <code>data.space.info.nameplate</code> | <code>object</code> | Profile nameplate displayed for the account. |
| <code>data.space.info.nameplate.nid</code> | <code>integer</code> | Identifier of the displayed nameplate. |
| <code>data.space.info.nameplate.name</code> | <code>string</code> | Name of the displayed nameplate. |
| <code>data.space.info.nameplate.image</code> | <code>string</code> | Nameplate image URL. |
| <code>data.space.info.nameplate.image_small</code> | <code>string</code> | Small nameplate image URL. |
| <code>data.space.info.nameplate.level</code> | <code>string</code> | Level label attached to the nameplate. |
| <code>data.space.info.nameplate.condition</code> | <code>string</code> | Text describing the conditions for the nameplate. |
| <code>data.space.info.pendant</code> | <code>object</code> | Avatar pendant information shown in the profile. |
| <code>data.space.info.pendant.pid</code> | <code>integer</code> | Avatar pendant identifier reported in the profile. |
| <code>data.space.info.pendant.name</code> | <code>string</code> | Name of the avatar pendant. |
| <code>data.space.info.pendant.image</code> | <code>string</code> | Avatar pendant image URL. |
| <code>data.space.info.pendant.image_enhance</code> | <code>string</code> | Enhanced avatar pendant image URL when provided. |
| <code>data.space.info.fans_badge</code> | <code>boolean</code> | Fan-badge flag reported for the user. |
| <code>data.space.info.fans_medal</code> | <code>object</code> | Fan-medal information displayed in the profile. |
| <code>data.space.info.fans_medal.show</code> | <code>boolean</code> | Whether the fan medal is marked for display in the profile. |
| <code>data.space.info.fans_medal.wear</code> | <code>boolean</code> | Whether the profile indicates that the fan medal is worn. |
| <code>data.space.info.fans_medal.detail</code> | <code>object &#124; null</code> | Detailed fan-medal information when available. |
| <code>data.space.info.fans_medal.detail.medal_id</code> | <code>integer</code> | Identifier of the displayed fan medal. |
| <code>data.space.info.fans_medal.detail.medal_name</code> | <code>string</code> | Fan-medal name shown in the detailed information. |
| <code>data.space.info.fans_medal.detail.level</code> | <code>integer</code> | Fan-medal level reported in the detailed information. |
| <code>data.space.info.fans_medal.medal</code> | <code>object &#124; null</code> | Fan-medal display information when available. |
| <code>data.space.info.fans_medal.medal.medal_name</code> | <code>string</code> | Displayed fan-medal name. |
| <code>data.space.info.fans_medal.medal.level</code> | <code>integer</code> | Displayed fan-medal level. |
| <code>data.space.info.live_room</code> | <code>object &#124; null</code> | Live-room information reported in the profile when available. |
| <code>data.space.info.live_room.roomid</code> | <code>integer</code> | Bilibili live-room ID. |
| <code>data.space.info.live_room.roomStatus</code> | <code>integer</code> | Reported live-room availability status code. |
| <code>data.space.info.live_room.liveStatus</code> | <code>integer</code> | Reported broadcast status code for the live room. |
| <code>data.space.info.live_room.title</code> | <code>string</code> | Title displayed for the live room. |
| <code>data.space.info.live_room.cover</code> | <code>string</code> | Cover image URL for the live room. |
| <code>data.space.info.live_room.url</code> | <code>string</code> | URL of the live room. |
| <code>data.space.info.live_room.watched_show</code> | <code>object</code> | Audience-count display attached to the live room. |
| <code>data.space.info.live_room.watched_show.num</code> | <code>integer</code> | Numeric audience count reported in the live-room display. |
| <code>data.space.info.live_room.watched_show.text_small</code> | <code>string</code> | Short audience-count text shown for the live room. |
| <code>data.space.info.live_room.watched_show.text_large</code> | <code>string</code> | Long audience-count text shown for the live room. |
| <code>data.space.info.elec</code> | <code>object</code> | Information for the creator-support section of the profile. |
| <code>data.space.info.elec.show_info</code> | <code>object</code> | Display information for the creator-support section. |
| <code>data.space.info.elec.show_info.show</code> | <code>boolean</code> | Whether the creator-support section is marked for display. |
| <code>data.space.info.elec.show_info.title</code> | <code>string</code> | Title shown in the creator-support section. |
| <code>data.space.info.elec.show_info.total</code> | <code>integer</code> | Total count reported in the creator-support display. |
| <code>data.space.feedList</code> | <code>object</code> | Space-feed information returned with the profile. |
| <code>data.space.feedList.result</code> | <code>array</code> | Entries included in the space-feed response. The array can be empty even when profile information is present. |

</div>

## Response Example

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

