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.
Parameters
| Name | Required | Type | Description | Example | Allowed values |
|---|---|---|---|---|---|
keyword |
Required | string | The search keyword. | 咖啡 |
— |
sort_type |
Optional | string | Sorting criteria for search results. Available Values: - `_0`: General - `_1`: More likes - `_2`: Newest | _0 |
_0_1_2 |
publish_time |
Optional | string | Filter by video publish time range. Available Values: - `_0`: No Limit - `_1`: Last 24 Hours - `_7`: Last 7 Days - `_180`: Last 6 Months | _0 |
_0_1_7_180 |
duration |
Optional | string | Filter by video duration. Available Values: - `_0`: No Limit - `_1`: Under 1 Minute - `_2`: 1-5 Minutes - `_3`: Over 5 Minutes | _0 |
_0_1_2_3 |
page |
Optional | integer | Page number (starting from 1). | 1 |
— |
search_id |
Optional | string | Search 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);
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.
Example response
Captured 2026-11-07, took 3938 ms · Request parameters {"page": "1", "keyword": "咖啡", "duration": "_0", "sort_type": "_0", "publish_time": "_0"}
JSON
{
"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.