Douyin (TikTok China) User Profile API (V3)
GET
API health status
24h health
24h avg latency
Last checked
Healthy Available Limited Mostly unavailable No data
Healthy
Loading health status...
24h trend
30d trend
Retrieves a Douyin (TikTok China) user profile by secUid. Use it to review a known creator or account before monitoring related content or conducting account research.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for this API service. |
secUid | query | string | Yes | - | The unique user ID (sec_uid) on Douyin. |
Code Samples
bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=VALUE'text
I want to use the "User Profile (V3)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=VALUE
API Endpoint: BASE_URL + /api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/douyin-tiktok-china/user-profile-v3-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- secUid (query): The unique user ID (sec_uid) on Douyin. (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
import requests
BASE_URL = "https://api.justoneapi.com" # Provided by OpenAPI servers
url = BASE_URL + "/api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=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
const BASE_URL = "https://api.justoneapi.com"; // Provided by OpenAPI servers
const url = BASE_URL + "/api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=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
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/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=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
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/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=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
$BASE_URL = 'https://api.justoneapi.com'; // Provided by OpenAPI servers
$url = $BASE_URL . '/api/douyin/get-user-detail/v3?token=YOUR_API_KEY&secUid=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;
}Response Fields
Key fields in a successful response (code = 0).
Account information14 fields
data.user
Public profile details returned for the requested account, when available.
| Field | Type | Description |
|---|---|---|
uid | string | Numeric Douyin user identifier returned as a string. |
sec_uid | string | Public Douyin account identifier used to look up the profile. |
unique_id | string | Account handle returned by Douyin. |
short_id | string | Short account identifier returned as a string. |
nickname | string | Public display name of the account. |
ip_location | string | Public IP location label displayed by Douyin. |
country | string | Country or region label in the profile, when provided. |
province | string | Province label in the profile, when provided. |
city | string | City label in the profile, when provided. |
gender | integer | Numeric gender code returned for the profile. |
personal_tag_list | array | Personal tags returned for the profile. |
personal_tag_list[] | object | One personal tag attached to the profile. |
personal_tag_list[].personal_tag_type | integer | Numeric type of this personal tag. |
personal_tag_list[].text | string | Display text of this personal tag. |
Works and engagement9 fields
data.user
| Field | Type | Description |
|---|---|---|
aweme_count | integer | Number of published works reported by Douyin. |
follower_count | integer | Follower count reported by Douyin. |
following_count | integer | Number of accounts this account follows, as reported by Douyin. |
total_favorited | integer | Total likes received as displayed for the account. |
favoriting_count | integer | Likes given by the account, as reported by Douyin. |
mix_count | integer | Collection count reported for the account. |
series_count | integer | Series count reported for the account. |
public_collects_count | integer | Public favorites count reported for the account. |
follow_status | integer | Numeric follow relationship status for this profile in the current viewing context. |
Account verification8 fields
data.user
| Field | Type | Description |
|---|---|---|
verification_type | integer | Numeric verification code returned by Douyin. Certification text can also be present when this value is zero. |
custom_verify | string | Custom verification label supplied for the profile. It may be empty. |
enterprise_verify_reason | string | Enterprise certification text supplied for the profile, when available. |
account_cert_info | string | Certification information encoded as text. When populated, it can contain JSON with a display label in label_text. |
is_gov_media_vip | boolean | Whether Douyin marks the account with its government or media badge. |
is_star | boolean | Whether Douyin marks the account as a star account. |
is_effect_artist | boolean | Whether Douyin marks the account as an effects creator. |
has_e_account_role | boolean | Whether the profile has the enterprise account role flag. |
Avatars30 fields
data.user
| Field | Type | Description |
|---|---|---|
avatar_thumb | object | Thumbnail avatar representation. |
avatar_thumb.uri | string | Media reference returned by Douyin. |
avatar_thumb.url_list | array | URLs returned for this media representation. |
avatar_thumb.url_list[] | string | One URL returned for this media representation. |
avatar_thumb.height | integer | Image height in pixels reported for this representation. |
avatar_thumb.width | integer | Image width in pixels reported for this representation. |
avatar_medium | object | Medium avatar representation. |
avatar_medium.uri | string | Media reference returned by Douyin. |
avatar_medium.url_list | array | URLs returned for this media representation. |
avatar_medium.url_list[] | string | One URL returned for this media representation. |
avatar_medium.height | integer | Image height in pixels reported for this representation. |
avatar_medium.width | integer | Image width in pixels reported for this representation. |
avatar_larger | object | Larger avatar representation. |
avatar_larger.uri | string | Media reference returned by Douyin. |
avatar_larger.url_list | array | URLs returned for this media representation. |
avatar_larger.url_list[] | string | One URL returned for this media representation. |
avatar_larger.height | integer | Image height in pixels reported for this representation. |
avatar_larger.width | integer | Image width in pixels reported for this representation. |
avatar_168x168 | object | Avatar representation in the 168x168 field. Use width and height for the returned dimensions. |
avatar_168x168.uri | string | Media reference returned by Douyin. |
avatar_168x168.url_list | array | URLs returned for this media representation. |
avatar_168x168.url_list[] | string | One URL returned for this media representation. |
avatar_168x168.height | integer | Image height in pixels reported for this representation. |
avatar_168x168.width | integer | Image width in pixels reported for this representation. |
avatar_300x300 | object | Avatar representation in the 300x300 field. Use width and height for the returned dimensions. |
avatar_300x300.uri | string | Media reference returned by Douyin. |
avatar_300x300.url_list | array | URLs returned for this media representation. |
avatar_300x300.url_list[] | string | One URL returned for this media representation. |
avatar_300x300.height | integer | Image height in pixels reported for this representation. |
avatar_300x300.width | integer | Image width in pixels reported for this representation. |
Profile covers19 fields
data.user
| Field | Type | Description |
|---|---|---|
cover_url | array | Cover image representations returned for the profile. |
cover_url[] | object | One cover image representation returned for the profile. |
cover_url[].uri | string | Media reference returned by Douyin. |
cover_url[].url_list | array | URLs returned for this media representation. |
cover_url[].url_list[] | string | One URL returned for this media representation. |
white_cover_url | array | Additional cover images returned in the white cover field. |
white_cover_url[] | object | One cover image representation returned for the profile. |
white_cover_url[].uri | string | Media reference returned by Douyin. |
white_cover_url[].url_list | array | URLs returned for this media representation. |
white_cover_url[].url_list[] | string | One URL returned for this media representation. |
cover_and_head_image_info | object | Cover and header image information for the profile. |
cover_and_head_image_info.profile_cover_list | array | Cover entries returned with header information. |
cover_and_head_image_info.profile_cover_list[] | object | One cover entry returned with header information. |
cover_and_head_image_info.profile_cover_list[].cover_url | object | Image information for this profile cover. |
cover_and_head_image_info.profile_cover_list[].cover_url.uri | string | Media reference returned by Douyin. |
cover_and_head_image_info.profile_cover_list[].cover_url.url_list | array | URLs returned for this media representation. |
cover_and_head_image_info.profile_cover_list[].cover_url.url_list[] | string | One URL returned for this media representation. |
cover_and_head_image_info.profile_cover_list[].dark_cover_color | string | Cover color value returned for the dark theme. |
cover_and_head_image_info.profile_cover_list[].light_cover_color | string | Cover color value returned for the light theme. |
Live and commerce13 fields
data.user
| Field | Type | Description |
|---|---|---|
live_status | integer | Numeric live status reported for the account. |
room_id | integer | Numeric live room identifier returned for this account. |
room_id_str | string | Live room identifier returned as text. |
live_commerce | boolean | Whether Douyin marks the account for live commerce. |
with_commerce_entry | boolean | Whether the profile has the general commerce entry flag. |
with_commerce_enterprise_tab_entry | boolean | Whether the profile has the enterprise commerce tab entry flag. |
with_fusion_shop_entry | boolean | Whether the profile has the integrated shop entry flag. |
with_new_goods | boolean | Whether the profile has the new-products flag. |
commerce_user_level | integer | Numeric commerce account level reported by Douyin. |
commerce_user_info | object | Commerce-related profile information returned by Douyin. |
commerce_user_info.has_ads_entry | boolean | Whether the account has the advertising entry flag. |
commerce_user_info.show_star_atlas_cooperation | boolean | Whether Xingtu collaboration is marked for display. |
commerce_user_info.star_atlas | integer | Numeric Xingtu code in the commerce profile. |
Profile display and sharing20 fields
data.user
| Field | Type | Description |
|---|---|---|
show_favorite_list | boolean | Whether the favorites list is marked for display. |
has_subscription | boolean | Whether the profile has the subscription flag. |
show_subscription | boolean | Whether subscription is marked for display. |
profile_tab_info | object | Profile tabs and the landing tab information provided by Douyin. |
profile_tab_info.profile_landing_tab | integer | Numeric code for the profile landing tab. |
profile_tab_info.profile_tab_list_v2 | array | Profile tab entries in the v2 list field. |
profile_tab_info.profile_tab_list_v2[] | object | One profile tab entry. |
profile_tab_info.profile_tab_list_v2[].id | integer | Numeric ID of the profile tab. |
profile_tab_info.profile_tab_list_v2[].name | string | Name returned for the profile tab. |
profile_tab_info.profile_tab_list_v2[].name_en | string | English name returned for the profile tab. |
profile_tab_info.profile_tab_list_v2[].tab_show_name | string | Display name of the profile tab. |
profile_tab_info.profile_tab_list_v2[].tab_component_type | string | Component type label of the profile tab. |
share_info | object | Information returned for sharing this public profile. |
share_info.share_title | string | Title supplied for the profile share. |
share_info.share_desc | string | Description supplied for the profile share. |
share_info.share_url | string | Link supplied for sharing the public profile. |
share_info.share_qrcode_url | object | Image references for the profile share QR code. |
share_info.share_qrcode_url.uri | string | Media reference returned by Douyin. |
share_info.share_qrcode_url.url_list | array | URLs returned for this media representation. |
share_info.share_qrcode_url.url_list[] | string | One URL returned for this media representation. |
Response information3 fields
data
Douyin profile response and platform status information.
| Field | Type | Description |
|---|---|---|
status_code | integer | Numeric status returned by Douyin inside the profile response. |
extra | object | Additional information accompanying the profile response. |
extra.now | integer | Douyin response time as a Unix timestamp in milliseconds. |
Response Example
Loading the response example...