Call it
curl https://api.peume.com/v1/call/run-a-tiktok-marketing-api-report-on-one-advertiser \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"reportType": "BASIC",
"dataLevel": "AUCTION_ADVERTISER",
"dimensions": [],
"metrics": []
}
}'const res = await fetch("https://api.peume.com/v1/call/run-a-tiktok-marketing-api-report-on-one-advertiser", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"reportType": "BASIC",
"dataLevel": "AUCTION_ADVERTISER",
"dimensions": [],
"metrics": []
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/run-a-tiktok-marketing-api-report-on-one-advertiser",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"adAccountId": "your adAccountId",
"reportType": "BASIC",
"dataLevel": "AUCTION_ADVERTISER",
"dimensions": [],
"metrics": []
}
},
)
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: run-a-tiktok-marketing-api-report-on-one-advertiser.
Parameters
accountIdRequiredstringThe id of the connected account.
adAccountIdRequiredstringThe numeric TikTok advertiser id.
reportTypestringDefaults to BASIC.
BASIC · AUDIENCE
Example: BASIC
dataLevelRequiredstringThe level of each row.
AUCTION_ADVERTISER · AUCTION_CAMPAIGN · AUCTION_ADGROUP · AUCTION_AD
dimensionsRequiredarrayTikTok dimensions, 1 to 4.
metricsRequiredarrayTikTok metrics, up to 100.
filteringarrayTikTok filters of field, operator and value, up to 25. A filter on an entity finer than dataLevel is refused.
fromDateRequiredstringFirst day, YYYY-MM-DD, inclusive.
toDateRequiredstringLast day, YYYY-MM-DD, inclusive.
pageSizeintegerRows per page, up to 1,000. Defaults to 1,000.
Example: 1000
cursorstringThe pagination.nextCursor of the previous page, unchanged.
