Call it
curl https://api.peume.com/v1/call/youtube-channel-videos-by-id-or-username-views-dates \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"channelId": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
"handle": "ThePatMcAfeeShow",
"sort": "latest",
"continuationToken": "4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB",
"is_paid_promotions": "false",
"includeExtras": "false"
}
}'const res = await fetch("https://api.peume.com/v1/call/youtube-channel-videos-by-id-or-username-views-dates", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"channelId": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
"handle": "ThePatMcAfeeShow",
"sort": "latest",
"continuationToken": "4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB",
"is_paid_promotions": "false",
"includeExtras": "false"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/youtube-channel-videos-by-id-or-username-views-dates",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"channelId": "UC-9-kyTW8ZkZNDHQJ6FgpwQ",
"handle": "ThePatMcAfeeShow",
"sort": "latest",
"continuationToken": "4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB",
"is_paid_promotions": "False",
"includeExtras": "False"
}
},
)
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-channel-videos-by-id-or-username-views-dates.
Parameters
channelIdstringYouTube channel ID
Example: UC-9-kyTW8ZkZNDHQJ6FgpwQ
handlestringYouTube channel handle
Example: ThePatMcAfeeShow
sortstringSort by latest or popular
Example: latest
continuationTokenstringContinuation token to get more videos. Get 'continuationToken' from previous response.
Example: 4qmFsgKrCBIYVUNkRkpXVWE0M3NtUm00SXBIQnB
is_paid_promotionsstringSet to 'true' to search YouTube's public paid product placement / sponsorship / endorsement search surface. This returns normal YouTube videos where the creator declared paid promotion. Cannot be combined with filter,...
Example: false
includeExtrasstringThis will get you the like + comment count and the description. To get the full details of the video, use the /v1/youtube/video endpoint. Honestly, if you use this param, the error rate is higher. We might deprecate t...
Example: false
Other ways to do it
Same job, other sources, cheapest first.
