Skip to content

Douyin (TikTok China) Video Details API (V2) ​

GET
API health status
Healthy Available Limited Mostly unavailable No data
Loading health status...

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 ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Access token for this API service.
videoIdquerystringYes-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

FieldTypeDescription
aweme_idstringThe unique Douyin post ID encoded as a string.
group_idstringGroup identifier reported for the post.
author_user_idintegerNumeric ID of the posting account.
descstringPost description supplied by Douyin.
captionstringPost caption supplied by Douyin.
item_titlestringPost title, when supplied.
preview_titlestringTitle supplied for the post preview.
create_timeintegerPost publication time as a Unix timestamp in seconds.
durationintegerThe video duration value reported at the post level, in milliseconds.
aweme_typeintegerThe Douyin post type code. Observed examples are 0 for a standard video and 68 for an image gallery.
media_typeintegerMedia type code reported by Douyin.
ip_attributionstringIP region label reported by Douyin, when available.
is_aigc_mediabooleanWhether Douyin marks the post media as AI-generated content.
Author27 fields

data.aweme_detail.author

Author profile information returned with the post.

FieldTypeDescription
uidstringDouyin account ID encoded as a string.
sec_uidstringSecondary Douyin account identifier used by user profile endpoints.
nicknamestringAuthor’s display name.
unique_idstringPublic Douyin account handle, when available.
short_idstringShort account identifier reported by Douyin.
follower_countintegerFollower count reported for the author.
is_verifiedbooleanWhether Douyin reports the author as verified.
verification_typeintegerVerification category code reported for the author.
avatar_thumbobjectThumbnail avatar for the author.
avatar_thumb.uristringResource identifier reported by Douyin.
avatar_thumb.url_listarrayURLs supplied for the resource.
avatar_thumb.url_list[]stringURL supplied for the resource.
avatar_thumb.widthintegerResource width in pixels reported in the metadata.
avatar_thumb.heightintegerResource height in pixels reported in the metadata.
avatar_mediumobjectMedium avatar for the author.
avatar_medium.uristringResource identifier reported by Douyin.
avatar_medium.url_listarrayURLs supplied for the resource.
avatar_medium.url_list[]stringURL supplied for the resource.
avatar_medium.widthintegerResource width in pixels reported in the metadata.
avatar_medium.heightintegerResource height in pixels reported in the metadata.
avatar_largerobjectLarger avatar for the author.
avatar_larger.uristringResource identifier reported by Douyin.
avatar_larger.url_listarrayURLs supplied for the resource.
avatar_larger.url_list[]stringURL supplied for the resource.
avatar_larger.widthintegerResource width in pixels reported in the metadata.
avatar_larger.heightintegerResource height in pixels reported in the metadata.
aweme_countintegerThe author post count reported by Douyin.
Engagement9 fields

data.aweme_detail.statistics

Engagement counts reported by Douyin for the post.

FieldTypeDescription
aweme_idstringDouyin video ID associated with these statistics.
digg_countintegerNumber of likes reported for the video.
comment_countintegerNumber of comments reported for the video.
collect_countintegerNumber of saves reported for the video.
share_countintegerNumber of shares reported for the video.
forward_countintegerForward count supplied in the response.
download_countintegerNumber of downloads reported for the video.
play_countintegerThe play count reported by Douyin for the post.
exposure_countintegerThe exposure count reported by Douyin for the post.
Photo post images16 fields

data.aweme_detail

FieldTypeDescription
imagesarray | nullThe ordered images for an image gallery. Samples of standard video posts returned null.
images[]objectAn image in the gallery.
images[].uristringThe platform resource identifier for the image.
images[].url_listarrayImage URLs supplied for display.
images[].url_list[]stringA display URL for the image.
images[].download_url_listarrayDownload URLs returned separately for the image.
images[].download_url_list[]stringA download URL reported for the image.
images[].widthintegerThe width reported for the image.
images[].heightintegerThe height reported for the image.
images[].is_aigc_mediabooleanWhether Douyin marks this image as AI-generated content.
images[].resolution_log_paramobjectThe source and published image dimensions recorded by Douyin.
images[].resolution_log_param.image_source_widthintegerThe width reported for the source image.
images[].resolution_log_param.image_source_heightintegerThe height reported for the source image.
images[].resolution_log_param.image_publish_widthintegerThe width reported for the published image.
images[].resolution_log_param.image_publish_heightintegerThe height reported for the published image.
img_bitratearray | nullImage bitrate information, when supplied. A gallery can return an empty list.
Covers and previews35 fields

data.aweme_detail.video

