AdsApp.AdTypeSpace
Stay organized with collections
Save and categorize content based on your preferences.
Starting point for determining the type of an ad.
For types that are not fully supported, use Ad.getType instead.
Typical usage:
if (ad.isType().responsiveSearchAd()) {
var responsiveSearchAd = ad.asType().responsiveSearchAd();
var headlines = responsiveSearchAd.getHeadlines();
}
Methods:
imageAd()
Returns whether the ad is an
ImageAd.
Return values:
| Type | Description |
boolean |
Whether the ad is an ImageAd. |
responsiveDisplayAd()
Returns whether the ad is a
ResponsiveDisplayAd.
Return values:
responsiveSearchAd()
Returns whether the ad is a
ResponsiveSearchAd.
Return values:
[null,null,["Last updated 2026-12-02 UTC."],[],[]]