Douyin Video Search
Searches Douyin (TikTok China) videos by keyword with sort, publish-time, duration, and page filters; later pages require the previous search ID. Use it to support content discovery and trend research.
/v1/douyin/search_video_v4
$0.02
- Price
- $0.02 per successful call, Failed calls are free
- Endpoint ID
douyin.search_video_v4
Parameters
-
keywordstring RequiredThe search keyword.
Example
咖啡 -
sort_typestring OptionalSorting criteria for search results.
Available Values:
_0: General_1: More likes_2: Newest
Example
_0 -
publish_timestring OptionalFilter by video publish time range.
Available Values:
_0: No Limit_1: Last 24 Hours_7: Last 7 Days_180: Last 6 Months
Example
_0 -
durationstring OptionalFilter by video duration.
Available Values:
_0: No Limit_1: Under 1 Minute_2: 1-5 Minutes_3: Over 5 Minutes
Example
_0 -
pageinteger OptionalPage number (starting from 1).
Example
1 -
search_idstring OptionalSearch ID; required for pages > 1. Use data.business_config.next_page.search_id from the previous response, and stop paging when data.business_config.has_more is 0.
Code samples
curl -G "https://api.mofa-ai.com/v1/douyin/search_video_v4" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'sort_type=_0' \
--data-urlencode 'publish_time=_0' \
--data-urlencode 'duration=_0' \
--data-urlencode 'page=1'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/douyin/search_video_v4",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"sort_type": "_0",
"publish_time": "_0",
"duration": "_0",
"page": "1",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/douyin/search_video_v4");
url.search = new URLSearchParams({
keyword: "咖啡",
sort_type: "_0",
publish_time: "_0",
duration: "_0",
page: "1",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
Example response
Request parameters {"page": "1", "keyword": "咖啡", "duration": "_0", "sort_type": "_0", "publish_time": "_0"}
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "douyin.search_video_v4",
"cost_usd": 0.02,
"data": {
…
Truncated for display; the full response is longer.
Try it
Sign in to call this endpoint from this page. Successful calls are billed to your balance, failed calls are free, and new accounts get $0.50 of trial credit.
More Douyin endpoints
-
Hot Search
$0.04Searches Douyin (TikTok China) content with optional keyword, category, video-type, ranking, pagination, engagement, and creator-follower filters. Use it to…
/v1/douyin/hot_search_v1
-
User Published Videos
$0.02Retrieves videos published by a Douyin (TikTok China) user, with cursor pagination and newest or most-popular sorting. Use it to browse or monitor a creator'…
/v1/douyin/get_user_video_list_v1
-
User Search
$0.02Searches Douyin (TikTok China) users by keyword with page-based pagination and optional account-type filtering. Use it to discover creators, brands, or verif…
/v1/douyin/search_user_v2
-
Video Details
$0.02Retrieves details for a Douyin (TikTok China) video by video ID. Use it to look up a known video before content review, archiving, or related analysis.
/v1/douyin/get_video_detail_v2
-
Video Comments
$0.02Retrieves top-level comments for a Douyin (TikTok China) video by aweme ID with page-based pagination. Use it to review audience feedback or analyze discussi…
/v1/douyin/get_video_comment_v1
-
Comment Replies
$0.02Retrieves replies to a top-level Douyin (TikTok China) video comment with page-based pagination. Use it to inspect threaded discussions and review feedback u…
/v1/douyin/get_video_sub_comment_v1
-
User Profile
$0.02Retrieves a Douyin (TikTok China) user profile by secUid. Use it to review a known creator or account before monitoring related content or conducting account…
/v1/douyin/get_user_detail_v3
-
Share Link Resolution
$0.02Resolve a supported Douyin (TikTok China) short share link that targets a video and return its public redirect URL. Use it to expand video links before subse…
/v1/douyin/share_url_transfer_v1