Call it
curl https://api.peume.com/v1/call/youtube-community-post-comments-by-post-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"post_id": "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"language_code": "zh-CN",
"country_code": "US",
"need_format": true
}
}'const res = await fetch("https://api.peume.com/v1/call/youtube-community-post-comments-by-post-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"post_id": "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"language_code": "zh-CN",
"country_code": "US",
"need_format": true
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/youtube-community-post-comments-by-post-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"post_id": "UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy",
"language_code": "zh-CN",
"country_code": "US",
"need_format": True
}
},
)
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-community-post-comments-by-post-id.
Parameters
post_idstringPost ID (required for first request)
Example: UgkxiCSRfD6g7SPlWGPDa3vbP7aIsytXRkvy
continuation_tokenstringPagination token
language_codestringLanguage code
Example: zh-CN
country_codestringCountry code
Example: US
need_formatbooleanWhether to clean and format the data
Example: true
