Get Meta Ad Previews
meta_ads_get_ad_previewsGenerate preview links or embed HTML for a Meta ad across multiple placements like Facebook feed, Instagram, and Stories. See how your ad looks before or after publishing.
Instructions
Generate preview links or embed HTML for a Meta ad in various ad formats and placements.
Allows you to see how an ad looks across different placements (Facebook feed, Instagram, Stories, etc.) before or after publishing.
Args:
ad_id (string): Ad ID to preview, e.g., '23843211234567'
ad_format (string): Preview format. Options: DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD, MOBILE_FEED_BASIC, MOBILE_INTERSTITIAL, MOBILE_BANNER, MOBILE_MEDIUM_RECTANGLE, MOBILE_FULLWIDTH, RIGHT_COLUMN_STANDARD, INSTAGRAM_STANDARD, INSTAGRAM_STORY, AUDIENCE_NETWORK_OUTSTREAM_VIDEO, AUDIENCE_NETWORK_INSTREAM_VIDEO, FACEBOOK_STORY_MOBILE, MESSENGER_MOBILE_INBOX_MEDIA, SUGGESTED_VIDEO_MOBILE, WATCH_FEED_MOBILE, FACEBOOK_REELS_MOBILE, INSTAGRAM_REELS
locale (string): Locale for the preview, e.g., 'en_US'
start_date (string): Preview start date for scheduled ads (UNIX timestamp)
end_date (string): Preview end date for scheduled ads (UNIX timestamp)
Returns: Object with data array. Each item contains:
body (string): HTML iframe embed code for the preview
encoded_creative_id (string): Encoded creative ID
Examples:
Use when: "Show me how ad 23843211234567 looks on Instagram"
Use when: "Preview this ad in desktop feed format"
Use when: "Generate previews for all placements of this ad"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ad_id | Yes | Ad ID to preview, e.g., '23843211234567' | |
| ad_format | No | Preview format/placement. Options: DESKTOP_FEED_STANDARD, MOBILE_FEED_STANDARD, INSTAGRAM_STANDARD, INSTAGRAM_STORY, FACEBOOK_STORY_MOBILE, FACEBOOK_REELS_MOBILE, INSTAGRAM_REELS, RIGHT_COLUMN_STANDARD, MESSENGER_MOBILE_INBOX_MEDIA, etc. | |
| locale | No | Locale for the preview, e.g., 'en_US', 'vi_VN' | |
| start_date | No | Preview start date as UNIX timestamp (for scheduled ads) | |
| end_date | No | Preview end date as UNIX timestamp (for scheduled ads) |