Call it
curl https://api.peume.com/v1/call/search-tiktok-videos-by-keyword-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "coffee",
"count": 5,
"offset": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/search-tiktok-videos-by-keyword-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "coffee",
"count": 5,
"offset": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-tiktok-videos-by-keyword-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "coffee",
"count": 5,
"offset": 0
}
},
)
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-tiktok-videos-by-keyword-2.
Parameters
keywordRequiredstringExample: coffee
countintegeritems per page (default 20)
Example: 5
offsetintegerExample: 0
sort_typeinteger0 relevance (default), 1 most liked, 2 newest
publish_timeinteger0 all time (default); other values narrow the publish window
regionstringregion code; default US
Other ways to do it
Same job, other sources, cheapest first.
TikTok videos for a searchSearch TikTok videos by keyword and get text, hashtags, author, plays, likes, comments, shares and length, in TikTok's order.Search videos by keywordBest sourceSearch videos by keyword. Checks the cheapest source first and moves to the next one until it finds an answer.TikTok 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
