CONTAINS_ANY Not working on Ad URL

38 views
Skip to first unread message

Anthony Denaud

unread,
Jan 24, 2017, 9:44:42 AM1/24/17
to AdWords API Forum
Hi,

I am writing a Java software matching URL from a feed to Ads Final URL.
The feed contains severals URL which does not match exactly to the Final URL on AdWords (The URLs on AdWords contains a trailing anchor), so for that reason that reason the IN operator could not help me.

I tried the CONTAINS_ANY operator but it doesn't seem to work in that case : I receive a UNEXPECTED_INTERNAL_API_ERROR.

        <soap:Fault>
           
<faultcode>soap:Server</faultcode>
           
<faultstring>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</faultstring>
           
<detail>
               
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201609">
                   
<message>[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro]</message>
                   
<ApplicationException.Type>ApiException</ApplicationException.Type>
                   
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
                       
<fieldPath/>
                       
<trigger/>
                       
<errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString>
                       
<ApiError.Type>InternalApiError</ApiError.Type>
                       
<reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
                   
</errors>
               
</ApiExceptionFault>
           
</detail>
       
</soap:Fault>

Here is my Java code for the selector :

Selector selector = builder.fields(AdGroupAdField.CreativeFinalUrls)
                   
.containsAny(AdGroupAdField.CreativeFinalUrls, urls)
                   
.notEquals(AdGroupAdField.Status, AdGroupAdStatus.DISABLED.getValue()).build();

Is this operator broken ? Why am I getting an internal api error and not a selector error ?

Thank you

Shwetha Vastrad (AdWords API Team)

unread,
Jan 24, 2017, 12:53:41 PM1/24/17
to AdWords API Forum
Hi Anthony,

The CONTAINS_* predicate operator is only available for Labels at the moment. You would have to use the IN operator. Please keep an eye on our blog for any updates on this feature. 

Regards,
Shwetha, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages