LocationCriterionService return INVALID_PREDICATE_OPERATOR error

54 views
Skip to first unread message

Zied Chaari

unread,
Mar 8, 2019, 12:29:20 PM3/8/19
to AdWords API and Google Ads API Forum
Hi folks,

I'm trying to get locations using LocationCriterionService. When I change the predicate to "ContainsAny" or "Contains", I get INVALID_PREDICATE_OPERATOR error.

Is LocationCriterionService support only "In" predicate? 

Thanks;
Zied Chaari

googleadsapi...@google.com

unread,
Mar 8, 2019, 6:23:00 PM3/8/19
to AdWords API and Google Ads API Forum
Hello Zeid, 

The CONTAINS_* is only supported for Labels. Please check this thread for a discussion on the same topic. 

Thanks,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

Zied Chaari

unread,
Mar 11, 2019, 4:14:02 AM3/11/19
to AdWords API and Google Ads API Forum
Hi Bharani,

As I know their is now label in the location entity, so how can I filter by label using ContainAny?

The idea is to reproduce the dropdown location component bellow, when user start typing the location name, I give him location suggestion by calling LocationCriterionService.

Capture.PNG



Thanks,
Zied

googleadsapi...@google.com

unread,
Mar 11, 2019, 11:26:48 AM3/11/19
to AdWords API and Google Ads API Forum
Hello Zeid, 

For the LocationCriterionService, ONLY and IN operators are currently supported. I have raised a feature request to the team. Please keep an eye on our blog for more updates.

Thanks,
Bharani, AdWords API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Reply all
Reply to author
Forward
0 new messages