Direct video and image URLs for an ad
Changed onReturns fresh, short-lived download links for every image and video a Meta ad uses, including the original media of a boosted Instagram post.
The direct signed URLs cover every video and image asset used by the ad's live creative, normalised across shapes:
- single image/video
- carousel
- Reels/Story (object_story_spec.video_data)
- 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.
URL lifetime
This endpoint 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.
Meta ads that are not synced yet. Pass accountId with a Meta platform ad id that is not in Zernio's store to read its media live through that connection; the response carries synced: false.
Request
- Base URLhttps://zernio.com/api
- URLhttps://zernio.com/api/v1/ads/{adId}/media
- AuthHTTP bearer
Path parameters
Zernio ad id (24-char hex) or platform ad id.
Query parameters
Meta only. A Zernio connection id (Meta Ads or Facebook connection) used when {adId} is a Meta ad not in Zernio's synced store, e.g. an Ads Manager ad on an ad account reached only through a Facebook connection.
The ad is then read live from Meta through that connection, and the response carries synced: false. Ads Meta reports as DELETED are returned too, with their status.
Same rules as GET /v1/ads/campaigns/{campaignId}:
- Connection on a profile the API key cannot access: 404.
- Ad on an ad account outside the connection's selected ad accounts: 403 ad_account_not_selected.
- Id Meta cannot read through the connection, or not an ad (e.g. a campaign or ad set id): 404 ad_not_found.
- Connection that is not Meta: 501.
Ignored when the ad is in the store (its own connection is used). Without it, an unsynced ad answers 404 ad_not_found. Writes (PUT, DELETE, status) still need the ad in the store.
Response
Media assets
Changes
- info
added the new optional
queryrequest parameteraccountId - info
added the optional property
to the response with the status
- info
- info
added the non-success response with the status
- info
added the non-success response with the status
- info