---
title: "Kuaishou User Profile API (V1)"
description: "Retrieve the public profile for a Kuaishou user identified by user ID. Use it to inspect an account found through user or video results."
aiUsagePrompt: true
---

# Kuaishou User Profile API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/kuaishou/get-user-detail/v1\"")'
  :summary='JSON.parse("\"User Profile (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/kuaishou/user-profile-v1-en.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"Access token for this API service.\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"userId\",\"in\":\"query\",\"description\":\"The unique user ID on Kuaishou.\",\"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\",\"description\":\"Public Kuaishou user profile and profile display information.\",\"properties\":{\"result\":{\"type\":\"integer\",\"description\":\"Native Kuaishou result code. The value 1 indicates an accepted profile response.\"},\"isLiving\":{\"type\":\"boolean\",\"description\":\"Whether Kuaishou marks the account as currently live.\"},\"userProfile\":{\"type\":\"object\",\"description\":\"Public profile information returned for the requested account.\",\"properties\":{\"profile\":{\"type\":\"object\",\"description\":\"Public account information included in the profile response.\",\"properties\":{\"user_id\":{\"type\":\"integer\",\"description\":\"Numeric Kuaishou user ID returned for the account.\"},\"kwaiId\":{\"type\":\"string\",\"description\":\"Public Kuaishou account handle when provided.\"},\"user_name\":{\"type\":\"string\",\"description\":\"Public display name of the account.\"},\"user_text\":{\"type\":\"string\",\"description\":\"Public profile biography text.\"},\"user_sex\":{\"type\":\"string\",\"description\":\"Gender label returned for the profile.\"},\"verified\":{\"type\":\"boolean\",\"description\":\"Whether the public account record is marked as verified.\"},\"verified_url\":{\"type\":\"string\",\"description\":\"Link returned for the verification display, when provided.\"},\"verifiedDetail\":{\"type\":\"object\",\"description\":\"Verification details returned with the public account, when available.\",\"properties\":{\"description\":{\"type\":\"string\",\"description\":\"Verification description displayed for the account.\"},\"iconType\":{\"type\":\"integer\",\"description\":\"Numeric type of the verification icon.\"},\"type\":{\"type\":\"integer\",\"description\":\"Numeric verification category returned by Kuaishou.\"},\"viceVerifiedType\":{\"type\":\"integer\",\"description\":\"Additional numeric verification category returned by Kuaishou.\"},\"newVerified\":{\"type\":\"boolean\",\"description\":\"Boolean verification flag returned in the newVerified field.\"},\"musicCompany\":{\"type\":\"boolean\",\"description\":\"Whether the verification details carry the music-company flag.\"}}},\"headurl\":{\"type\":\"string\",\"description\":\"Profile avatar URL.\"},\"headurls\":{\"type\":\"array\",\"description\":\"Image entries returned for the profile avatar.\",\"items\":{\"type\":\"object\",\"description\":\"One image entry returned for the profile avatar.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL of this avatar image entry.\"}}}},\"bigHeadUrls\":{\"type\":\"array\",\"description\":\"Image entries returned for the larger avatar representation.\",\"items\":{\"type\":\"object\",\"description\":\"One image entry returned for the larger avatar.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL of this larger avatar entry.\"}}}},\"user_profile_bg_url\":{\"type\":\"string\",\"description\":\"Profile background image URL.\"},\"user_profile_bg_urls\":{\"type\":\"array\",\"description\":\"Image entries returned for the profile background.\",\"items\":{\"type\":\"object\",\"description\":\"One image entry returned for the profile background.\",\"properties\":{\"url\":{\"type\":\"string\",\"description\":\"URL of this profile background image entry.\"}}}}}},\"ownerCount\":{\"type\":\"object\",\"description\":\"Profile counts reported by Kuaishou.\",\"properties\":{\"fan\":{\"type\":\"integer\",\"description\":\"Follower count reported for the account.\"},\"follow\":{\"type\":\"integer\",\"description\":\"Following count reported for the account.\"},\"photo\":{\"type\":\"integer\",\"description\":\"Works count reported for the account. Public and private counts are returned in separate fields when supplied.\"},\"photo_public\":{\"type\":\"integer\",\"description\":\"Works count reported in the public category.\"},\"photo_private\":{\"type\":\"integer\",\"description\":\"Works count reported in the private category.\"},\"like\":{\"type\":\"integer\",\"description\":\"Like count reported for the profile.\"},\"collect\":{\"type\":\"integer\",\"description\":\"Collection count reported for the profile.\"},\"moment\":{\"type\":\"integer\",\"description\":\"Moment count reported for the profile.\"}}},\"verified\":{\"type\":\"boolean\",\"description\":\"Whether Kuaishou marks the account as verified.\"},\"constellation\":{\"type\":\"string\",\"description\":\"Zodiac sign label supplied with the profile, when present.\"},\"cityName\":{\"type\":\"string\",\"description\":\"City label supplied with the profile, when present.\"},\"cityCode\":{\"type\":\"string\",\"description\":\"City code supplied with the profile, when present.\"},\"showCount\":{\"type\":\"boolean\",\"description\":\"Whether the profile counts are marked for display.\"},\"showPhotoCollectTab\":{\"type\":\"boolean\",\"description\":\"Whether the profile is marked to show its works collection tab.\"},\"isFollowing\":{\"type\":\"boolean\",\"description\":\"Follow status in the current viewing context.\"},\"isFriend\":{\"type\":\"boolean\",\"description\":\"Friend status in the current viewing context.\"},\"isFavorited\":{\"type\":\"boolean\",\"description\":\"Whether the profile is marked as favorited in the current viewing context.\"},\"extraLink\":{\"type\":\"object\",\"description\":\"Additional link entry returned with the profile, when available.\",\"properties\":{\"title\":{\"type\":\"string\",\"description\":\"Title displayed for the extra link entry.\"},\"subTitle\":{\"type\":\"string\",\"description\":\"Subtitle displayed for the extra link entry.\"},\"tagText\":{\"type\":\"string\",\"description\":\"Tag text displayed for the extra link entry.\"},\"entranceTitle\":{\"type\":\"string\",\"description\":\"Title shown for the extra link entry point.\"},\"entranceText\":{\"type\":\"string\",\"description\":\"Text shown for the extra link entry point.\"},\"type\":{\"type\":\"integer\",\"description\":\"Numeric type code returned for this extra link entry.\"},\"link\":{\"type\":\"string\",\"description\":\"Destination link returned for the extra link entry.\"},\"icon\":{\"type\":\"string\",\"description\":\"Icon address returned for the extra link entry.\"},\"headImg\":{\"type\":\"string\",\"description\":\"Header image address returned for the extra link entry.\"}}}}}}}}},\"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\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"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\"},\"integralNumber\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"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\":\"Global production API (default)\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

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

