Call it
curl https://api.peume.com/v1/call/douyin-video-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"duration": "0",
"query": "your query",
"sort": "relevance",
"publishedWithin": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/douyin-video-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"duration": "0",
"query": "your query",
"sort": "relevance",
"publishedWithin": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/douyin-video-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"duration": "0",
"query": "your query",
"sort": "relevance",
"publishedWithin": 0
}
},
)
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: douyin-video-search.
Parameters
cursorstringPagination cursor: pass the previous response's nextCursor; omit for the first page. A raw integer cursor is still accepted. Pages can overlap: a page may repeat items an earlier page returned and is billed like any other, so de-duplicate by item id and stop when a page adds no new id.
durationstringDuration filter in minutes: any, under 1, 1 to 5, or over 5.
0 · 0-1 · 1-5 · 5-10000
Example: 0
routestringUpstream source to run on; omit for "tiger". tiger ($0.012 per call, 85% uptime). Route `tiger` returns 7 videos a page.
tiger
searchIdstringSearch ID returned by the previous page.
backtracestringBacktrace token returned by the previous page.
queryRequiredstringKeyword to search for.
sortstringSort order: relevance (Douyin's comprehensive ranking), most-liked, date-posted.
relevance · most-liked · date-posted
Example: relevance
publishedWithinintegerPublication window in days. Use the canonical JSON integer 0 for any time, 1 for one day, 7 for seven days, or 180 for 180 days; legacy numeric strings remain accepted.
0 · 1 · 7 · 180 · 0 · 1 · 7 · 180
Example: 0
