Skip to content

TikTok Post Details API (V1) ​

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

Retrieves details for a TikTok post identified by its post ID. Use it to look up a known TikTok video before content review, reporting, or related engagement analysis.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Security token for API access.
postIdquerystringYes-The unique ID of the TikTok post.

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE'
text
I want to use the "Post Details (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE
API Endpoint: BASE_URL + /api/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=VALUE
HTTP Method: GET
Authentication: Append the "token" query parameter to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/tiktok/post-details-v1-en.json

Parameters:
- token (query): Security token for API access. (Required)
- postId (query): The unique ID of the TikTok post. (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/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=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/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=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/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=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/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=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/tiktok/get-post-detail/v1?token=YOUR_API_KEY&postId=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 details6 fields

data.itemInfo.itemStruct

TikTok details for the requested post, when returned.

FieldTypeDescription
idstringTikTok post identifier.
descstringCaption of the TikTok post.
createTimeintegerPost creation time as Unix epoch seconds.
textLanguagestringReported language code for the post text.
textTranslatablebooleanWhether TikTok marks the post text as translatable.
playlistIdstringTikTok playlist identifier associated with the post, when returned.
Lookup status and sharing7 fields

data

TikTok post detail and its reported status. A success response can have status fields without item details.

FieldTypeDescription
statusCodeintegerTikTok post lookup status code. One status-only response reported a nonzero value.
status_codeintegerAdditional TikTok status field. It was 0 in a verified response with no item details.
status_msgstringStatus message reported for the post lookup. It can be an empty string.
itemInfoobjectPost information envelope, when present.
shareMetaobjectText metadata used when the post is shared.
shareMeta.titlestringDisplay title used for sharing the post.
shareMeta.descstringDisplay description used for sharing the post.
Author10 fields

data.itemInfo.itemStruct

FieldTypeDescription
authorobjectTikTok account information for the post author.
author.idstringTikTok author ID.
author.secUidstringSecondary TikTok user identifier.
author.uniqueIdstringPublic username of the TikTok user.
author.nicknamestringDisplay name of the TikTok user.
author.verifiedbooleanWhether the author is marked as verified.
author.privateAccountbooleanWhether TikTok marks the author account as private.
author.avatarThumbstringThumbnail avatar URL for the author.
author.avatarMediumstringMedium-size avatar URL for the author.
author.avatarLargerstringLarger avatar URL for the author.
Author metrics14 fields

data.itemInfo.itemStruct

FieldTypeDescription
authorStatsobjectAuthor metrics returned as integers.
authorStats.followerCountintegerAuthor follower count.
authorStats.followingCountintegerAuthor following count.
authorStats.videoCountintegerAuthor video count.
authorStats.heartCountintegerReported total likes received by the author.
authorStats.heartintegerAdditional author likes count reported in heart.
authorStats.diggCountintegerAuthor digg count reported by TikTok.
authorStatsV2objectAuthor metrics returned as decimal strings.
authorStatsV2.followerCountstringAuthor follower count as decimal text.
authorStatsV2.followingCountstringAuthor following count as decimal text.
authorStatsV2.videoCountstringAuthor video count as decimal text.
authorStatsV2.heartCountstringReported total likes received by the author as decimal text.
authorStatsV2.heartstringAdditional author likes count reported in heart as decimal text.
authorStatsV2.diggCountstringAuthor digg count reported by TikTok as decimal text.
Engagement13 fields

data.itemInfo.itemStruct

FieldTypeDescription
statsobjectPost metrics returned as integers.
stats.playCountintegerReported post play count.
stats.diggCountintegerReported number of likes on the post.
stats.commentCountintegerReported number of comments on the post.
stats.shareCountintegerReported number of shares on the post.
stats.collectCountintegerReported number of times the post was saved.
statsV2objectPost metrics returned as decimal strings.
statsV2.playCountstringReported post play count as decimal text.
statsV2.diggCountstringReported number of likes on the post as decimal text.
statsV2.commentCountstringReported number of comments on the post as decimal text.
statsV2.shareCountstringReported number of shares on the post as decimal text.
statsV2.collectCountstringReported number of times the post was saved as decimal text.
statsV2.repostCountstringReported number of reposts of the post as decimal text.
Caption and topics31 fields

data.itemInfo.itemStruct

FieldTypeDescription
textExtraarrayAnnotations for the main post caption.
textExtra[]objectOne annotation attached to a portion of post text.
textExtra[].startintegerStarting offset in UTF-16 code units within the associated text.
textExtra[].endintegerExclusive ending offset in UTF-16 code units within the associated text.
textExtra[].hashtagIdstringTikTok identifier of the annotated hashtag.
textExtra[].hashtagNamestringDisplay name of the annotated hashtag.
textExtra[].typeintegerNumeric type reported for this text annotation.
textExtra[].subTypeintegerNumeric subtype reported for this text annotation.
textExtra[].awemeIdstringTikTok post ID associated with this annotation, when supplied.
textExtra[].isCommercebooleanWhether the text annotation is marked as commerce-related.
contentsarrayStructured content sections returned for the post.
contents[]objectOne structured content section of the post.
contents[].descstringCaption text supplied for this content section.
contents[].textExtraarrayAnnotations for the text of this content section.
contents[].textExtra[]objectOne annotation attached to a portion of post text.
contents[].textExtra[].startintegerStarting offset in UTF-16 code units within the associated text.
contents[].textExtra[].endintegerExclusive ending offset in UTF-16 code units within the associated text.
contents[].textExtra[].hashtagIdstringTikTok identifier of the annotated hashtag.
contents[].textExtra[].hashtagNamestringDisplay name of the annotated hashtag.
contents[].textExtra[].typeintegerNumeric type reported for this text annotation.
contents[].textExtra[].subTypeintegerNumeric subtype reported for this text annotation.
contents[].textExtra[].awemeIdstringTikTok post ID associated with this annotation, when supplied.
contents[].textExtra[].isCommercebooleanWhether the text annotation is marked as commerce-related.
challengesarrayTopics or challenges associated with the post.
challenges[]objectOne TikTok topic or challenge attached to the post.
challenges[].idstringTikTok identifier of the topic.
challenges[].titlestringDisplay title of the topic.
challenges[].descstringDisplay description of the topic.
challenges[].coverThumbstringThumbnail cover URL for this topic.
challenges[].coverMediumstringMedium-size cover URL for this topic.
challenges[].coverLargerstringLarger cover URL for this topic.
Video and covers18 fields

data.itemInfo.itemStruct.video

Video media, covers, playback files, and captions for the post.

FieldTypeDescription
idstringVideo identifier reported in the media object.
videoIDstringAdditional video identifier carried by the media object.
durationintegerDuration of the video in seconds.
widthintegerVideo frame width in pixels.
heightintegerVideo frame height in pixels.
ratiostringVideo ratio or resolution label as returned by TikTok.
definitionstringDisplay definition label for the video.
formatstringFile format reported for the video.
codecTypestringVideo codec label reported for the media.
sizeintegerReported size of the video file.
bitrateintegerReported video bitrate.
coverstringVideo cover image URL.
dynamicCoverstringAnimated cover image URL, when available.
originCoverstringOriginal cover image URL reported for the video.
zoomCoverobjectResized cover images keyed by their reported size labels.
zoomCover.{key}stringCover image URL for the selected size label.
playAddrstringDirect playback URL returned for the video.
downloadAddrstringDownload URL reported for the video, when provided.
Playback formats22 fields

data.itemInfo.itemStruct.video

FieldTypeDescription
PlayAddrStructobjectPlayback file details and alternate URLs.
PlayAddrStruct.UristringMedia reference for the playback file.
PlayAddrStruct.WidthintegerPlayback frame width in pixels.
PlayAddrStruct.HeightintegerPlayback frame height in pixels.
PlayAddrStruct.DataSizeintegerReported size of the playback file.
PlayAddrStruct.UrlListarrayAvailable URLs for the playback file.
PlayAddrStruct.UrlList[]stringOne available URL for the playback file.
bitrateInfoarrayAvailable playback variants with bitrate and file information.
bitrateInfo[]objectOne playback variant for this video.
bitrateInfo[].BitrateintegerBitrate reported for this variant.
bitrateInfo[].BitrateFPSintegerFrame rate reported for this playback variant.
bitrateInfo[].CodecTypestringCodec label for this playback variant.
bitrateInfo[].FormatstringFile format of this playback variant.
bitrateInfo[].GearNamestringVariant name reported for the playback option.
bitrateInfo[].QualityTypeintegerNumeric quality level reported for the variant.
bitrateInfo[].PlayAddrobjectPlayback file details and alternate URLs.
bitrateInfo[].PlayAddr.UristringMedia reference for the playback file.
bitrateInfo[].PlayAddr.WidthintegerPlayback frame width in pixels.
bitrateInfo[].PlayAddr.HeightintegerPlayback frame height in pixels.
bitrateInfo[].PlayAddr.DataSizeintegerReported size of the playback file.
bitrateInfo[].PlayAddr.UrlListarrayAvailable URLs for the playback file.
bitrateInfo[].PlayAddr.UrlList[]stringOne available URL for the playback file.
Subtitles29 fields

data.itemInfo.itemStruct.video

FieldTypeDescription
claInfoobjectDetailed caption metadata for the video.
claInfo.enableAutoCaptionbooleanWhether automatic captions are marked as enabled.
claInfo.hasOriginalAudiobooleanWhether original audio is indicated for the video.
claInfo.noCaptionReasonintegerNumeric caption availability reason reported by TikTok.
claInfo.originalLanguageInfoobjectOriginal language information for the video.
claInfo.originalLanguageInfo.languagestringDisplay name of the original language.
claInfo.originalLanguageInfo.languageCodestringLanguage code reported for the original language.
claInfo.originalLanguageInfo.languageIDstringIdentifier reported for the original language.
claInfo.captionInfosarrayCaption tracks in the detailed caption metadata.
claInfo.captionInfos[]objectOne caption track in the detailed caption metadata.
claInfo.captionInfos[].captionFormatstringFile format reported for the caption track.
claInfo.captionInfos[].languagestringDisplay name of the caption language.
claInfo.captionInfos[].languageCodestringLanguage code reported for this caption track.
claInfo.captionInfos[].languageIDstringLanguage identifier reported for this caption track.
claInfo.captionInfos[].isAutoGenbooleanWhether the caption track is marked as automatically generated.
claInfo.captionInfos[].isOriginalCaptionbooleanWhether the track is marked as the original caption.
claInfo.captionInfos[].expirestringExpiration of caption URLs as Unix seconds encoded in a string.
claInfo.captionInfos[].urlstringURL returned for this caption track.
claInfo.captionInfos[].urlListarrayAvailable links for this caption track.
claInfo.captionInfos[].urlList[]stringOne URL for the caption track.
subtitleInfosarraySubtitle tracks listed separately in the video metadata.
subtitleInfos[]objectOne subtitle track listed for the video.
subtitleInfos[].FormatstringFile format reported for the subtitle track.
subtitleInfos[].LanguageCodeNamestringLanguage code label of the subtitle track.
subtitleInfos[].LanguageIDstringLanguage identifier reported for the subtitle track.
subtitleInfos[].SizeintegerReported size of the subtitle resource.
subtitleInfos[].SourcestringSource label reported for the subtitle track.
subtitleInfos[].UrlstringURL returned for the subtitle resource.
subtitleInfos[].UrlExpireintegerExpiration time of the subtitle URL as Unix seconds.
Music12 fields

data.itemInfo.itemStruct

FieldTypeDescription
musicobjectPublic audio track information shown with the post.
music.idstringTikTok identifier of the audio track.
music.titlestringDisplayed title of the audio track.
music.authorNamestringDisplayed contributor name of the audio track.
music.originalbooleanWhether the track is marked as original audio.
music.durationintegerReported duration of the audio track.
music.isCopyrightedbooleanWhether the track is marked as copyrighted.
music.is_commerce_musicbooleanWhether the track is marked for commercial music use.
music.coverThumbstringAudio track thumbnail cover URL.
music.coverMediumstringMedium-size cover URL for the audio track.
music.coverLargestringLarge cover URL for the audio track.
music.playUrlstringAudio playback URL returned with the track.

Response Example ​

Loading the response example...