FieldTypeDescription
coverobjectVideo cover image.
cover.uristringResource identifier reported by Douyin.
cover.url_listarrayURLs supplied for the resource.
cover.url_list[]stringURL supplied for the resource.
cover.widthintegerResource width in pixels reported in the metadata.
cover.heightintegerResource height in pixels reported in the metadata.
origin_coverobjectCover image in the original cover field.
origin_cover.uristringResource identifier reported by Douyin.
origin_cover.url_listarrayURLs supplied for the resource.
origin_cover.url_list[]stringURL supplied for the resource.
origin_cover.widthintegerResource width in pixels reported in the metadata.
origin_cover.heightintegerResource height in pixels reported in the metadata.
dynamic_coverobjectMoving cover resource when available.
dynamic_cover.uristringResource identifier reported by Douyin.
dynamic_cover.url_listarrayURLs supplied for the resource.
dynamic_cover.url_list[]stringURL supplied for the resource.
dynamic_cover.widthintegerResource width in pixels reported in the metadata.
dynamic_cover.heightintegerResource height in pixels reported in the metadata.
animated_coverobjectAnimated cover resource when available.
animated_cover.uristringResource identifier reported by Douyin.
animated_cover.url_listarrayURLs supplied for the resource.
animated_cover.url_list[]stringURL supplied for the resource.
cover_original_scaleobjectThe original-scale cover variant, when returned.
cover_original_scale.uristringThe platform resource identifier for this cover.
cover_original_scale.url_listarrayURLs supplied for this cover variant.
cover_original_scale.url_list[]stringA URL for this cover variant.
cover_original_scale.widthintegerThe width reported for this cover variant.
cover_original_scale.heightintegerThe height reported for this cover variant.
big_thumbsarray | nullPreview thumbnail resources, when returned. The list can be empty or null.
big_thumbs[]objectA set of preview thumbnails for the video.
big_thumbs[].uristringThe platform resource identifier for the preview thumbnail.
big_thumbs[].img_urlstringThe preview thumbnail image URL.
big_thumbs[].img_urlsarrayAdditional preview thumbnail URLs, when returned.
big_thumbs[].urisarrayAdditional platform resource identifiers for the preview thumbnails.
big_thumbs[].fextstringThe 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.

FieldTypeDescription
durationintegerVideo duration in milliseconds.
widthintegerVideo width reported by Douyin in pixels.
heightintegerVideo height reported by Douyin in pixels.
formatstringVideo format reported by Douyin.
ratiostringResolution label reported by Douyin.
has_watermarkbooleanWatermark flag from the video metadata.
play_addrobjectPrimary playback address supplied for the video.
play_addr.uristringResource identifier reported by Douyin.
play_addr.url_listarrayURLs supplied for the resource.
play_addr.url_list[]stringURL supplied for the resource.
play_addr.widthintegerResource width in pixels reported in the metadata.
play_addr.heightintegerResource height in pixels reported in the metadata.
play_addr.data_sizeintegerResource file size in bytes reported in the metadata.
play_addr_h264objectAddress supplied for the H.264 variant.
play_addr_h264.uristringResource identifier reported by Douyin.
play_addr_h264.url_listarrayURLs supplied for the resource.
play_addr_h264.url_list[]stringURL supplied for the resource.
play_addr_h264.widthintegerResource width in pixels reported in the metadata.
play_addr_h264.heightintegerResource height in pixels reported in the metadata.
play_addr_h264.data_sizeintegerResource file size in bytes reported in the metadata.
play_addr_265objectAddress supplied in the H.265 playback field.
play_addr_265.uristringResource identifier reported by Douyin.
play_addr_265.url_listarrayURLs supplied for the resource.
play_addr_265.url_list[]stringURL supplied for the resource.
play_addr_265.widthintegerResource width in pixels reported in the metadata.
play_addr_265.heightintegerResource height in pixels reported in the metadata.
play_addr_265.data_sizeintegerResource file size in bytes reported in the metadata.
download_addrobjectDownload address supplied for the video.
download_addr.uristringResource identifier reported by Douyin.
download_addr.url_listarrayURLs supplied for the resource.
download_addr.url_list[]stringURL supplied for the resource.
download_addr.widthintegerResource width in pixels reported in the metadata.
download_addr.heightintegerResource height in pixels reported in the metadata.
download_addr.data_sizeintegerResource file size in bytes reported in the metadata.
bit_ratearrayPlayback encodings and bitrate metadata supplied for the video.
bit_rate[]objectOne playback encoding supplied for the video.
bit_rate[].bit_rateintegerEncoding bitrate in bits per second.
bit_rate[].FPSintegerFrame rate in frames per second.
bit_rate[].formatstringMedia format reported for this encoding.
bit_rate[].gear_namestringEncoder preset label reported for this variant.
bit_rate[].quality_typeintegerQuality category code reported for this encoding.
bit_rate[].is_h265integerH.265 encoding flag reported for this variant.
bit_rate[].HDR_typestringHDR category label returned for the encoding.
bit_rate[].HDR_bitstringHDR bit-depth label returned for the encoding.
bit_rate[].play_addrobjectPlayback address for this encoding.
bit_rate[].play_addr.uristringResource identifier reported by Douyin.
bit_rate[].play_addr.url_listarrayURLs supplied for the resource.
bit_rate[].play_addr.url_list[]stringURL supplied for the resource.
bit_rate[].play_addr.widthintegerResource width in pixels reported in the metadata.
bit_rate[].play_addr.heightintegerResource height in pixels reported in the metadata.
bit_rate[].play_addr.data_sizeintegerResource file size in bytes reported in the metadata.
audioobjectAudio metadata carried in the video object. It can be empty.
metastringVideo metadata supplied as a serialized string.
is_h265integerThe H.265 indicator returned by Douyin as a numeric code.
is_source_HDRintegerThe 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.

