Douyin (TikTok China) Video Details API (V2)
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 details for a Douyin (TikTok China) video by video ID. Use it to look up a known video before content review, archiving, or related analysis.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
token | query | string | Yes | - | Access token for this API service. |
videoId | query | string | Yes | - | The unique video identifier (aweme_id or model_id). |
Code Samples
bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/douyin/get-video-detail/v2?token=YOUR_API_KEY&videoId=VALUE'text
I want to use the "Video Details (V2)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/douyin/get-video-detail/v2?token=YOUR_API_KEY&videoId=VALUE
API Endpoint: BASE_URL + /api/douyin/get-video-detail/v2?token=YOUR_API_KEY&videoId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/douyin-tiktok-china/video-details-v2-en.json
Parameters:
- token (query): Access token for this API service. (Required)
- videoId (query): The unique video identifier (aweme_id or model_id). (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-video-detail/v2?token=YOUR_API_KEY&videoId=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-video-detail/v2?token=YOUR_API_KEY&videoId=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-video-detail/v2?token=YOUR_API_KEY&videoId=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-video-detail/v2?token=YOUR_API_KEY&videoId=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-video-detail/v2?token=YOUR_API_KEY&videoId=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).
Post information13 fields
data.aweme_detail
| Field | Type | Description |
|---|---|---|
aweme_id | string | The unique Douyin post ID encoded as a string. |
group_id | string | Group identifier reported for the post. |
author_user_id | integer | Numeric ID of the posting account. |
desc | string | Post description supplied by Douyin. |
caption | string | Post caption supplied by Douyin. |
item_title | string | Post title, when supplied. |
preview_title | string | Title supplied for the post preview. |
create_time | integer | Post publication time as a Unix timestamp in seconds. |
duration | integer | The video duration value reported at the post level, in milliseconds. |
aweme_type | integer | The Douyin post type code. Observed examples are 0 for a standard video and 68 for an image gallery. |
media_type | integer | Media type code reported by Douyin. |
ip_attribution | string | IP region label reported by Douyin, when available. |
is_aigc_media | boolean | Whether Douyin marks the post media as AI-generated content. |
Author27 fields
data.aweme_detail.author
Author profile information returned with the post.
| Field | Type | Description |
|---|---|---|
uid | string | Douyin account ID encoded as a string. |
sec_uid | string | Secondary Douyin account identifier used by user profile endpoints. |
nickname | string | Author’s display name. |
unique_id | string | Public Douyin account handle, when available. |
short_id | string | Short account identifier reported by Douyin. |
follower_count | integer | Follower count reported for the author. |
is_verified | boolean | Whether Douyin reports the author as verified. |
verification_type | integer | Verification category code reported for the author. |
avatar_thumb | object | Thumbnail avatar for the author. |
avatar_thumb.uri | string | Resource identifier reported by Douyin. |
avatar_thumb.url_list | array | URLs supplied for the resource. |
avatar_thumb.url_list[] | string | URL supplied for the resource. |
avatar_thumb.width | integer | Resource width in pixels reported in the metadata. |
avatar_thumb.height | integer | Resource height in pixels reported in the metadata. |
avatar_medium | object | Medium avatar for the author. |
avatar_medium.uri | string | Resource identifier reported by Douyin. |
avatar_medium.url_list | array | URLs supplied for the resource. |
avatar_medium.url_list[] | string | URL supplied for the resource. |
avatar_medium.width | integer | Resource width in pixels reported in the metadata. |
avatar_medium.height | integer | Resource height in pixels reported in the metadata. |
avatar_larger | object | Larger avatar for the author. |
avatar_larger.uri | string | Resource identifier reported by Douyin. |
avatar_larger.url_list | array | URLs supplied for the resource. |
avatar_larger.url_list[] | string | URL supplied for the resource. |
avatar_larger.width | integer | Resource width in pixels reported in the metadata. |
avatar_larger.height | integer | Resource height in pixels reported in the metadata. |
aweme_count | integer | The author post count reported by Douyin. |
Engagement9 fields
data.aweme_detail.statistics
Engagement counts reported by Douyin for the post.
| Field | Type | Description |
|---|---|---|
aweme_id | string | Douyin video ID associated with these statistics. |
digg_count | integer | Number of likes reported for the video. |
comment_count | integer | Number of comments reported for the video. |
collect_count | integer | Number of saves reported for the video. |
share_count | integer | Number of shares reported for the video. |
forward_count | integer | Forward count supplied in the response. |
download_count | integer | Number of downloads reported for the video. |
play_count | integer | The play count reported by Douyin for the post. |
exposure_count | integer | The exposure count reported by Douyin for the post. |
Photo post images16 fields
data.aweme_detail
| Field | Type | Description |
|---|---|---|
images | array | null | The ordered images for an image gallery. Samples of standard video posts returned null. |
images[] | object | An image in the gallery. |
images[].uri | string | The platform resource identifier for the image. |
images[].url_list | array | Image URLs supplied for display. |
images[].url_list[] | string | A display URL for the image. |
images[].download_url_list | array | Download URLs returned separately for the image. |
images[].download_url_list[] | string | A download URL reported for the image. |
images[].width | integer | The width reported for the image. |
images[].height | integer | The height reported for the image. |
images[].is_aigc_media | boolean | Whether Douyin marks this image as AI-generated content. |
images[].resolution_log_param | object | The source and published image dimensions recorded by Douyin. |
images[].resolution_log_param.image_source_width | integer | The width reported for the source image. |
images[].resolution_log_param.image_source_height | integer | The height reported for the source image. |
images[].resolution_log_param.image_publish_width | integer | The width reported for the published image. |
images[].resolution_log_param.image_publish_height | integer | The height reported for the published image. |
img_bitrate | array | null | Image bitrate information, when supplied. A gallery can return an empty list. |
Covers and previews35 fields
data.aweme_detail.video
| Field | Type | Description |
|---|---|---|
cover | object | Video cover image. |
cover.uri | string | Resource identifier reported by Douyin. |
cover.url_list | array | URLs supplied for the resource. |
cover.url_list[] | string | URL supplied for the resource. |
cover.width | integer | Resource width in pixels reported in the metadata. |
cover.height | integer | Resource height in pixels reported in the metadata. |
origin_cover | object | Cover image in the original cover field. |
origin_cover.uri | string | Resource identifier reported by Douyin. |
origin_cover.url_list | array | URLs supplied for the resource. |
origin_cover.url_list[] | string | URL supplied for the resource. |
origin_cover.width | integer | Resource width in pixels reported in the metadata. |
origin_cover.height | integer | Resource height in pixels reported in the metadata. |
dynamic_cover | object | Moving cover resource when available. |
dynamic_cover.uri | string | Resource identifier reported by Douyin. |
dynamic_cover.url_list | array | URLs supplied for the resource. |
dynamic_cover.url_list[] | string | URL supplied for the resource. |
dynamic_cover.width | integer | Resource width in pixels reported in the metadata. |
dynamic_cover.height | integer | Resource height in pixels reported in the metadata. |
animated_cover | object | Animated cover resource when available. |
animated_cover.uri | string | Resource identifier reported by Douyin. |
animated_cover.url_list | array | URLs supplied for the resource. |
animated_cover.url_list[] | string | URL supplied for the resource. |
cover_original_scale | object | The original-scale cover variant, when returned. |
cover_original_scale.uri | string | The platform resource identifier for this cover. |
cover_original_scale.url_list | array | URLs supplied for this cover variant. |
cover_original_scale.url_list[] | string | A URL for this cover variant. |
cover_original_scale.width | integer | The width reported for this cover variant. |
cover_original_scale.height | integer | The height reported for this cover variant. |
big_thumbs | array | null | Preview thumbnail resources, when returned. The list can be empty or null. |
big_thumbs[] | object | A set of preview thumbnails for the video. |
big_thumbs[].uri | string | The platform resource identifier for the preview thumbnail. |
big_thumbs[].img_url | string | The preview thumbnail image URL. |
big_thumbs[].img_urls | array | Additional preview thumbnail URLs, when returned. |
big_thumbs[].uris | array | Additional platform resource identifiers for the preview thumbnails. |
big_thumbs[].fext | string | The file extension supplied for the preview thumbnail image. |
Playback and quality55 fields
data.aweme_detail.video
Video metadata and available playback resources. This object can also be present for an image gallery.
| Field | Type | Description |
|---|---|---|
duration | integer | Video duration in milliseconds. |
width | integer | Video width reported by Douyin in pixels. |
height | integer | Video height reported by Douyin in pixels. |
format | string | Video format reported by Douyin. |
ratio | string | Resolution label reported by Douyin. |
has_watermark | boolean | Watermark flag from the video metadata. |
play_addr | object | Primary playback address supplied for the video. |
play_addr.uri | string | Resource identifier reported by Douyin. |
play_addr.url_list | array | URLs supplied for the resource. |
play_addr.url_list[] | string | URL supplied for the resource. |
play_addr.width | integer | Resource width in pixels reported in the metadata. |
play_addr.height | integer | Resource height in pixels reported in the metadata. |
play_addr.data_size | integer | Resource file size in bytes reported in the metadata. |
play_addr_h264 | object | Address supplied for the H.264 variant. |
play_addr_h264.uri | string | Resource identifier reported by Douyin. |
play_addr_h264.url_list | array | URLs supplied for the resource. |
play_addr_h264.url_list[] | string | URL supplied for the resource. |
play_addr_h264.width | integer | Resource width in pixels reported in the metadata. |
play_addr_h264.height | integer | Resource height in pixels reported in the metadata. |
play_addr_h264.data_size | integer | Resource file size in bytes reported in the metadata. |
play_addr_265 | object | Address supplied in the H.265 playback field. |
play_addr_265.uri | string | Resource identifier reported by Douyin. |
play_addr_265.url_list | array | URLs supplied for the resource. |
play_addr_265.url_list[] | string | URL supplied for the resource. |
play_addr_265.width | integer | Resource width in pixels reported in the metadata. |
play_addr_265.height | integer | Resource height in pixels reported in the metadata. |
play_addr_265.data_size | integer | Resource file size in bytes reported in the metadata. |
download_addr | object | Download address supplied for the video. |
download_addr.uri | string | Resource identifier reported by Douyin. |
download_addr.url_list | array | URLs supplied for the resource. |
download_addr.url_list[] | string | URL supplied for the resource. |
download_addr.width | integer | Resource width in pixels reported in the metadata. |
download_addr.height | integer | Resource height in pixels reported in the metadata. |
download_addr.data_size | integer | Resource file size in bytes reported in the metadata. |
bit_rate | array | Playback encodings and bitrate metadata supplied for the video. |
bit_rate[] | object | One playback encoding supplied for the video. |
bit_rate[].bit_rate | integer | Encoding bitrate in bits per second. |
bit_rate[].FPS | integer | Frame rate in frames per second. |
bit_rate[].format | string | Media format reported for this encoding. |
bit_rate[].gear_name | string | Encoder preset label reported for this variant. |
bit_rate[].quality_type | integer | Quality category code reported for this encoding. |
bit_rate[].is_h265 | integer | H.265 encoding flag reported for this variant. |
bit_rate[].HDR_type | string | HDR category label returned for the encoding. |
bit_rate[].HDR_bit | string | HDR bit-depth label returned for the encoding. |
bit_rate[].play_addr | object | Playback address for this encoding. |
bit_rate[].play_addr.uri | string | Resource identifier reported by Douyin. |
bit_rate[].play_addr.url_list | array | URLs supplied for the resource. |
bit_rate[].play_addr.url_list[] | string | URL supplied for the resource. |
bit_rate[].play_addr.width | integer | Resource width in pixels reported in the metadata. |
bit_rate[].play_addr.height | integer | Resource height in pixels reported in the metadata. |
bit_rate[].play_addr.data_size | integer | Resource file size in bytes reported in the metadata. |
audio | object | Audio metadata carried in the video object. It can be empty. |
meta | string | Video metadata supplied as a serialized string. |
is_h265 | integer | The H.265 indicator returned by Douyin as a numeric code. |
is_source_HDR | integer | The source high dynamic range indicator returned as a numeric code. |
Music and audio35 fields
data.aweme_detail.music
Music or sound metadata associated with the post.
| Field | Type | Description |
|---|---|---|
id | integer | Numeric music ID. Use a lossless JSON parser to retain the full value in JavaScript. |
id_str | string | Music ID encoded as a string. |
mid | string | Music ID returned in the mid field. |
title | string | Title of the sound or music track. |
author | string | Artist or sound creator name returned with the track. |
album | string | Album title when supplied. |
is_original_sound | boolean | Whether Douyin marks the track as original sound. |
cover_thumb | object | Thumbnail cover for the sound or music track. |
cover_thumb.uri | string | Resource identifier reported by Douyin. |
cover_thumb.url_list | array | URLs supplied for the resource. |
cover_thumb.url_list[] | string | URL supplied for the resource. |
cover_thumb.width | integer | Resource width in pixels reported in the metadata. |
cover_thumb.height | integer | Resource height in pixels reported in the metadata. |
play_url | object | Playback resource for the sound or music track. |
play_url.uri | string | Resource identifier reported by Douyin. |
play_url.url_list | array | URLs supplied for the resource. |
play_url.url_list[] | string | URL supplied for the resource. |
cover_medium | object | Medium music cover image. |
cover_medium.uri | string | The platform resource identifier for the cover. |
cover_medium.url_list | array | URLs supplied for the music cover. |
cover_medium.url_list[] | string | A URL for the music cover. |
cover_medium.width | integer | The width reported for the music cover. |
cover_medium.height | integer | The height reported for the music cover. |
cover_large | object | Large music cover image. |
cover_large.uri | string | The platform resource identifier for the cover. |
cover_large.url_list | array | URLs supplied for the music cover. |
cover_large.url_list[] | string | A URL for the music cover. |
cover_large.width | integer | The width reported for the music cover. |
cover_large.height | integer | The height reported for the music cover. |
cover_hd | object | High-definition music cover image. |
cover_hd.uri | string | The platform resource identifier for the cover. |
cover_hd.url_list | array | URLs supplied for the music cover. |
cover_hd.url_list[] | string | A URL for the music cover. |
cover_hd.width | integer | The width reported for the music cover. |
cover_hd.height | integer | The height reported for the music cover. |
Sharing, topics, and mentions17 fields
data.aweme_detail
| Field | Type | Description |
|---|---|---|
share_url | string | The Douyin share URL for the post. |
share_info | object | Metadata supplied for sharing the post. |
share_info.share_url | string | URL supplied for sharing the video. |
share_info.share_title | string | Title supplied for sharing the video. |
share_info.share_desc | string | Description supplied for sharing the video. |
text_extra | array | Hashtags and user mentions associated with the post text. |
text_extra[] | object | One text annotation. |
text_extra[].type | integer | Annotation type code reported by Douyin. |
text_extra[].hashtag_id | string | ID of the annotated hashtag when the annotation represents a hashtag. |
text_extra[].hashtag_name | string | Name of the annotated hashtag. |
text_extra[].is_commerce | boolean | Whether Douyin flags the annotated hashtag as commercial. |
cha_list | array | Topic or challenge details associated with the post. |
cha_list[] | object | One topic or challenge. |
cha_list[].cid | string | Douyin topic or challenge ID. |
cha_list[].cha_name | string | Topic or challenge name. |
cha_list[].desc | string | Description of the topic or challenge. |
cha_list[].is_commerce | boolean | Whether Douyin flags the topic or challenge as commercial. |
Post status and controls12 fields
data.aweme_detail
| Field | Type | Description |
|---|---|---|
status | object | Availability and viewing flags returned for the post. |
status.is_private | boolean | Whether Douyin marks the post as private in the response. |
status.is_delete | boolean | Whether Douyin marks the post as deleted in the response. |
status.is_prohibited | boolean | Whether Douyin marks the post as prohibited in the response. |
status.allow_comment | boolean | Whether the platform status indicates that comments are allowed. |
status.allow_share | boolean | Whether the platform status indicates that sharing is allowed. |
video_control | object | Media interaction controls returned by Douyin. |
video_control.allow_download | boolean | Whether the platform response indicates that downloading is allowed. |
video_control.allow_duet | boolean | Whether the platform response indicates that duets are allowed. |
video_control.allow_stitch | boolean | Whether the platform response indicates that stitching is allowed. |
video_control.allow_share | boolean | Whether the platform control flag indicates that sharing is allowed. |
video_control.show_watermark | boolean | Whether the video controls indicate that a watermark is shown. |
Response metadata7 fields
data
| Field | Type | Description |
|---|---|---|
status_code | integer | The Douyin status code returned inside the post detail payload. |
extra | object | Additional metadata provided with the Douyin response. |
extra.now | integer | The response time recorded by Douyin as a Unix timestamp in milliseconds. |
extra.logid | string | The identifier recorded for the response by Douyin. |
extra.fatal_item_ids | array | Item identifiers listed as having fatal errors by Douyin. The list can be empty. |
log_pb | object | Additional response record metadata provided by Douyin. |
log_pb.impr_id | string | The record identifier returned in the platform response metadata. |
Other fields2 fields
| Field path | Type | Description |
|---|---|---|
data | - | Fields returned when the response contains a Douyin post detail object. |
data.aweme_detail | object | The requested Douyin post, including video or image gallery metadata when returned. |
Response Example
Loading the response example...