TikTok API
Search Challenges
Search TikTok for challenges (hashtag challenges) matching a keyword query.
POST
$0.01/call/v1/tiktok/search-challengeUsage
const res = await fetch('https://api.yepapi.com/v1/tiktok/search-challenge', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ keywords: 'dance' }),
});
const { data } = await res.json();
console.log(data);curl -X POST https://api.yepapi.com/v1/tiktok/search-challenge \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"keywords": "dance"}'Request Body
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
keywords | string | Yes | Search query for challenges | — |
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",
"challenges": [
{
"challenge_id": "1677534536829953",
"challenge_name": "dancechallenge",
"description": "Show us your best moves!",
"video_count": 48500000,
"view_count": 125000000000,
"cover": "https://p16-sign.tiktokcdn.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.challenges | object[] | Array of challenge results |
data.challenges[].challenge_id | string | Unique challenge identifier |
data.challenges[].challenge_name | string | Challenge hashtag name |
data.challenges[].description | string | Challenge description |
data.challenges[].video_count | number | Number of videos using this challenge |
data.challenges[].view_count | number | Total views across all challenge videos |
data.challenges[].cover | string | Challenge cover image URL |
Use the cursor value from the response to paginate through results.