FieldTypeDescription
idintegerNumeric music ID. Use a lossless JSON parser to retain the full value in JavaScript.
id_strstringMusic ID encoded as a string.
midstringMusic ID returned in the mid field.
titlestringTitle of the sound or music track.
authorstringArtist or sound creator name returned with the track.
albumstringAlbum title when supplied.
is_original_soundbooleanWhether Douyin marks the track as original sound.
cover_thumbobjectThumbnail cover for the sound or music track.
cover_thumb.uristringResource identifier reported by Douyin.
cover_thumb.url_listarrayURLs supplied for the resource.
cover_thumb.url_list[]stringURL supplied for the resource.
cover_thumb.widthintegerResource width in pixels reported in the metadata.
cover_thumb.heightintegerResource height in pixels reported in the metadata.
play_urlobjectPlayback resource for the sound or music track.
play_url.uristringResource identifier reported by Douyin.
play_url.url_listarrayURLs supplied for the resource.
play_url.url_list[]stringURL supplied for the resource.
cover_mediumobjectMedium music cover image.
cover_medium.uristringThe platform resource identifier for the cover.
cover_medium.url_listarrayURLs supplied for the music cover.
cover_medium.url_list[]stringA URL for the music cover.
cover_medium.widthintegerThe width reported for the music cover.
cover_medium.heightintegerThe height reported for the music cover.
cover_largeobjectLarge music cover image.
cover_large.uristringThe platform resource identifier for the cover.
cover_large.url_listarrayURLs supplied for the music cover.
cover_large.url_list[]stringA URL for the music cover.
cover_large.widthintegerThe width reported for the music cover.
cover_large.heightintegerThe height reported for the music cover.
cover_hdobjectHigh-definition music cover image.
cover_hd.uristringThe platform resource identifier for the cover.
cover_hd.url_listarrayURLs supplied for the music cover.
cover_hd.url_list[]stringA URL for the music cover.
cover_hd.widthintegerThe width reported for the music cover.
cover_hd.heightintegerThe height reported for the music cover.
Sharing, topics, and mentions17 fields

data.aweme_detail

FieldTypeDescription
share_urlstringThe Douyin share URL for the post.
share_infoobjectMetadata supplied for sharing the post.
share_info.share_urlstringURL supplied for sharing the video.
share_info.share_titlestringTitle supplied for sharing the video.
share_info.share_descstringDescription supplied for sharing the video.
text_extraarrayHashtags and user mentions associated with the post text.
text_extra[]objectOne text annotation.
text_extra[].typeintegerAnnotation type code reported by Douyin.
text_extra[].hashtag_idstringID of the annotated hashtag when the annotation represents a hashtag.
text_extra[].hashtag_namestringName of the annotated hashtag.
text_extra[].is_commercebooleanWhether Douyin flags the annotated hashtag as commercial.
cha_listarrayTopic or challenge details associated with the post.
cha_list[]objectOne topic or challenge.
cha_list[].cidstringDouyin topic or challenge ID.
cha_list[].cha_namestringTopic or challenge name.
cha_list[].descstringDescription of the topic or challenge.
cha_list[].is_commercebooleanWhether Douyin flags the topic or challenge as commercial.
Post status and controls12 fields

data.aweme_detail

FieldTypeDescription
statusobjectAvailability and viewing flags returned for the post.
status.is_privatebooleanWhether Douyin marks the post as private in the response.
status.is_deletebooleanWhether Douyin marks the post as deleted in the response.
status.is_prohibitedbooleanWhether Douyin marks the post as prohibited in the response.
status.allow_commentbooleanWhether the platform status indicates that comments are allowed.
status.allow_sharebooleanWhether the platform status indicates that sharing is allowed.
video_controlobjectMedia interaction controls returned by Douyin.
video_control.allow_downloadbooleanWhether the platform response indicates that downloading is allowed.
video_control.allow_duetbooleanWhether the platform response indicates that duets are allowed.
video_control.allow_stitchbooleanWhether the platform response indicates that stitching is allowed.
video_control.allow_sharebooleanWhether the platform control flag indicates that sharing is allowed.
video_control.show_watermarkbooleanWhether the video controls indicate that a watermark is shown.
Response metadata7 fields

data

FieldTypeDescription
status_codeintegerThe Douyin status code returned inside the post detail payload.
extraobjectAdditional metadata provided with the Douyin response.
extra.nowintegerThe response time recorded by Douyin as a Unix timestamp in milliseconds.
extra.logidstringThe identifier recorded for the response by Douyin.
extra.fatal_item_idsarrayItem identifiers listed as having fatal errors by Douyin. The list can be empty.
log_pbobjectAdditional response record metadata provided by Douyin.
log_pb.impr_idstringThe record identifier returned in the platform response metadata.
Other fields2 fields
Field pathTypeDescription
data-Fields returned when the response contains a Douyin post detail object.
data.aweme_detailobjectThe requested Douyin post, including video or image gallery metadata when returned.

Response Example ​

Loading the response example...