Call it
curl https://api.peume.com/v1/call/youtube-comments-2 \
-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/youtube-comments-2", {
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/youtube-comments-2",
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: youtube-comments-2.
Parameters
page_tokenstringPage token. To paginate, pass an empty string (`page_token=""`) for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. Each page holds at least `limit` top-level comments (default 20, when that many remain) with their replies, as whole pages, so often more. `since` can't be combined with `page_token`. Each page counts as one call. Tokens last 24 hours, and the last page has no `next_page_token`. A request without `page_token` works as before, returning at most 100 comments; it sometimes includes a `next_page_token`
limitintegerMaximum number of results, 1 to 100 (default 20). For some actions it counts pages or items per parent rather than final rows.
Example: 20
sortstringThe sort order applied across YouTube actions. For search, accepted values are relevance, newest, most_viewed, and top_rated. For channel videos and Shorts, accepted values are newest, oldest, and popular. For comments, accepted values are newest and popular. Specifying this parameter on a single-video query does not filter that video's content. One of: newest, popular.
newest · popular
urlRequiredstringThe target URL required by YouTube actions. Use full channel URLs for profile and user_posts, or specific watch?v= and share links for video, comments, and transcript. Channel metadata is derived from published content, and comments does not return channel community board posts.
sincestringThe lower date bound for filtering channel videos, Shorts, or comments. It applies to those lists only.
