English
TikTok API Reference
Publishing, Creator feed scraping, music search, and TikTok Shop showcase endpoints.
1. Publish Video
POST /api/tiktok/upload
Cost: 5 Credits.
json
{
"videoUrl": "https://cdn.example.com/videos/summer-fashion.mp4",
"caption": "Exciting video! #fyp",
"targetChannel": "US Fashion Channel",
"privacyLevel": 0,
"allowComment": true,
"allowDuet": true,
"allowStitch": true,
"soundId": "7189283746591028374"
}2. Crawl Creator Posts
GET /api/tiktok/user/posts
Cost: 1 Credit.
Query Parameters:
username(String): Unique handle (e.g.lamine.yamal)profileUrl(String, Optional): Profile linkcount(Number, Default 35, Max 50): Items to returncursor(String/Number, Default 0): Pagination cursor
Response (200 OK):
json
{
"success": true,
"itemList": [
{
"id": "7419827361528172819",
"desc": "Training session highlights ahead of the big match! ⚽ #football",
"createTime": 1727182900,
"downloadNoWatermarkUrl": "https://api.stackvid.dev/api/tiktok/download?url=7419827361528172819",
"video": {
"width": 1080,
"height": 1920,
"format": "mp4",
"size": 18500200,
"videoID": "v14044g50000dan5qe7og65mk26sen3g",
"bitrates": [
{
"gearName": "adapt_lowest_1080_1",
"qualityType": 2,
"bitrate": 1951034,
"fps": 60,
"codecType": "h265_hvc1",
"format": "mp4",
"width": 1080,
"height": 1920,
"size": 18500200,
"playUrl": "https://v16-webapp-prime.tiktok.com/video/tos/..."
}
]
},
"music": {
"id": "7182938475619283746",
"title": "See Tình (Remix)",
"duration": 45,
"isCommerceMusic": true,
"original": false,
"isCopyrighted": true
},
"products": [
{
"productId": "1731402508560140405",
"title": "Athletic Breathable Performance T-Shirt",
"keyword": "Athletic T-Shirt",
"coverUrl": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-oec22/1731402508560140405.jpeg"
}
]
}
],
"cursor": "1727092817000",
"hasMore": true
}2b. Get Creator Profile
GET /api/tiktok/user/profile
Cost: 1 Credit.
Retrieves detailed creator profile metrics, avatar variants (thumb, medium, large), bio, verified status, follower/like/video counts, and TikTok Shop seller badge.
Query Parameters:
username(String, Optional): Unique handle (e.g.lamine.yamalor@lamine.yamal)profileUrl(String, Optional): Profile link or short URLuserId(String, Optional): Numeric user IDsecUid(String, Optional): 64-character secUidproxyUrl(String, Optional): Custom proxy URL
Response (200 OK):
json
{
"success": true,
"user": {
"id": "7251849182371928374",
"uniqueId": "lamine.yamal",
"nickname": "Lamine Yamal",
"avatarThumb": "https://p16-common-sign.tiktokcdn.com/tos-alisg-avt-0068/77bb53f891028f660af4c375e534d60c~tplv-tiktokx-cropcenter:100:100.jpeg?...",
"avatarMedium": "https://p19-common-sign.tiktokcdn.com/tos-alisg-avt-0068/77bb53f891028f660af4c375e534d60c~tplv-tiktokx-cropcenter:720:720.jpeg?...",
"avatarLarger": "https://p16-common-sign.tiktokcdn.com/tos-alisg-avt-0068/77bb53f891028f660af4c375e534d60c~tplv-tiktokx-cropcenter:1080:1080.jpeg?...",
"signature": "FC Barcelona & Spain 🇪🇸⚽️",
"verified": true,
"secUid": "MS4wLjABAAAAN8lpi9aJjiPSF_8CrejiLzUvsPfS-vhZ1V6KHGxgAe67kK1og6cyET8dq-LkgKdc",
"privateAccount": false,
"ttSeller": false,
"followingVisibility": 1,
"followerCount": 25400000,
"followingCount": 42,
"heartCount": 280500000,
"videoCount": 58,
"diggCount": 0,
"friendCount": 0
}
}3. Search Licensed Music
POST /api/tiktok/music/search
Cost: 1 Credit.
json
{
"keyword": "trending remix",
"cursor": 0,
"count": 10,
"onlyCommerce": true
}onlyCommerce(Boolean, Optional): Filter exclusively for commercial-use sounds (isCommerceMusic: true) required when publishing with TikTok Shop anchors to prevent audio muting.
4. Showcase Product Catalog
POST /api/tiktok/showcase/products
Cost: 1 Credit.
json
{
"count": 10,
"offset": 0,
"targetChannel": "US Fashion Channel"
}Response (200 OK):
json
{
"success": true,
"message": "Get Products In Showcase successfully",
"total": 45,
"products": [
{
"product_id": "1729482910392817",
"title": "Korean Silk Oversized Blouse",
"cover": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-oec22/1729482910392817.jpeg",
"price": "$29.99"
}
]
}5. Download Video Directly (MP4 Stream)
GET /api/tiktok/download
Resolves and streams the raw, watermark-free HD MP4 video binary directly as an attachment file. Cost: 1 Credit.
Query Parameters:
url(String, Required): TikTok video URL, mobile short link (vt.tiktok.com), or post ID (e.g."7419827361528172819").
Headers:
X-API-Key: ***
Response (200 OK):
Returns a raw binary video stream:
Content-Type: video/mp4Content-Disposition: attachment; filename="{id}.mp4"Content-Length: <file size in bytes>
bash
curl -X GET "https://api.stackvid.dev/api/tiktok/download?url=7419827361528172819" \
-H "X-API-Key: tk_live_YOUR_API_KEY" \
--output "clean-video.mp4"6. Send TikTok Direct Message (Chat)
POST /api/tiktok/chat/send
Sends a direct text message into a TikTok conversation. Cost: 500 Credits (500 VND / message).
Headers:
Content-Type: application/jsonAuthorization: Bearer <jwt-token>orX-API-Key: tk_live_YOUR_API_KEY
Request Body:
json
{
"conversationId": "0:1:7242178829468435462:7248907244315444229",
"conversationShortId": "7692450584246747398",
"text": "Hello! How can StackVid assist you today?",
"conversationType": 1
}conversationId(String, Required): TikTok conversation ID.conversationShortId(String, Required): Conversation short ID.text(String, Required): Text message body to deliver.conversationType(Number, Optional): Conversation type (default:1- 1-on-1 direct chat).channelId(String, Optional): Target linked TikTok channel to send from.
Response (200 OK):
json
{
"success": true,
"serverMessageId": "7692666338627651092",
"clientMessageId": "75eb10ac-5c5d-4823-84d5-1050741a9f81",
"status": 0,
"message": "Message sent successfully"
}bash
curl -X POST "https://api.stackvid.dev/api/tiktok/chat/send" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"conversationId": "0:1:7242178829468435462:7248907244315444229",
"conversationShortId": "7692450584246747398",
"text": "Hello!"
}'