Call it
curl https://api.peume.com/v1/call/tiktok-videos-for-a-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 20,
"query": "cooking"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-videos-for-a-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 20,
"query": "cooking"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-videos-for-a-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 20,
"query": "cooking"
}
},
)
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: tiktok-videos-for-a-search.
Parameters
limitintegerat most 100; when the search finds fewer than half of it, a second source adds the rest in 15 to 40 s, or 2 to 5 minutes above 20; default 20
Example: 20
queryRequiredstringExample: cooking
Other ways to do it
Same job, other sources, cheapest first.
Search videos by keywordBest sourceSearch videos by keyword. Checks the cheapest source first and moves to the next one until it finds an answer.Search TikTok videos by keywordSearch TikTok videos by keywordTikTok Keyword SearchSearch TikTok by keyword and get matching videos (caption, views, likes, comments, shares) as normalized JSON.Search TikTok videos by keywordSearches for TikTok videos by keyword or phrase — the general video search across all of TikTok. date_posted and sort_by are forwarded upstream but are not reliably enforced; treatSearch TikTok posts by keywordSearch TikTok posts by keyword, with region, sort and publish-time filters
