Appearance
Get campaign tree
Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Metrics are computed over an optional date range, then rolled up from ad level to ad set and campaign levels. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic "Ungrouped" buckets. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
GET /v1/ads/tree
Returns a nested Campaign > Ad Set > Ad hierarchy with rolled-up metrics at each level. Uses a two-stage aggregation: ads are grouped into ad sets, then ad sets into campaigns. Metrics are computed over an optional date range, then rolled up from ad level to ad set and campaign levels. Pagination is at the campaign level. Ads without a campaign or ad set ID are grouped into synthetic "Ungrouped" buckets. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max.
Parameters
None(query, any)limit(query, integer) — Campaigns per pagesource(query, string) —all(default) returns both Zernio-created ads and those discovered from the platform's ad manager — matches the web UI's default view. Passzernioto restrict to isExternal=false only. Status is NOT filtered by default — use thestatusparam fo...platform(query, string)status(query, any) — Filter by derived campaign status (post-aggregation)adAccountId(query, string) — Platform ad account IDaccountId(query, string) — Social account IDprofileId(query, string) — Profile IDfromDate(query, string) — Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.toDate(query, string) — End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
Responses
200 — Nested campaign tree with pagination
campaigns(array)pagination($ref)
401
403 — Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.