TikTok APIs - User Published Posts (V1)
Retrieve a list of posts published by a specific TikTok user. The API returns detailed information about each post, including video ID, description, publish time, statistics (likes, comments, shares, views), and video download URL if available.
Typical use cases:
- User activity analysis and posting frequency tracking.
- Influencer performance evaluation.
- Content trend monitoring for specific creators.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
token | query | string | Yes | Security token for API access. |
secUid | query | string | Yes | The unique security ID of the TikTok user (e.g., MS4wLjABAAAAonP2...). |
cursor | query | string | No | Pagination cursor. Use '0' for the first page, then use the 'cursor' value returned in the previous response. |
sort | query | string | No | Sorting criteria for the user's posts. Available Values: - _0: Default (Mixed)- _1: Highest Liked- _2: Latest Published |
Code Samples
💡 Environment Note
Default samples use https://api.justoneapi.com (prod-global). For users in Mainland China, it is recommended to replace it with http://47.117.133.51:30015 (prod-cn) for better performance. See Environment Guide.
bash
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
curl -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 Just One API.
API Endpoint: https://api.justoneapi.com/api/tiktok/get-user-post/v1
HTTP Method: GET
Authentication: Append "?token=YOUR_API_KEY" to the URL.
OpenAPI Definition: https://docs.justoneapi.com/openapi/tiktok-apis/user-published-posts-v1-en.json
Parameters:
- token (query): Security token for API access. (Required)
- secUid (query): The unique security ID of the TikTok user (e.g., MS4wLjABAAAAonP2...). (Required)
- cursor (query): Pagination cursor. Use '0' for the first page, then use the 'cursor' value returned in the previous response.
- sort (query): Sorting criteria for the user's posts.
Available Values:
- `_0`: Default (Mixed)
- `_1`: Highest Liked
- `_2`: Latest Published
Return format: JSON
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 request timeout to at least 60 seconds.
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
Please help me write a script in my preferred programming language to call this API and handle the response.python
# Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import requests
url = "https://api.justoneapi.com/api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE"
response = requests.get(url)
print(response.json())js
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE", {
method: "GET"
});
const data = await response.json();
console.log(data);java
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.justoneapi.com/api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}go
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
url := "https://api.justoneapi.com/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()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}php
// Tip: For Mainland China, replace https://api.justoneapi.com with http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/tiktok/get-user-post/v1?token=YOUR_API_KEY&secUid=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;Responses
json
{
"code": 0,
"data": {
"cursor": "1771536804564",
"extra": {
"fatal_item_ids": [],
"logid": "202603091400022B6EC42B2525EFA09EAD",
"now": 1773064802000
},
"hasMore": true,
"itemList": [
{
"AIGCDescription": "",
"CategoryType": 101,
"IsHDBitrate": false,
"author": {
"UserStoryStatus": 0,
"avatarLarger": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"avatarMedium": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"avatarThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"commentSetting": 0,
"downloadSetting": 0,
"duetSetting": 0,
"ftc": false,
"id": "107955",
"isADVirtual": false,
"isEmbedBanned": false,
"nickname": "TikTok",
"openFavorite": false,
"privateAccount": false,
"relation": 0,
"secUid": "MS4wLjABAAAAv7iSuuXDJGDvJkmH_vz1qkDZYo1apxgzaxdBSeIuPiM",
"secret": false,
"signature": "One TikTok can make a big impact",
"stitchSetting": 0,
"uniqueId": "tiktok",
"verified": true
},
"authorStats": {
"diggCount": 3549,
"followerCount": 93200000,
"followingCount": 3,
"friendCount": 0,
"heart": 455100000,
"heartCount": 455100000,
"videoCount": 1412
},
"authorStatsV2": {
"diggCount": "3549",
"followerCount": "93200000",
"followingCount": "3",
"friendCount": "0",
"heart": "455100000",
"heartCount": "455100000",
"videoCount": "1412"
},
"backendSourceEventTracking": "",
"challenges": [
{
"coverLarger": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/1c879ff9cc10ea2d4a0e5d5445038a4d.png~tplv-tiktok...",
"coverMedium": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/1c879ff9cc10ea2d4a0e5d5445038a4d.png~tplv-tiktok...",
"coverThumb": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/1c879ff9cc10ea2d4a0e5d5445038a4d.png~tplv-tiktok...",
"desc": "Celebrate the world of cinema with TikTok.",
"id": "1639367069624326",
"profileLarger": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/c3b1288cc72c5db38930421dbef58901.png~tplv-tiktok...",
"profileMedium": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/c3b1288cc72c5db38930421dbef58901.png~tplv-tiktok...",
"profileThumb": "https://p16-common-sign.tiktokcdn-us.com/tiktok-obj/c3b1288cc72c5db38930421dbef58901.png~tplv-tiktok...",
"title": "filmtok"
}
],
"collected": false,
"contents": [
{
"desc": "#filmtok LOCK IN, we caught up with your faves at the Actor Awards 🎞️ ✨ @Cinema.Joe @The Actor Award...",
"textExtra": [
{
"awemeId": "",
"end": 8,
"hashtagName": "filmtok",
"isCommerce": false,
"start": 0,
"subType": 0,
"type": 1
}
]
}
],
"createTime": 1772841228,
"creatorAIComment": {
"eligibleVideo": false,
"hasAITopic": false,
"notEligibleReason": 101
},
"desc": "#filmtok LOCK IN, we caught up with your faves at the Actor Awards 🎞️ ✨ @Cinema.Joe @The Actor Award...",
"digged": false,
"diversificationId": 10049,
"duetDisplay": 0,
"duetEnabled": true,
"event": {
"event_id": "7613931554804334648",
"event_start_time": 1773277200,
"has_subscribed": false,
"title": "In The Mix, Stephen Sanchez"
},
"forFriend": false,
"id": "7614295022346784030",
"isAd": false,
"isReviewing": false,
"itemCommentStatus": 0,
"item_control": {
"can_repost": true
},
"music": {
"authorName": "TikTok",
"coverLarge": "https://p19-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"coverMedium": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"coverThumb": "https://p16-common-sign.tiktokcdn-us.com/tos-useast5-avt-0068-tx/ba67b11de451691939223e9d978e613a~tp...",
"duration": 88,
"id": "7614294986238020383",
"isCopyrighted": false,
"is_commerce_music": true,
"is_unlimited_music": false,
"original": true,
"playUrl": "https://v16m.tiktokcdn-us.com/897820b8d6897ce6d9c65887dbef5a59/69af271a/video/tos/useast8/tos-useast...",
"private": false,
"shoot_duration": 88,
"title": "original sound",
"tt2dsp": {}
},
"officalItem": false,
"originalItem": false,
"privateItem": false,
"secret": false,
"shareEnabled": true,
"stats": {
"collectCount": 590,
"commentCount": 4108,
"diggCount": 5037,
"playCount": 229000,
"shareCount": 632
},
"statsV2": {
"collectCount": "590",
"commentCount": "4108",
"diggCount": "5037",
"playCount": "229000",
"repostCount": "0",
"shareCount": "632"
},
"stitchDisplay": 0,
"stitchEnabled": true,
"textExtra": [
{
"awemeId": "",
"end": 8,
"hashtagName": "filmtok",
"isCommerce": false,
"start": 0,
"subType": 0,
"type": 1
}
],
"textLanguage": "en",
"textTranslatable": true,
"video": {
"PlayAddrStruct": {
"DataSize": 15043441,
"FileCs": "c:0-74172-0daf",
"FileHash": "383f9f494b519c01a18f6716820149a6",
"Height": 1280,
"Uri": "v15044gf0000d6lmgvfog65hiupqen0g",
"UrlKey": "v15044gf0000d6lmgvfog65hiupqen0g_h264_720p_1356272",
"UrlList": [
"https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-pve-0068-tx2/o8aEJiBBAXOBOhnifW..."
],
"Width": 720
},
"VQScore": "73.67",
"bitrate": 1356272,
"bitrateInfo": [
{
"Bitrate": 1356272,
"BitrateFPS": 30,
"CodecType": "h264",
"Format": "mp4",
"GearName": "normal_720_0",
"MVMAF": "{\"v2.0\": {\"srv1\": {\"v1080\": 84.516, \"v960\": 88.089, \"v864\": 89.131, \"v720\": 92.807}, \"ori\": {\"v1080\"...",
"PlayAddr": {
"DataSize": 15043441,
"FileCs": "c:0-74172-0daf",
"FileHash": "383f9f494b519c01a18f6716820149a6",
"Height": 1280,
"Uri": "v15044gf0000d6lmgvfog65hiupqen0g",
"UrlKey": "v15044gf0000d6lmgvfog65hiupqen0g_h264_720p_1356272",
"UrlList": [
"https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-pve-0068-tx2/o8aEJiBBAXOBOhnifW..."
],
"Width": 720
},
"QualityType": 10,
"VideoExtra": "{\"PktOffsetMap\":\"[{\\\"time\\\": 1, \\\"offset\\\": 292579}, {\\\"time\\\": 2, \\\"offset\\\": 480372}, {\\\"time\\\": 3..."
}
],
"claInfo": {
"enableAutoCaption": true,
"hasOriginalAudio": true,
"noCaptionReason": 1
},
"codecType": "h264",
"cover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI...",
"definition": "720p",
"downloadAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-ve-0068c003-tx2/oYII5RBpPqrahin...",
"duration": 88,
"dynamicCover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI...",
"encodeUserTag": "",
"encodedType": "normal",
"format": "mp4",
"height": 1280,
"id": "7614295022346784030",
"originCover": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/owUOQCFn72V9buRrECDAQhqjRLpAaBeES2Ed...",
"playAddr": "https://v16-webapp-prime.us.tiktok.com/video/tos/useast8/tos-useast8-pve-0068-tx2/o8aEJiBBAXOBOhnifW...",
"ratio": "720p",
"size": 15043441,
"subtitleInfos": [
{
"Format": "webvtt",
"LanguageCodeName": "ben-BD",
"LanguageID": "12",
"Size": 6494,
"Source": "MT",
"Url": "https://v16m-webapp.tiktokcdn-us.com/51be5ae2fe59c98ced62a25d97206268/69b175ba/video/tos/useast8/tos...",
"UrlExpire": 1773237690,
"Version": "4"
}
],
"videoID": "v15044gf0000d6lmgvfog65hiupqen0g",
"videoQuality": "normal",
"volumeInfo": {
"Loudness": -24.9,
"Peak": 0.51286
},
"width": 720,
"zoomCover": {
"240": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI...",
"480": "https://p19-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI...",
"720": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI...",
"960": "https://p16-common-sign.tiktokcdn-us.com/tos-useast8-p-0068-tx2/o8YrF1A1fAEu7SCGABI08QBZaiiKiCAgGbAI..."
}
}
}
],
"log_pb": {
"impr_id": "202603091400022B6EC42B2525EFA09EAD"
},
"statusCode": 0,
"status_code": 0,
"status_msg": "",
"tt_chain_token": "PXsf54jqn0QwRtD61TMjFw==",
"cookie": "tt_chain_token=PXsf54jqn0QwRtD61TMjFw==;"
}
}💡 Note: For list data, the example shows only 1-2 items for simplicity. The actual count depends on the API response.
