List ads
Lists your ads with their performance over a date range, including ads created directly in each platform's ads manager.
Returns a paginated list of ads with metrics computed over an optional date range. Use source=all to include externally-synced ads from platform ad managers.
If no date range is provided, it defaults to the last 90 days. The date range is capped at 730 days max.
Authentication
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
Query parameters
Optional1Page number (1-based)
50allOne of zernio | allall (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
active | paused | pending_review | rejected | completed | cancelled | errorfacebook | instagram | tiktok | linkedin | pinterest | google | twitter | openai | reddit | microsoftAccount ID
Platform ad account ID (e.g. act_123 for Meta). Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
Meta only: Facebook Page ID. Returns only ads whose creative is backed by this Page (a Meta ad account serves ads for every Page in the Business Manager). Matches each ad's creative.pageId; ads with no page signal (rare IG-only creatives) never match. Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
Profile ID
Platform campaign ID (filter ads within a campaign)
Platform ad set ID (filter ads within an ad set, the /{adset_id}/ads read of an adset-centric dashboard).
Meta ad ID. Returns the ad with this platform-side ad ID.
Facebook {pageId}_{postId} of the post the ad's engagement lives on (Meta effective_object_story_id). Use to map a Business-Manager-visible post back to the Zernio ad.
Instagram media ID of the boosted post (Meta effective_instagram_media_id). Use to map a Business-Manager-visible IG post back to the Zernio ad.
Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
Responses
Success· the request worked
Errors· the request failed
How it behaves
History
When an ad account connects, Zernio imports its last 90 days of metrics, so the metrics hold no data for days before that.
When accountId or adAccountId resolves to a Meta ad account, a range reaching further back answers 202 with backfillPending: true and the covered part. The older days (up to 730 days back) are imported in the background; repeat the request until it returns 200.
A request scoped to no Meta account never returns 202.
Finding the ad behind a comment
To find the Zernio ad behind a comment you see in Meta Business Manager:
- Filter by platformAdId (the Meta ad ID), effectiveObjectStoryId (Facebook), or effectiveInstagramMediaId (Instagram). Those are the post/media the ad's engagement lives on, and are also returned on each ad's
creativeobject. - Call GET /v1/ads/{adId}/comments with the returned ad id.
Remove ad-group assets
Detaches assets from a Google ad group without deleting them, so they stay in the account and on anything else they are attached to. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility. Fields go in the query string. A JSON body with the same fields is also accepted and, when sent, the query string is ignored.
Get ad details
Shows one ad with its creative, targeting, status and performance metrics. ### Google Search ads Google Search ads include current creative.headlines, creative.descriptions and creative.finalUrls, preserving pinnedField. Top-level cachedAt and stale report cache freshness. Google mutations invalidate this read. RSA enrichment requires a stored advertisingChannelType of SEARCH. Ads with an unknown or other channel return their stored details without a Google read. If RSA enrichment fails, the stored ad is returned with HTTP 200 and without cache metadata. ### Accepted ad ids The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) - an Instagram media id an ad comment arrived on (`comment.platformPostId` of a `comment.received` carrying `comment.ad.id`), including the extra media Meta creates for placement variants Any of these resolve to the same ad, so the caller doesn't need a translation step. `creative.creativeFeatures` holds the stored requested settings, which do not confirm platform application. ### Facebook ad dark posts Meta gives an ad with per-placement assets one extra unpublished post per placement, and comments land on it. Meta exposes no link from that post to its ad. - When exactly one ad on the Page, created before the dark post, carries the same copy as the post, the dark post id resolves to that ad. - Otherwise, when the id is a dark post Zernio has seen comments on and its Page is connected, the response is `ad: null` plus `darkPost`. It carries the Meta Ads account and the ad accounts running ads for that Page. Read its comments with GET /v1/ads/{adId}/comments using the same id. ### Status freshness `status`, `configuredStatus`, `platformStatus`, `platformAdSetStatus` and `platformCampaignStatus` are the values Zernio last stored. Background sync refreshes them, typically within 15 to 60 minutes (Google up to about 3 hours), and ended or long-paused objects may be refreshed less often. Zernio's own status writes re-read the switches they change. A change made in the platform's own ads manager therefore shows up here only after the next sync. Controllers that act on a switch should pass `live=true`. It reads the switches from the platform now, stores them, and returns `statusReadAt` (null when the read failed and the stored values were returned). With `live=true` these are read live: - the ad's own switch (`configuredStatus`) - its delivery status (`status`, `platformStatus`) - its ad set and campaign switches (`platformAdSetStatus`, `platformCampaignStatus`) - on TikTok, the creative TikTok holds now: `creative.body` (ad text), `creative.callToAction`, `creative.linkUrl` (landing page), `creative.videoId`, `creative.adFormat`, `creative.identityId`, `creative.identityType`, `creative.identityAuthorizedBcId` and, on a Spark ad, `creative.tiktokItemId`. The TikTok creative comes from the same TikTok call as the switches. It replaces the stored values in the response only and is never stored. A key TikTok leaves empty keeps its stored value. ### Meta ads that are not synced yet Pass `accountId` with a Meta `platformAdId` to read an ad Zernio has not synced (for example one created in Ads Manager on an ad account reached only through a Facebook connection). The ad is read live from Meta and mapped exactly like a synced row: name, `status`, `platformStatus`, `configuredStatus`, `platformAdSetId`, `platformCampaignId`, campaign and ad set names, budgets, and `creative` with its `id`, body, link, image and video. It comes back with `synced: false`, no `id` (it has no Zernio row) and `statusReadAt` set to the time of the read. Synced ads answer `synced: true`. Only a numeric id takes this path, so dark post ids (`{pageId}_{postId}`) keep the dark post lookup above.