Call it
curl https://api.peume.com/v1/call/search-youtube \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"query": "your query"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-youtube", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"query": "your query"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-youtube",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"query": "your query"
}
},
)
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: search-youtube.
Parameters
durationstringDuration of the video. Only applies to videos (not shorts).
under_3_min · between_3_and_20_min · over_20_min
uploadDatestringUpload date
today · this_week · this_month · this_year
queryRequiredstringSearch query. For stricter title matching, use YouTube's intitle: operator, for example intitle:"Foursquare Swarm". Quoted queries by themselves may still be broadened by YouTube when no fresh exact matches are available.
sortBystringSort by
relevance · popular
includeExtrasstringThis will get you the like + comment count and the description. To get the full details of the video, use the /youtube/video endpoint. *This will slow down the response slightly.*
typestringType of content to search for
videos · shorts · channels · playlists
regionstring2 letter country code of the country to put the proxy in.
continuationTokenstringContinuation token to get more videos. Get 'continuationToken' from previous response.
