Call it
curl https://api.peume.com/v1/call/tiktok-search-douyin-videos-by-keyword \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "your keyword",
"sortType": "_0",
"publishTime": "_0",
"duration": "_0",
"page": 1
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-search-douyin-videos-by-keyword", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "your keyword",
"sortType": "_0",
"publishTime": "_0",
"duration": "_0",
"page": 1
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-search-douyin-videos-by-keyword",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "your keyword",
"sortType": "_0",
"publishTime": "_0",
"duration": "_0",
"page": 1
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: tiktok-search-douyin-videos-by-keyword.
Parameters
keywordRequiredstringThe search keyword.
sortTypestringSorting criteria for search results. Available Values: - `_0`: General - `_1`: More likes - `_2`: Newest One of: _0, _1, _2.
_0 · _1 · _2
Example: _0
publishTimestringFilter by video publish time range. Available Values: - `_0`: No Limit - `_1`: Last 24 Hours - `_7`: Last 7 Days - `_180`: Last 6 Months One of: _0, _1, _7, _180.
_0 · _1 · _7 · _180
Example: _0
durationstringFilter by video duration. Available Values: - `_0`: No Limit - `_1`: Under 1 Minute - `_2`: 1-5 Minutes - `_3`: Over 5 Minutes One of: _0, _1, _2, _3.
_0 · _1 · _2 · _3
Example: _0
pageintegerPage number (starting from 1).
Example: 1
searchIdstringSearch 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.
Other ways to do it
Same job, other sources, cheapest first.
