TikTok API
Challenge Videos
Get videos associated with a TikTok challenge (hashtag challenge).
POST
$0.01/call/v1/tiktok/challenge-videosUsage
const res = await fetch('https://api.yepapi.com/v1/tiktok/challenge-videos', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ challenge_id: '1677534536829953' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/tiktok/challenge-videos \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"challenge_id": "1677534536829953"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
challenge_id | string | Yes | TikTok challenge ID | — |
cursor | string | No | Pagination cursor from previous response | — |
count | number | No | Number of results to return | 20 |
Response
{
"ok": true,
"data": {
"has_more": true,
"cursor": "20",
"videos": [
{
"video_id": "7356291048572839174",
"description": "My entry for #dancechallenge",
"create_time": 1712345678,
"author": {
"unique_id": "dancer_jane",
"nickname": "Jane Dance",
"avatar": "https://p16-sign.tiktokcdn.com/..."
},
"statistics": {
"play_count": 3200000,
"digg_count": 245000,
"comment_count": 5600,
"share_count": 18000
},
"video": {
"duration": 30,
"cover": "https://p16-sign.tiktokcdn.com/...",
"play_addr": "https://v16-webapp.tiktok.com/..."
}
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
ok | boolean | Whether the request succeeded |
data.has_more | boolean | Whether more results are available |
data.cursor | string | Cursor for fetching the next page |
data.videos | object[] | Array of challenge video objects |
data.videos[].video_id | string | Unique TikTok video identifier |
data.videos[].description | string | Video caption text |
data.videos[].create_time | number | Unix timestamp of when the video was posted |
data.videos[].author | object | Video author information |
data.videos[].statistics | object | Engagement metrics (plays, likes, comments, shares) |
data.videos[].video | object | Video media details (duration, cover image, play URL) |
Use the cursor value from the response to paginate through results.