Call it
curl https://api.peume.com/v1/call/douyin-fetch-video-search-v5 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"offset": 0,
"backtrace": "",
"page": 1,
"keyword": "猫咪",
"search_id": ""
}
}'const res = await fetch("https://api.peume.com/v1/call/douyin-fetch-video-search-v5", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"offset": 0,
"backtrace": "",
"page": 1,
"keyword": "猫咪",
"search_id": ""
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/douyin-fetch-video-search-v5",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"offset": 0,
"backtrace": "",
"page": 1,
"keyword": "猫咪",
"search_id": ""
}
},
)
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-fetch-video-search-v5.
Parameters
offsetinteger翻页游标,从上一次响应的 data.pagination.offset 获取,首次请求传 0 / Offset cursor for pagination, obtained from data.pagination.offset of the last response, 0 for the first request
Example: 0
backtracestring翻页回溯标识,从上一次响应的 data.pagination.backtrace 获取,首次请求传空字符串 / Backtrace, obtained from data.pagination.backtrace of the last response, empty for the first request
Example:
pageinteger页码,取值 1~200,首次请求传 1,之后每次加 1 / Page number, 1-200, start with 1 and increment by 1 each time
Example: 1
keywordstring搜索关键词 / Search keyword
Example: 猫咪
search_idstring搜索ID,从上一次响应的 data.pagination.search_id 获取,首次请求传空字符串 / Search ID, obtained from data.pagination.search_id of the last response, empty for the first request
Example:
