AdsApp.InFeedAdBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for an in-feed video ad under construction.
Methods:
build()
Creates an in-feed video ad. Returns a
VideoAdOperation
that
can be used to get the new ad (or access any associated errors if creation
failed).
Return values:
withAdName(adName)
Sets the video ad name. This field is required.
Arguments:
Name | Type | Description |
adName |
String |
The video ad name. |
Return values:
withDescription1(description1)
Sets the first line of the new ad's description to the specified value.
This field is required.
Arguments:
Name | Type | Description |
description1 |
String |
The first line of the ad description. |
Return values:
withDescription2(description2)
Sets the second line of the new ad's description to the specified value.
This field is required.
Arguments:
Name | Type | Description |
description2 |
String |
The second line of the ad description. |
Return values:
withDestinationPage(destinationPage)
Sets the destination page. Setting the value as
"WATCH"
takes
users to a standard YouTube video watch page and
"CHANNEL"
takes users to your YouTube channel page to view the selected video.
Arguments:
Name | Type | Description |
destinationPage |
String |
The destination page. It can be either
"WATCH" or "CHANNEL" . |
Return values:
withHeadline(headline)
Sets the headline of the new ad to the specified value. This field is
required.
Arguments:
Name | Type | Description |
headline |
String |
The headline for the ad. |
Return values:
withThumbnail(thumbnail)
Sets the thumbnail that you want to appear with the ad. Acceptable values:
"DEFAULT", "THUMBNAIL1", "THUMBNAIL2", "THUMBNAIL3"
.
Arguments:
Name | Type | Description |
thumbnail |
String |
Selection of thumbnail that appears on the ad. It can be
"DEFAULT" , "THUMBNAIL1",
"THUMBNAIL2" or "THUMBNAIL3" . |
Return values:
withVideo(video)
Sets the YouTube video that this ad will be built on.
Arguments:
Return values:
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-25 UTC.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe InFeedAdBuilder facilitates the creation of in-feed video ads within Google Ads campaigns.\u003c/p\u003e\n"],["\u003cp\u003eRequired fields for ad creation include ad name, headline, and first and second description lines.\u003c/p\u003e\n"],["\u003cp\u003eAdvertisers can select a custom thumbnail or the default option for display.\u003c/p\u003e\n"],["\u003cp\u003eDestination page settings allow directing users to either the video's watch page or the channel page.\u003c/p\u003e\n"],["\u003cp\u003eThis builder leverages YouTube videos as the foundation for the in-feed video ads.\u003c/p\u003e\n"]]],[],null,["# AdsApp.InFeedAdBuilder\n\nBuilder for an in-feed video ad under construction.\n\n### Methods:\n\n| Member | Type | Description |\n|------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|\n| [build()](#build) | [AdsApp.VideoAdOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadoperation) | Creates an in-feed video ad. |\n| [withAdName(adName)](#withAdName_adName) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the video ad name. |\n| [withDescription1(description1)](#withDescription1_description1) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the first line of the new ad's description to the specified value. |\n| [withDescription2(description2)](#withDescription2_description2) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the second line of the new ad's description to the specified value. |\n| [withDestinationPage(destinationPage)](#withDestinationPage_destinationPage) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the destination page. |\n| [withHeadline(headline)](#withHeadline_headline) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the headline of the new ad to the specified value. |\n| [withThumbnail(thumbnail)](#withThumbnail_thumbnail) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the thumbnail that you want to appear with the ad. |\n| [withVideo(video)](#withVideo_video) | [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Sets the YouTube video that this ad will be built on. |\n\n`build()`\n---------\n\nCreates an in-feed video ad. Returns a `VideoAdOperation` that can be used to get the new ad (or access any associated errors if creation failed).\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------|------------------------------|\n| [AdsApp.VideoAdOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoadoperation) | The associated ad operation. |\n\n`withAdName(adName)`\n--------------------\n\nSets the video ad name. This field is required.\n\n### Arguments:\n\n| Name | Type | Description |\n|--------|----------|--------------------|\n| adName | `String` | The video ad name. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|----------------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified video ad name. |\n\n`withDescription1(description1)`\n--------------------------------\n\nSets the first line of the new ad's description to the specified value. This field is required.\n\n### Arguments:\n\n| Name | Type | Description |\n|--------------|----------|---------------------------------------|\n| description1 | `String` | The first line of the ad description. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|-------------------------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified first description line. |\n\n`withDescription2(description2)`\n--------------------------------\n\nSets the second line of the new ad's description to the specified value. This field is required.\n\n### Arguments:\n\n| Name | Type | Description |\n|--------------|----------|----------------------------------------|\n| description2 | `String` | The second line of the ad description. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|--------------------------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified second description line. |\n\n`withDestinationPage(destinationPage)`\n--------------------------------------\n\nSets the destination page. Setting the value as `\"WATCH\"` takes users to a standard YouTube video watch page and `\"CHANNEL\"` takes users to your YouTube channel page to view the selected video.\n\n### Arguments:\n\n| Name | Type | Description |\n|-----------------|----------|------------------------------------------------------------------|\n| destinationPage | `String` | The destination page. It can be either `\"WATCH\"` or `\"CHANNEL\"`. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|-------------------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified destination page. |\n\n`withHeadline(headline)`\n------------------------\n\nSets the headline of the new ad to the specified value. This field is required.\n\n### Arguments:\n\n| Name | Type | Description |\n|----------|----------|--------------------------|\n| headline | `String` | The headline for the ad. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|-----------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified headline. |\n\n`withThumbnail(thumbnail)`\n--------------------------\n\nSets the thumbnail that you want to appear with the ad. Acceptable values: `\"DEFAULT\", \"THUMBNAIL1\", \"THUMBNAIL2\", \"THUMBNAIL3\"`.\n\n### Arguments:\n\n| Name | Type | Description |\n|-----------|----------|-------------------------------------------------------------------------------------------------------------------------|\n| thumbnail | `String` | Selection of thumbnail that appears on the ad. It can be `\"DEFAULT\"`, `\"THUMBNAIL1\",` `\"THUMBNAIL2\"` or `\"THUMBNAIL3\"`. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|----------------------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified thumbnail selection. |\n\n`withVideo(video)`\n------------------\n\nSets the YouTube video that this ad will be built on.\n\n### Arguments:\n\n| Name | Type | Description |\n|-------|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| video | [AdsApp.Asset](/google-ads/scripts/docs/reference/adsapp/adsapp_asset) | The YouTube video that this ad will be built on. Use [Asset.getYouTubeVideoId()](/google-ads/scripts/docs/reference/adsapp/adsapp_asset#getYouTubeVideoId) to check if a video is YouTube video. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|--------------------------------------|\n| [AdsApp.InFeedAdBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_infeedadbuilder) | Ad builder with the specified video. |"]]