Skip to content

TikTok User Published Posts API (V1) ​

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

Retrieves posts published by a TikTok user identified by secUid, with cursor pagination and latest or popular sorting. Use it to browse a creator's posting history or continue through their public post feed.

Parameters ​

NameInTypeRequiredDefaultDescription
tokenquerystringYes-Security token for API access.
secUidquerystringYes-The opaque security ID returned for the TikTok user.
cursorquerystringNo0Pagination cursor. Use '0' for the first page, then use the max_cursor value returned in the previous response.
sortquerystringNoLATESTSorting criteria for the user's posts.


Available Values:

- LATEST: Newest posts first (default)

- MOST_POPULAR: Most popular posts first

Code Samples ​

bash
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE'
text
I want to use the "User Published Posts (V1)" API from JustOneAPI.
Base URL: https://api.justoneapi.com.
API Path: /api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE
API Endpoint: BASE_URL + /api/tiktok/get-user-post/v1?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/tiktok/user-published-posts-v1-en.json

Parameters:
- token (query): Security token for API access. (Required)
- secUid (query): The opaque security ID returned for the TikTok user. (Required)
- cursor (query): Pagination cursor. Use '0' for the first page, then use the max_cursor value returned in the previous response.
- sort (query): Sorting criteria for the user's posts.

Available Values:
- `LATEST`: Newest posts first (default)
- `MOST_POPULAR`: Most popular posts first

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-user-post/v1?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/tiktok/get-user-post/v1?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/tiktok/get-user-post/v1?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/tiktok/get-user-post/v1?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/tiktok/get-user-post/v1?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).

Post overview7 fields

data.aweme_list[]

Posts returned for this page. The same posts can appear under LATEST and MOST_POPULAR.

FieldTypeDescription
aweme_idstringTikTok post ID returned as text.
descstringCaption text attached to the post.
create_timeintegerPost creation time as a Unix timestamp in seconds.
desc_languagestringLanguage label reported for the caption.
aweme_typeintegerNumeric post type reported by TikTok.
is_topintegerNumeric pin flag reported for the post, where 1 indicates a pinned post.
is_adsbooleanWhether TikTok flags the post as an advertisement.
Author and collaborators18 fields

data.aweme_list[]

FieldTypeDescription
author_user_idintegerAuthor ID returned as an integer. It can exceed the JavaScript safe integer limit. Use the text in author.uid for an exact ID.
authorobjectPublic profile summary of the post author.
author.uidstringTikTok author ID as text. Use this field to preserve the exact ID in JavaScript.
author.nicknamestringProfile display name of the post author.
author.unique_idstringPublic TikTok username of the post author.
author.follower_countintegerFollower count reported for the post author.
author.following_countintegerNumber of accounts the author follows, as reported by TikTok.
author.aweme_countintegerNumber of posts reported for the author account.
author.total_favoritedintegerTotal likes received by the author as reported in the profile summary.
author.custom_verifystringProfile verification text returned for the author when present.
author.enterprise_verify_reasonstringEnterprise verification text returned for the author when present.
collab_infoobjectCollaboration information when returned.
collab_info.collaboratorsarrayCollaborator profiles listed for the post.
collab_info.collaborators[]objectOne collaborator record.
collab_info.collaborators[].user_infoobjectPublic profile summary of this collaborator.
collab_info.collaborators[].user_info.uidstringTikTok collaborator ID as text.
collab_info.collaborators[].user_info.nicknamestringDisplay name of the collaborator.
collab_info.collaborators[].user_info.unique_idstringPublic TikTok username of the collaborator.
Engagement and availability16 fields

data.aweme_list[]

FieldTypeDescription
prevent_downloadbooleanWhether TikTok flags downloading the post as restricted.
statisticsobjectEngagement counts reported for this post.
statistics.aweme_idstringPost ID associated with this statistics object.
statistics.play_countintegerReported play count for the post.
statistics.digg_countintegerReported like count for the post.
statistics.comment_countintegerReported comment count for the post.
statistics.share_countintegerReported share count for the post.
statistics.collect_countintegerReported bookmark count for the post.
statistics.download_countintegerReported download count for the post.
statistics.repost_countintegerReported TikTok repost count for the post.
statistics.whatsapp_share_countintegerReported count of shares through WhatsApp.
statusobjectAvailability flags reported for this post.
status.aweme_idstringPost ID associated with these status fields.
status.allow_sharebooleanWhether the post status indicates sharing is allowed.
status.allow_commentbooleanWhether the post status indicates commenting is allowed.
status.is_deletebooleanWhether TikTok marks the post as deleted.
Video15 fields

data.aweme_list[]

FieldTypeDescription
videoobjectVideo metadata. Image posts can also carry this object.
video.durationintegerVideo duration in milliseconds. Image posts can carry a video placeholder with duration 0.
video.widthintegerVideo width in pixels.
video.heightintegerVideo height in pixels.
video.ratiostringVideo resolution label reported by TikTok.
video.play_addrobjectPlayback asset metadata.
video.play_addr.data_sizeintegerReported playback asset size in bytes.
video.bit_ratearrayAvailable video renditions. The array can be empty.
video.bit_rate[]objectOne reported video rendition.
video.bit_rate[].gear_namestringRendition label reported by TikTok.
video.bit_rate[].quality_typeintegerNumeric quality code of the rendition.
video.bit_rate[].bit_rateintegerBitrate in bits per second for this rendition.
video.bit_rate[].fpsintegerFrame rate in frames per second for this rendition.
video.bit_rate[].play_addrobjectPlayback asset metadata.
video.bit_rate[].play_addr.data_sizeintegerReported playback asset size in bytes.
Image posts29 fields

