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,
|
||||||