Call it
curl https://api.peume.com/v1/call/tiktok-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"objective": 1,
"like": 1,
"period": 180,
"page": 1,
"limit": 20,
"order_by": "for_you"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"objective": 1,
"like": 1,
"period": 180,
"page": 1,
"limit": 20,
"order_by": "for_you"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"objective": 1,
"like": 1,
"period": 180,
"page": 1,
"limit": 20,
"order_by": "for_you"
}
},
)
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-search.
Parameters
objectiveinteger广告目标类型/Ad objective (1:流量 2:应用安装 3:转化 4:视频浏览 5:触达 6:潜在客户 7:产品销售)
Example: 1
likeinteger表现排名/Performance rank (1:前1-20% 2:前21-40% 3:前41-60% 4:前61-80%)
Example: 1
periodintegerTime period in days. Allowed values 7 | 30 | 120 | 180 ( OpenAPI: e.g. 7, 30, 120, 180 days). Other integers fail Creative Center nested validation.
Example: 180
industrystringIndustry ID
keywordstringSearch keyword
pageintegerPage number
Example: 1
limitintegerItems per page. Default 20. Prefer limit ≤ 20 — live Creative Center validation has rejected values above 20 (30/50) even though some OpenAPI text says max 50.
Example: 20
order_bystringSort by (for_you, likes)
Example: for_you
country_codestringCountry code. May not always filter results the way agents expect (some codes, e.g. PH, have been observed appearing ignored).
Example: US
ad_formatinteger广告格式/Ad format (1:视频)
Example: 1
ad_languagestringAd language
Example: en
search_idstringSearch ID (optional)
Other ways to do it
Same job, other sources, cheapest first.
