Call it
curl https://api.peume.com/v1/call/list-ad-sets \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"page": 1,
"limit": 500,
"live": false,
"view": "full"
}
}'const res = await fetch("https://api.peume.com/v1/call/list-ad-sets", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"page": 1,
"limit": 500,
"live": false,
"view": "full"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/list-ad-sets",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"page": 1,
"limit": 500,
"live": False,
"view": "full"
}
},
)
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: list-ad-sets.
Parameters
accountIdstringAccount ID
adAccountIdstringPlatform ad account id (Meta act_<n>). Lists every synced ad set of that ad account; no campaignId needed.
campaignIdstringPlatform campaign ID
adSetIdstringPlatform ad set ID
platformstringfacebook · instagram · tiktok · linkedin · pinterest · google · twitter · openai · reddit · snapchat
statusstringFilter by the ad set's stored `status`, the value each row returns. A live read does not change it. Rows whose `status` is null match no filter.
pageintegerExample: 1
limitintegerExample: 500
livebooleanRead the on/off switches live from the platform instead of returning synced values. See "Status freshness" in the operation description. - The fresh values are stored (later reads return them too), and the response carries `statusReadAt`, the time of the read. - At most 20 platform objects are read per request. - Where a read fails (credentials, platform error, no reader on that platform), stored values come back with `statusReadAt: null`. **On GET /v1/ads/{adId} for a TikTok ad** the creative is read live too: ad text, call to action, landing page, video, format and identity, returned over
Example: false
viewstring`full` returns every field. `summary` leaves `targeting` out of each ad set, which is most of a row's size; read one ad set's targeting with `adSetId` and `view=full`.
full · summary
Example: full
