How to Update Responsive Search Ad Headlines & Descriptions with the Google Ads API

102 views
Skip to first unread message

Tadhg Deeney

unread,
Nov 16, 2021, 9:02:04 AM11/16/21
to AdWords API and Google Ads API Forum
Hi team,

I'm learning the basics of how to use the Google Ads API for campaign management.
I'd like to update some of our RSAs to remove Promotional Headlines & Descriptions from the copy in the current ad and ideally replace it with the latest copy for the next promotion.

I'm struggling on 2 fronts:
1. How can I get the target ads from a GAQL query? I've looked at the Query Builder but I don't see how I can filter the ads for specific ones that contain "20% off" in the headlines. I've also seen the example in the documentation but it doesn't show how to filter for specific ads.
2. How can I update the copy of one or two headlines in the RSA? I've looked at the Update Expanded Text Ads documentation but I don't see how it translates to Responsive Search Ads.

Any assistance on this is welcomed.

Kindest Regards,
Tadhg Deeney

Google Ads API Forum Advisor

unread,
Nov 16, 2021, 12:51:34 PM11/16/21
to tadhg....@ding.com, adwor...@googlegroups.com

Hi Tadhg,

Thank you for reaching out to Google Ads/AdWords API support. You can get the headlines by using an ad_group_ad report.

There's no GAQL filter for what is in the headlines in RSA's as ad_group_ad.ad.responsive_search_ad.headlines isn't capable of being in a 'where' clause. You can do a post-report-pull filter to get only the ads you want to mutate.

This sounds like a nice feature request from product support for a report that you can filter on what is in the headlines, if they grant this feature in their reports, you can send us a screenshot.

Regarding mutating the ad headlines, in Java I was able to modify just these lines in UpdateExpandedTextAd.java and it created new headlines for an RSA:

adBuilder
        .getResponsiveSearchAdBuilder()
        .clearHeadlines()
        .addHeadlines(AdTextAsset.newBuilder().setText("new headline").setPinnedField(ServedAssetFieldTypeEnum.ServedAssetFieldType.HEADLINE_1).build())
        .addHeadlines(AdTextAsset.newBuilder().setText("newer headline").build())
        .addHeadlines(AdTextAsset.newBuilder().setText("even newer headline").build())
   ;

The log result is this:

operations {
  update {
    responsive_search_ad {
      headlines {
        pinned_field: HEADLINE_1
        text: "new headline"
      }
      headlines {
        text: "newer headline"
      }
      headlines {
        text: "even newer headline"
      }
    }
    resource_name: "customers/{CID}/ads/{ADID}"
    final_urls: "http://www.example.com/"
    final_mobile_urls: "http://www.example.com/mobile"
  }
  update_mask {
    paths: "resource_name"
    paths: "final_urls"
    paths: "final_mobile_urls"
    paths: "responsive_search_ad.headlines"
  }
}

You can extrapolate to the client library you prefer.

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Regards,
 

Google Logo
Aryeh Baker
Google Ads API Team
 


ref:_00D1U1174p._5004Q2R9Sn8:ref

Google Ads API Forum Advisor

unread,
Nov 16, 2021, 12:53:27 PM11/16/21
to tadhg....@ding.com, adwor...@googlegroups.com
Hi Tadhg,

Please sends us privately a screenshot of the UI filtering a report based on what is in the headlines of an RSA ad.
Reply all
Reply to author
Forward
0 new messages