Ad Copy selector - Enabled status at Adgroup and Campaign levels as well?

28 views
Skip to first unread message

Sean Chua

unread,
Apr 3, 2017, 5:07:35 AM4/3/17
to AdWords API Forum
Currently my code has
.equals(AdGroupAdField.Status, "ENABLED")
         .equals(AdGroupField.Status, "ENABLED")
         .equals(CampaignField.Status, "ENABLED")

And
AdGroupAdPage page = adGroupAdService.get(selector);

Which returns me Ad Copy that is paused at the Adgroup level (so the code doesn't actually work).

Is there any way to only return ad copy that is enabled on all Campaign, Adgroup and Ad levels?

Ivan Bautista

unread,
Apr 3, 2017, 6:55:42 AM4/3/17
to AdWords API Forum
Hi Sean,

Are you trying to retrieve all enabled AdGroupAds? If so, then you may retrieve those enabled AdGroupAds on the Ad level via the AdGroupAdService.get() but not on the Campaign or AdGroup level. Looking at your predicate value for AdGroupAdField.Status, the AdGroupAdService.get() should have returned the expected values.

If we misunderstood your question, could you elaborate more on what you mean by getting the Ad copy on Ad Group level. Also, to help us investigate further, could you reply to us privately (using reply privately to author option) with the complete SOAP request and response of the service you are using?

Regards,
Ivan 
AdWords API Team

Sean Chua

unread,
Apr 5, 2017, 1:20:25 AM4/5/17
to AdWords API Forum
Yes, I am trying to retrieve all enabled AdGroupAds, but I am also trying to get status=="Enabled" at the Campaign and Adgroup level.

I'm calling the API through my Java app.

Thanks and Cheers,
Sean

Ivan Bautista

unread,
Apr 5, 2017, 2:19:17 AM4/5/17
to AdWords API Forum
Hi Sean,

As per documentation, you can only retrieve AdGroupAd's information such as the Status at the AdGroupAd level via the AdGroupAdService and not on the Campaign or AdGroup level. 

You may refer to this sample implementation to retrieve AdGroupAds with type EXPANDED_TEXT_AD for a particular AdGroup by specifying the AdGroupId. In essence, using the AdGroupAdService, you can retrieve enabled Ads in an AdGroup's perspective but for a particular AdGroupId. 
Reply all
Reply to author
Forward
0 new messages