AdsApp.VideoAgeBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
VideoAge objects.
Example usage:
var videoAgeBuilder = videoAdGroup.videoTargeting().newAgeBuilder();
var videoAgeOperation = videoAgeBuilder
.withAgeRange('AGE_RANGE_25_34') // required
.build(); // create the age
Methods:
build()
Builds the video age. Returns a
VideoAgeOperation that corresponds to the creation of the
VideoAge.
Return values:
exclude()
Builds the excluded video age. Returns an
ExcludedVideoAgeOperation that corresponds to the creation of the
ExcludedVideoAge.
Return values:
withAgeRange(ageRange)
Sets the age range. Age range can be the following values:
AGE_RANGE_18_24, AGE_RANGE_25_34, AGE_RANGE_35_44,
AGE_RANGE_45_54, AGE_RANGE_55_64, AGE_RANGE_65_UP,
AGE_RANGE_UNDETERMINED
More details can be found on our Age
Ranges page.
Arguments:
Name | Type | Description |
ageRange |
String |
The age range. |
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\u003eThis page documents the \u003ccode\u003eVideoAgeBuilder\u003c/code\u003e used for creating and managing video age targeting in Google Ads scripts.\u003c/p\u003e\n"],["\u003cp\u003eThe builder provides methods like \u003ccode\u003ebuild()\u003c/code\u003e and \u003ccode\u003eexclude()\u003c/code\u003e to create or exclude specific age ranges for targeting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ewithAgeRange()\u003c/code\u003e allows you to define the age range, such as 'AGE_RANGE_25_34', for your video targeting.\u003c/p\u003e\n"],["\u003cp\u003eYou can find detailed information about available age ranges on the official 'Age Ranges' documentation page.\u003c/p\u003e\n"]]],[],null,["# AdsApp.VideoAgeBuilder\n\nBuilder for [VideoAge](/google-ads/scripts/docs/reference/adsapp/adsapp_videoage) objects.\n\nExample usage:\n\n```gdscript\nvar videoAgeBuilder = videoAdGroup.videoTargeting().newAgeBuilder();\nvar videoAgeOperation = videoAgeBuilder\n .withAgeRange('AGE_RANGE_25_34') // required\n .build(); // create the age\n```\n\n### Methods:\n\n| Member | Type | Description |\n|--------------------------------------------------|----------------------------------------------------------------------------------------------------------------|--------------------------------|\n| [build()](#build) | [AdsApp.VideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoageoperation) | Builds the video age. |\n| [exclude()](#exclude) | [AdsApp.ExcludedVideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoageoperation) | Builds the excluded video age. |\n| [withAgeRange(ageRange)](#withAgeRange_ageRange) | [AdsApp.VideoAgeBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoagebuilder) | Sets the age range. |\n\n`build()`\n---------\n\nBuilds the video age. Returns a [VideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoageoperation) that corresponds to the creation of the [VideoAge](/google-ads/scripts/docs/reference/adsapp/adsapp_videoage).\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------|------------------------|\n| [AdsApp.VideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_videoageoperation) | The VideoAgeOperation. |\n\n`exclude()`\n-----------\n\nBuilds the excluded video age. Returns an [ExcludedVideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoageoperation) that corresponds to the creation of the [ExcludedVideoAge](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoage).\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|--------------------------------|\n| [AdsApp.ExcludedVideoAgeOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_excludedvideoageoperation) | The ExcludedVideoAgeOperation. |\n\n`withAgeRange(ageRange)`\n------------------------\n\nSets the age range. Age range can be the following values:\n\n`AGE_RANGE_18_24, AGE_RANGE_25_34, AGE_RANGE_35_44,\nAGE_RANGE_45_54, AGE_RANGE_55_64, AGE_RANGE_65_UP,\nAGE_RANGE_UNDETERMINED` More details can be found on our [Age\nRanges](/google-ads/api/reference/data/codes-formats#age-ranges) page.\n\n### Arguments:\n\n| Name | Type | Description |\n|----------|----------|----------------|\n| ageRange | `String` | The age range. |\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------|-------------------------------------------------|\n| [AdsApp.VideoAgeBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_videoagebuilder) | A VideoAgeBuilder with the specified age range. |"]]