Call it
curl https://api.peume.com/v1/call/search-tiktok-posts-by-keyword \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"keyword": "coffee",
"offset": 0,
"region": "US"
}
}'const res = await fetch("https://api.peume.com/v1/call/search-tiktok-posts-by-keyword", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"keyword": "coffee",
"offset": 0,
"region": "US"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-tiktok-posts-by-keyword",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"keyword": "coffee",
"offset": 0,
"region": "US"
}
},
)
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-posts-by-keyword.
Parameters
keywordRequiredstringExample: coffee
offsetintegerstarts at 0, steps by 20
Example: 0
sortTypestringRELEVANCE (default) | MOST_LIKED
publishTimestringALL (default) | ONE_DAY | ONE_WEEK | ONE_MONTH | THREE_MONTH | SIX_MONTH
regionstringISO 3166-1 alpha-2, default US
Example: 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.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; treat