data.aweme_list[]

FieldTypeDescription
image_post_infoobjectImage-post metadata when returned. A populated images gallery identifies an image post.
image_post_info.titlestringTitle of the image post.
image_post_info.imagesarrayImages included in the post gallery.
image_post_info.images[]objectOne image in the gallery.
image_post_info.images[].display_imageobjectDisplay rendition dimensions.
image_post_info.images[].display_image.widthintegerImage width in pixels.
image_post_info.images[].display_image.heightintegerImage height in pixels.
image_post_info.images[].thumbnailobjectThumbnail rendition dimensions.
image_post_info.images[].thumbnail.widthintegerImage width in pixels.
image_post_info.images[].thumbnail.heightintegerImage height in pixels.
image_post_info.images[].owner_watermark_imageobjectDimensions of the creator-watermarked rendition.
image_post_info.images[].owner_watermark_image.widthintegerImage width in pixels.
image_post_info.images[].owner_watermark_image.heightintegerImage height in pixels.
image_post_info.images[].user_watermark_imageobjectDimensions of the user-watermarked rendition.
image_post_info.images[].user_watermark_image.widthintegerImage width in pixels.
image_post_info.images[].user_watermark_image.heightintegerImage height in pixels.
image_post_info.image_post_coverobjectImage-post cover and its rendition dimensions.
image_post_info.image_post_cover.display_imageobjectDisplay rendition dimensions.
image_post_info.image_post_cover.display_image.widthintegerImage width in pixels.
image_post_info.image_post_cover.display_image.heightintegerImage height in pixels.
image_post_info.image_post_cover.thumbnailobjectThumbnail rendition dimensions.
image_post_info.image_post_cover.thumbnail.widthintegerImage width in pixels.
image_post_info.image_post_cover.thumbnail.heightintegerImage height in pixels.
image_post_info.image_post_cover.owner_watermark_imageobjectDimensions of the creator-watermarked rendition.
image_post_info.image_post_cover.owner_watermark_image.widthintegerImage width in pixels.
image_post_info.image_post_cover.owner_watermark_image.heightintegerImage height in pixels.
image_post_info.image_post_cover.user_watermark_imageobjectDimensions of the user-watermarked rendition.
image_post_info.image_post_cover.user_watermark_image.widthintegerImage width in pixels.
image_post_info.image_post_cover.user_watermark_image.heightintegerImage height in pixels.
Sounds10 fields

data.aweme_list[]

FieldTypeDescription
musicobjectSound metadata when included with the post.
music.id_strstringTikTok sound ID as text.
music.titlestringName of the attached sound.
music.authorstringArtist or creator credit displayed for the sound.
music.albumstringAlbum label displayed for the sound when available.
music.durationintegerDuration value reported by TikTok for the sound.
music.is_original_soundbooleanWhether TikTok labels the sound as original audio.
music.is_commerce_musicbooleanCommercial-music flag for the sound as reported by TikTok.
music_begin_time_in_msintegerStart offset reported for the sound used in the post, in milliseconds.
music_end_time_in_msintegerEnd offset reported for the sound used in the post, in milliseconds.
Hashtags and caption annotations14 fields

data.aweme_list[]

FieldTypeDescription
cha_listarray | nullHashtags and challenges associated with the post when available. The value can be null.
cha_list[]objectOne reported hashtag or challenge.
cha_list[].cidstringTikTok hashtag or challenge ID.
cha_list[].cha_namestringDisplay name of the hashtag or challenge.
cha_list[].descstringDescription returned for the hashtag or challenge.
cha_list[].view_countintegerReported view count for the hashtag or challenge.
cha_list[].use_countintegerReported usage count for the hashtag or challenge.
text_extraarrayAnnotations attached to the post caption.
text_extra[]objectOne caption annotation.
text_extra[].startintegerStart offset of the annotation reported for the caption. Observed hashtag offsets use UTF-16 code units.
text_extra[].endintegerEnd offset of the annotation reported for the caption. Observed hashtag offsets use UTF-16 code units.
text_extra[].typeintegerNumeric annotation type reported by TikTok.
text_extra[].hashtag_namestringHashtag name when this annotation identifies a hashtag.
text_extra[].hashtag_idstringHashtag ID when this annotation identifies a hashtag.
Pagination and status5 fields

data

FieldTypeDescription
status_codeintegerTikTok status code for this result. The outer code is the JustOneAPI business code.
status_msgstringStatus message returned by TikTok.
min_cursorintegerAdditional page boundary cursor reported by TikTok.
max_cursorintegerCursor for the next page. When has_more is 1, pass this exact value as decimal text to cursor for the same user and sort.
has_moreintegerPagination flag reported by TikTok. Value 1 indicates another page and 0 indicates the end.

Response Example ​

Loading the response example...