Render previews of an existing ad
Shows how an existing Meta ad looks in each placement, as embeddable previews.
Renders an EXISTING ad per placement via Meta's /{ad_id}/previews. Each preview is an HTML
<iframe> snippet embeddable directly. Unknown formats values return Meta's 400 verbatim.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Zernio ad id (24-char hex).
Query Parameters
Comma-separated Meta ad_format values (max 10), one preview per format. Defaults to DESKTOP_FEED_STANDARD.
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.adcreatives.getAdPreviews({ path: { adId: 'ad_abc123', },});console.log(data);{ "adId": "string", "previews": [ { "format": "string", "html": "string" } ]}Direct video and image URLs for an ad
Returns fresh, short-lived download links for every image and video a Meta ad uses, including the original media of a boosted Instagram post. Returns the direct signed URLs for every video and image asset used by an ad's live creative, normalised across shapes: single image/video, carousel, Reels/Story (`object_story_spec.video_data`) and dynamic creative (`asset_feed_spec`). Video items include Meta's poster thumbnail and the video's Meta id when available. Boosted Instagram posts (creatives with no image of their own) return the original post's media: the image, the video with its cover as `thumbnailUrl`, or every child of a carousel post with `index`. When the connection cannot read the Instagram post, the item is a 1080px rendering of the creative instead. Reads Meta live rather than the stored creative blob because Meta's signed fbcdn URLs carry an `oe=<hex>` expiration (image_url ~24 h, video source ~12 d). Treat URLs as short-lived: re-fetch this endpoint before serving or downloading assets instead of caching URLs beyond that window.
Get ad video processing status
Checks whether an uploaded Meta ad video has finished processing and is ready to use in an ad. Reads a video's processing state live from Meta (`GET /{video-id}?fields=status`). Poll this after `POST /v1/ads/videos` with `async: true` until `status` is `ready`; the video is only usable as `video.id` on the create endpoints from then on. `status` is normalised: `ready`, `error` (Meta's `error` or `expired`), and `processing` for every other Meta state. `platformStatus` carries Meta's raw `video_status` and `processingProgress` Meta's 0-100 percentage when it reports one. Polling every 5 to 10 seconds is plenty.