Call it
curl https://api.peume.com/v1/call/tiktok-top-ads-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"adLanguage": "en",
"limit": 20,
"objective": "traffic",
"orderBy": "for_you",
"page": 1,
"performanceRank": "top_1_20"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-top-ads-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"adLanguage": "en",
"limit": 20,
"objective": "traffic",
"orderBy": "for_you",
"page": 1,
"performanceRank": "top_1_20"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-top-ads-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"adLanguage": "en",
"limit": 20,
"objective": "traffic",
"orderBy": "for_you",
"page": 1,
"performanceRank": "top_1_20"
}
},
)
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-top-ads-search.
Parameters
fieldsstringComma-separated keys (dotted paths descend) to keep on each result item. Trims the response, not the charge.
max_itemsintegerCaps the result rows returned; `_truncated` says how many were withheld. Not the charge.
summaryboolean`true` returns only an outline: keys, item counts, per-field sizes.
jqstringjq expression over the result envelope; its output replaces `output`. A failed expression returns the full result with `jqError`.
adLanguagestringLanguage code for returned ads (default en).
en · es · ar · vi · th · de · id · pt · fr · ms · nl · ja …
Example: en
limitintegerMaximum number of ads requested for this page, from 1 through 20 (default 20).
Example: 20
objectivestringCampaign objective filter (default traffic).
traffic · app_installs · conversions · video_views · reach · lead_generation · product_sales
Example: traffic
orderBystringResult ordering: Creative Center recommendations or like count (default for_you).
for_you · likes
Example: for_you
pageintegerOne-based provider page number (default 1).
Example: 1
performanceRankstringAd performance percentile bucket, where top_1_20 is the highest-performing 20 percent (default top_1_20).
top_1_20 · top_21_40 · top_41_60 · top_61_80
Example: top_1_20
periodintegerLookback period in days (default 180).
7 · 30 · 180
Example: 180
queryRequiredstringKeyword to search in TikTok Creative Center top video ads.
Example: glasses
regionstringCountry code used to select the Creative Center market (default US).
Example: US
