Call it
curl https://api.peume.com/v1/call/tiktok-douyin-videos-related-to-a-topic-or-hot \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query_id": "2488260",
"billboard_type": 2,
"limit": 20,
"offset": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-douyin-videos-related-to-a-topic-or-hot", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query_id": "2488260",
"billboard_type": 2,
"limit": 20,
"offset": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-douyin-videos-related-to-a-topic-or-hot",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query_id": "2488260",
"billboard_type": 2,
"limit": 20,
"offset": 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: tiktok-douyin-videos-related-to-a-topic-or-hot.
Parameters
query_idRequiredstring查询ID/Query ID (话题ID/热点ID,从其他榜单接口获取)
Example: 2488260
billboard_typeinteger榜单类型/Billboard type (2=热点, 3=话题, 4=道具, 5=音乐)
Example: 2
limitintegerItems per page
Example: 20
offsetintegerOffset
Example: 0
Other ways to do it
Same job, other sources, cheapest first.
