Call it
curl https://api.peume.com/v1/call/douyin-comments \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 20,
"url": "your url"
}
}'const res = await fetch("https://api.peume.com/v1/call/douyin-comments", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 20,
"url": "your url"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/douyin-comments",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 20,
"url": "your url"
}
},
)
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-comments.
Parameters
page_tokenstringPage token for `user_posts` and `comments`. 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 every other parameter unchanged. 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 the last page the response has no `next_page_token` (`pagination.has_more` is false). Each `user_posts` page is one call and holds up to 20 rows, newest first, and is not filtered by `since` (filte
limitintegerMaximum number of results, 1 to 150 (default 20). For some actions it counts pages or items per parent rather than final rows.
Example: 20
urlRequiredstringFull URL of the target Douyin video, formatted as `https://www.douyin.com/video/<video_id>`. Fetches video details in `video`, comments in `comments`, the replies under one comment in `comment_replies` (the video the comment sits on), audio transcripts in `transcript`, the videos recommended next to it in `related_posts`, or its count history in `post_history`. Do not pass user profile or search page URLs.
