Call it
curl https://api.peume.com/v1/call/douyin-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 10,
"keyword": "your keyword"
}
}'const res = await fetch("https://api.peume.com/v1/call/douyin-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 10,
"keyword": "your keyword"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/douyin-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 10,
"keyword": "your keyword"
}
},
)
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-search.
Parameters
publish_timestringFilters video search results by publishing time window. Allowed values are `unlimited` (default), `one_day` (last 24 hours), `one_week` (last 7 days), and `half_year` (last 6 months). One of: half_year, one_day, one_week, unlimited.
half_year · one_day · one_week · unlimited
page_tokenstringPage token. To start paging, send an empty string `page_token=""`; then pass back the previous response's `next_page_token` exactly as received to get the next page, keeping `keyword`, `sort` and `publish_time` unchanged. Each page is one call and comes as a whole Douyin result page, not cut: a page usually holds about 10 videos, often a few more (fewer on the last page). Videos Douyin repeats from the previous page are left out. Tokens last 24 hours and only work for the same account and the same parameters; an expired or mismatched token returns 422, so start again from the first page. On th
limitintegerMaximum number of results, 1 to 50 (default 10). For some actions it counts pages or items per parent rather than final rows.
Example: 10
sortstringSorts video search results. Allowed values are `relevance` (default), `newest` for the latest publish date, and `most_liked` for highest likes. Supports legacy compatibility aliases `general` (mapped to `relevance`) and `latest` (mapped to `newest`). One of: most_liked, newest, relevance.
most_liked · newest · relevance
keywordRequiredstringSearch term for the video search action, passed as a string, for example `latte art`. It finds videos; it is not an account nickname or a video ID.