<p>Retrieve the public profile for a Kuaishou user identified by user ID. Use it to inspect an account found through user or video results.</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 this API service. |
| <code>userId</code> | query | <code>string</code> | Yes | - | The unique user ID on Kuaishou. |

</div>

## Code Samples

::: code-group

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

```text [🤖 AI Prompt]
I want to use the "User Profile (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE
API Endpoint: BASE_URL + /api/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/kuaishou/user-profile-v1-en.json

Parameters:
- token (query): Access token for this API service. (Required)
- userId (query): The unique user ID on Kuaishou. (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/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=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/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=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/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=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/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=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/kuaishou/get-user-detail/v1?token=YOUR_API_KEY&userId=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/kuaishou/user-profile-v1-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</code> | Public Kuaishou user profile and profile display information. |
| <code>data.result</code> | <code>integer</code> | Native Kuaishou result code. The value 1 indicates an accepted profile response. |
| <code>data.isLiving</code> | <code>boolean</code> | Whether Kuaishou marks the account as currently live. |
| <code>data.userProfile</code> | <code>object</code> | Public profile information returned for the requested account. |
| <code>data.userProfile.profile</code> | <code>object</code> | Public account information included in the profile response. |
| <code>data.userProfile.profile.user_id</code> | <code>integer</code> | Numeric Kuaishou user ID returned for the account. |
| <code>data.userProfile.profile.kwaiId</code> | <code>string</code> | Public Kuaishou account handle when provided. |
| <code>data.userProfile.profile.user_name</code> | <code>string</code> | Public display name of the account. |
| <code>data.userProfile.profile.user_text</code> | <code>string</code> | Public profile biography text. |
| <code>data.userProfile.profile.user_sex</code> | <code>string</code> | Gender label returned for the profile. |
| <code>data.userProfile.profile.verified</code> | <code>boolean</code> | Whether the public account record is marked as verified. |
| <code>data.userProfile.profile.verified_url</code> | <code>string</code> | Link returned for the verification display, when provided. |
| <code>data.userProfile.profile.verifiedDetail</code> | <code>object</code> | Verification details returned with the public account, when available. |
| <code>data.userProfile.profile.verifiedDetail.description</code> | <code>string</code> | Verification description displayed for the account. |
| <code>data.userProfile.profile.verifiedDetail.iconType</code> | <code>integer</code> | Numeric type of the verification icon. |
| <code>data.userProfile.profile.verifiedDetail.type</code> | <code>integer</code> | Numeric verification category returned by Kuaishou. |
| <code>data.userProfile.profile.verifiedDetail.viceVerifiedType</code> | <code>integer</code> | Additional numeric verification category returned by Kuaishou. |
| <code>data.userProfile.profile.verifiedDetail.newVerified</code> | <code>boolean</code> | Boolean verification flag returned in the newVerified field. |
| <code>data.userProfile.profile.verifiedDetail.musicCompany</code> | <code>boolean</code> | Whether the verification details carry the music-company flag. |
| <code>data.userProfile.profile.headurl</code> | <code>string</code> | Profile avatar URL. |
| <code>data.userProfile.profile.headurls</code> | <code>array</code> | Image entries returned for the profile avatar. |
| <code>data.userProfile.profile.headurls[]</code> | <code>object</code> | One image entry returned for the profile avatar. |
| <code>data.userProfile.profile.headurls[].url</code> | <code>string</code> | URL of this avatar image entry. |
| <code>data.userProfile.profile.bigHeadUrls</code> | <code>array</code> | Image entries returned for the larger avatar representation. |
| <code>data.userProfile.profile.bigHeadUrls[]</code> | <code>object</code> | One image entry returned for the larger avatar. |
| <code>data.userProfile.profile.bigHeadUrls[].url</code> | <code>string</code> | URL of this larger avatar entry. |
| <code>data.userProfile.profile.user_profile_bg_url</code> | <code>string</code> | Profile background image URL. |
| <code>data.userProfile.profile.user_profile_bg_urls</code> | <code>array</code> | Image entries returned for the profile background. |
| <code>data.userProfile.profile.user_profile_bg_urls[]</code> | <code>object</code> | One image entry returned for the profile background. |
| <code>data.userProfile.profile.user_profile_bg_urls[].url</code> | <code>string</code> | URL of this profile background image entry. |
| <code>data.userProfile.ownerCount</code> | <code>object</code> | Profile counts reported by Kuaishou. |
| <code>data.userProfile.ownerCount.fan</code> | <code>integer</code> | Follower count reported for the account. |
| <code>data.userProfile.ownerCount.follow</code> | <code>integer</code> | Following count reported for the account. |
| <code>data.userProfile.ownerCount.photo</code> | <code>integer</code> | Works count reported for the account. Public and private counts are returned in separate fields when supplied. |
| <code>data.userProfile.ownerCount.photo_public</code> | <code>integer</code> | Works count reported in the public category. |
| <code>data.userProfile.ownerCount.photo_private</code> | <code>integer</code> | Works count reported in the private category. |
| <code>data.userProfile.ownerCount.like</code> | <code>integer</code> | Like count reported for the profile. |
| <code>data.userProfile.ownerCount.collect</code> | <code>integer</code> | Collection count reported for the profile. |
| <code>data.userProfile.ownerCount.moment</code> | <code>integer</code> | Moment count reported for the profile. |
| <code>data.userProfile.verified</code> | <code>boolean</code> | Whether Kuaishou marks the account as verified. |
| <code>data.userProfile.constellation</code> | <code>string</code> | Zodiac sign label supplied with the profile, when present. |
| <code>data.userProfile.cityName</code> | <code>string</code> | City label supplied with the profile, when present. |
| <code>data.userProfile.cityCode</code> | <code>string</code> | City code supplied with the profile, when present. |
| <code>data.userProfile.showCount</code> | <code>boolean</code> | Whether the profile counts are marked for display. |
| <code>data.userProfile.showPhotoCollectTab</code> | <code>boolean</code> | Whether the profile is marked to show its works collection tab. |
| <code>data.userProfile.isFollowing</code> | <code>boolean</code> | Follow status in the current viewing context. |
| <code>data.userProfile.isFriend</code> | <code>boolean</code> | Friend status in the current viewing context. |
| <code>data.userProfile.isFavorited</code> | <code>boolean</code> | Whether the profile is marked as favorited in the current viewing context. |
| <code>data.userProfile.extraLink</code> | <code>object</code> | Additional link entry returned with the profile, when available. |
| <code>data.userProfile.extraLink.title</code> | <code>string</code> | Title displayed for the extra link entry. |
| <code>data.userProfile.extraLink.subTitle</code> | <code>string</code> | Subtitle displayed for the extra link entry. |
| <code>data.userProfile.extraLink.tagText</code> | <code>string</code> | Tag text displayed for the extra link entry. |
| <code>data.userProfile.extraLink.entranceTitle</code> | <code>string</code> | Title shown for the extra link entry point. |
| <code>data.userProfile.extraLink.entranceText</code> | <code>string</code> | Text shown for the extra link entry point. |
| <code>data.userProfile.extraLink.type</code> | <code>integer</code> | Numeric type code returned for this extra link entry. |
| <code>data.userProfile.extraLink.link</code> | <code>string</code> | Destination link returned for the extra link entry. |
| <code>data.userProfile.extraLink.icon</code> | <code>string</code> | Icon address returned for the extra link entry. |
| <code>data.userProfile.extraLink.headImg</code> | <code>string</code> | Header image address returned for the extra link entry. |

</div>

## Response Example

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

