How to use the OR condition in AWQL

2,197 views
Skip to first unread message

plucki

unread,
Jun 25, 2013, 1:30:45 PM6/25/13
to adwor...@googlegroups.com
Hi!

I am trying to use the AWQL language in order to get specific Adgroups which have this condition, Campaign Name  contains "ABC" or Campaign Name contains "DEF" but when I  try to do this on AWQL I cant use the condition "OR"

What im doing bad?

Thanks! 

Anash P. Oommen (AdWords API Team)

unread,
Jun 26, 2013, 3:34:18 AM6/26/13
to adwor...@googlegroups.com
Hi,

You could use the IN operator in this case.

Cheers,
Anash P. Oommen
AdWords API Advisor.

Rowan Springfield

unread,
Oct 21, 2014, 7:29:03 AM10/21/14
to adwor...@googlegroups.com
Hi, I actually need to use the OR operator, as I need to use 

(AdGroupName = 'Name' and KeywordText = 'Keyword') OR (AdGroupName = 'Name1' and KeywordText = 'Keyword1')

type structure. It seems that AWQL does not like brackets though. I need to use the brackets for the OR operator (if indeed you can user the OR operator)

Do you have any suggestions?

Thanks

Rowan

Anna Nguyen

unread,
Oct 21, 2014, 10:57:42 AM10/21/14
to adwor...@googlegroups.com
I suppose, worst comes to worst, you can always make two calls, each with one of the two conditions of the "OR"?
--
Anna

rodrig...@clickbus.com

unread,
Oct 27, 2015, 12:55:39 PM10/27/15
to AdWords API Forum
I have the same issue in here.

I am trying to run a Report, but Adwords logs the following error:

One of the conditions in the query is invalid.

      ' WHERE' +
          ' QueryMatchTypeWithVariant != "EXACT" AND' +
          ' (Clicks>5 OR ConvertedClicks>0)'+ 
          ' DURING LAST_WEEK'

I have tested it for the condition Clicks>5 and for ConvertedClicks>0 and it works fine, BUT it doesn't work for them together.

Any ideas of what might be happening? 

Anthony Madrigal

unread,
Oct 28, 2015, 2:08:36 PM10/28/15
to AdWords API Forum
HI,

Unfortunately, the OR operation is not supported in the AWQL syntax.

Please follow our blog regarding any updates to this feature.

Regards,
Anthony
AdWords API Team

Alonso Enrique

unread,
Mar 22, 2017, 2:32:12 PM3/22/17
to AdWords API Forum
OR condition supported currently?

Vishal Vinayak (Adwords API Team)

unread,
Mar 22, 2017, 4:13:47 PM3/22/17
to AdWords API Forum
Hi Alonso,

Unfortunately, OR condition is currently not supported. Formal grammar for AWQL can be found here. If possible, please open a new forum thread since that helps us track your queries better. 

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