How to filter out removed Ads when querying AdGroup?

2 views
Skip to first unread message

Juan Pablo Gardella

unread,
Apr 22, 2019, 2:12:02 AM4/22/19
to AdWords API and Google Ads API Forum
Hello all,

I'm facing an issue when using Adwords API. I have an AdGroup with removed Ads that are easily to detect using web UI as shown below:


But if I want to retrieve all Ads from the AdGroup using java api ignoring the removed Ads, the API does not offer (AFAIK) a way to discard them. For example by querying using the API it returns 24 results instead of expected Ads enabled.



       
<getResponse xmlns="https://adwords.google.com/api/adwords/cm/v201809">
           
<rval>
               
<totalNumEntries>24</totalNumEntries>
               
<Page.Type>AdGroupAdPage</Page.Type>
               
<entries>
                   
<adGroupId>34810610889</adGroupId>
                   
<ad xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TextAd">
                       
<id>11684113....</id>
                       
<displayUrl>.....</displayUrl>
                       
<finalUrls>.....</finalUrls>
                       
<type>TEXT_AD</type>
                       
<Ad.Type>TextAd</Ad.Type>
                       
<headline>xxxxx</headline>
                       
<description1>xxxxxxxxxxxx</description1>
                       
<description2>xxxxxxxx</description2>
                   
</ad>
                   
<status>ENABLED</status>
                   
<baseCampaignId>64646...</baseCampaignId>
               
</entries>


Do you know how I can filter out removed Ads using the latest API?

Thanks in advance,
Juan


Reply all
Reply to author
Forward
0 new messages