TikTok Video API
Search videos, get video details, comments, replies, user search, and ad details
This module provides 6 TikTok data endpoints covering video search, video details, comments, replies, user search, and ad details.
Search Videos
Search for videos by keyword, with filtering by publish time, sort order, and region.
- Endpoint:
GET /tiktok/post/search
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
keyword | Query | string | Yes | Search keyword. |
count | Query | number | No | Number of videos per request. Default 10, max 35. |
cursor | Query | string | No | Pagination cursor from previous response. |
publish_time | Query | number | No | Filter by publish time: 0 all (default), 1 past 24h, 7 this week, 30 this month, 90 last 3 months, 180 last 6 months. |
sort_by | Query | number | No | Sort: 0 relevance (default), 1 likes, 2 publish time. |
region | Query | string | No | Region code, e.g. US, CN, JP. Omit for global results. |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/post/search?keyword=cat&count=10&publish_time=0&sort_by=0' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"videos": [
{
"id": "7460937381265411370",
"title": "Video title",
"region": "US",
"duration": 84,
"cover_url": "https://cdn.example.com/cover.jpg",
"play_url": "https://cdn.example.com/video.mp4",
"author": {
"id": "107955",
"username": "tiktok",
"nickname": "TikTok",
"avatar_url": "https://cdn.example.com/avatar.jpg"
},
"statistics": {
"likes": 15899443,
"comments": 377158,
"shares": 1315696,
"plays": 160897897
},
"create_time": 1737134867
}
],
"cursor": "1737134867000",
"has_more": true
}
}Get Video Details
Get detailed information for a video by its full URL, including title, cover, watermark-free play URL, statistics, and author info.
- Endpoint:
GET /tiktok/post/detail
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
url | Query | string | Yes | Full TikTok video URL (URL-encoded). e.g. https://www.tiktok.com/@tiktok/video/7460937381265411370 |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/post/detail?url=https%3A%2F%2Fwww.tiktok.com%2F%40tiktok%2Fvideo%2F7460937381265411370' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"id": "7460937381265411370",
"title": "Our response to the Supreme Court decision.",
"region": "US",
"duration": 84,
"cover_url": "https://cdn.example.com/cover.jpg",
"play_url": "https://cdn.example.com/video_nowatermark.mp4",
"hd_play_url": "https://cdn.example.com/video_hd.mp4",
"author": {
"id": "107955",
"username": "tiktok",
"nickname": "TikTok",
"avatar_url": "https://cdn.example.com/avatar.jpg"
},
"statistics": {
"likes": 15899443,
"comments": 377158,
"shares": 1315696,
"plays": 160897897,
"collects": 1100237
},
"music": {
"id": "7460937378165918510",
"title": "original sound - tiktok",
"author": "TikTok",
"play_url": "https://cdn.example.com/music.mp3",
"duration": 84
},
"create_time": 1737134867
}
}Get Video Comments
Get the comment list for a specific video, with pagination support.
- Endpoint:
GET /tiktok/post/comments
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
url | Query | string | Yes | Full TikTok video URL (URL-encoded). |
count | Query | number | No | Number of comments per request. Max 50. |
cursor | Query | string | No | Pagination cursor from previous response. |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/post/comments?url=https%3A%2F%2Fwww.tiktok.com%2F%40tiktok%2Fvideo%2F7460937381265411370&count=20' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"comments": [
{
"comment_id": "7460951322251920150",
"text": "Comment content",
"likes": 1234,
"reply_count": 56,
"create_time": 1737140000,
"user": {
"id": "123456789",
"username": "user123",
"nickname": "User Nickname",
"avatar_url": "https://cdn.example.com/avatar.jpg"
}
}
],
"cursor": "1737140000000",
"has_more": true
}
}Get Comment Replies
Get the reply list for a specific comment, with pagination support.
- Endpoint:
GET /tiktok/post/comment_replies
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
video_id | Query | string | Yes | Video ID (numeric). Obtainable from the video URL or detail endpoint. |
comment_id | Query | string | Yes | Comment ID from the comments endpoint response. |
count | Query | number | No | Number of replies per request. Max 50. |
cursor | Query | string | No | Pagination cursor from previous response. |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/post/comment_replies?video_id=7460937381265411370&comment_id=7460951322251920150&count=20' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"replies": [
{
"reply_id": "7460960000000000001",
"text": "Reply content",
"likes": 89,
"create_time": 1737145000,
"user": {
"id": "987654321",
"username": "replier",
"nickname": "Replier Nickname",
"avatar_url": "https://cdn.example.com/avatar2.jpg"
}
}
],
"cursor": "1737145000000",
"has_more": false
}
}Search Users
Search TikTok users by keyword, with pagination support.
- Endpoint:
GET /tiktok/user/search
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
keyword | Query | string | Yes | Search keyword (username or nickname). |
count | Query | number | No | Number of users per request. Default 10, max 30. |
cursor | Query | string | No | Pagination cursor from previous response. |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/user/search?keyword=tiktok&count=10' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"users": [
{
"id": "107955",
"username": "tiktok",
"nickname": "TikTok",
"avatar_url": "https://cdn.example.com/avatar.jpg",
"signature": "One TikTok can make a big impact",
"region": "US",
"verified": true,
"statistics": {
"followers": 91751744,
"following": 3,
"likes": 450108540,
"videos": 1362
}
}
],
"cursor": "10",
"has_more": true
}
}Get Ad Details
Get detailed information for a TikTok ad from the Creative Center, including video content, targeting regions, industry classification, and engagement data.
- Endpoint:
GET /tiktok/ads/detail
Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
url | Query | string | Yes | TikTok Creative Center ad URL (URL-encoded). e.g. https://ads.tiktok.com/business/creativecenter/topads/7221117041168252930/ |
Request Example
curl --request GET \
--url 'https://api.apimux.io/v1/tiktok/ads/detail?url=https%3A%2F%2Fads.tiktok.com%2Fbusiness%2Fcreativecenter%2Ftopads%2F7221117041168252930%2F' \
--header 'Authorization: Bearer YOUR_API_KEY'Response Example
{
"code": 200,
"message": "success",
"data": {
"id": "7221117041168252930",
"brand_name": "Universidad de las Hesp\u00e9rides",
"title": "Ad copy title",
"landing_page": "https://example.com/landing",
"country_code": ["ES"],
"industry_key": "label_10102000000",
"objective_key": "campaign_objective_reach",
"duration": 15.039,
"statistics": {
"likes": 1297,
"comments": 2,
"shares": 3,
"ctr": 0.39,
"cost": 2
},
"video": {
"vid": "v10033g50000cgr8v3rc77uc24rq9kkg",
"cover_url": "https://cdn.example.com/ad_cover.jpg",
"play_url": "https://cdn.example.com/ad_video.mp4",
"width": 576,
"height": 1024,
"duration": 15.039
}
}
}
APIMUX Docs