Call it
curl https://api.peume.com/v1/call/tiktok-search-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"region": "all"
}
}'const res = await fetch("https://api.peume.com/v1/call/tiktok-search-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"region": "all"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/tiktok-search-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"region": "all"
}
},
)
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-2.
Parameters
cursorstringOpaque cursor returned from the previous response. Repeat the same query or advertiser_name, adv_biz_ids when used, and any explicit start_time, end_time and region filters with every returned cursor. Pass the cursor unchanged; it does not replace the search inputs or filters.
start_timeintegerInclusive lower bound for the ad's last shown date; end_time is the inclusive upper bound. Supply start_time and end_time together as positive base-10 safe integers, no greater than 9007199254740991, in Unix seconds (preferred) or milliseconds. Values greater than 9999999999 are interpreted as milliseconds, divided by 1000 and rounded down to seconds. start_time must be less than or equal to end_time after normalization; equal bounds are accepted. If both are omitted, the last-shown date window defaults to the rolling 30 days ending at the time of each request. A missing companion, empty value
adv_biz_idsstringTikTok advertiser business ID from a See all ads link. Use it with advertiser_name to pin the exact advertiser. Required companion: advertiser_name; ID-only searches return 400 because TikTok ignores the ID without the name.
querystringGeneral ad search. Provide either query or advertiser_name, not both.
end_timeintegerInclusive upper bound for the ad's last shown date; start_time is the inclusive lower bound. Supply start_time and end_time together as positive base-10 safe integers, no greater than 9007199254740991, in Unix seconds (preferred) or milliseconds. Values greater than 9999999999 are interpreted as milliseconds, divided by 1000 and rounded down to seconds. start_time must be less than or equal to end_time after normalization; equal bounds are accepted. If both are omitted, the last-shown date window defaults to the rolling 30 days ending at the time of each request. A missing companion, empty val
advertiser_namestringAdvertiser name to resolve through TikTok's typeahead and search by advertiser entity. Falls back to TikTok's name search when no entity matches. Provide either advertiser_name or query, not both.
regionstringFilter by the ad's targeting/delivery country, not the advertiser's registration country. Omitted region defaults to all supported countries, not every country worldwide. Values are case-insensitive; choose all or one of the listed country codes. US is not supported. Empty values, unsupported countries and multiple countries return 400 bad_request.
all · AT · BE · BG · BR · CH · CY · CZ · DE · DK · EE · ES …
Example: all
