Direct Commander

Query input language

The Direct Commander Query Language allows you to enter complex item selection criteria, apply various conditions to the field value, and combine them using boolean operators.

The search term is entered in the text filter line at the bottom of the Commander panel. A query using boolean operators begins with the = symbol.

Search term components

A simple search term consists of three parts:

= Field Operator Value

For example, the search term header ~ biscuits will return all ads that contain the word “biscuits” in the Header column.

Start entering your search term following the = symbol. At the same time, in the input line the icon will appear. Field names and operators can be selected from pop-up suggestions.

When entering a value, please note:

  • The input is not case sensitive.

  • If a value consists of several words separated by spaces, then put the entire expression in quotation marks to ensure correct handling of your request:

    = header = "high-heeled shoes"
  • When searching for a keyword which is put in quotation marks, use the \ character to ensure correct handling of the request with double quotation marks:

    = header = "\"high-heeled shoes\""
  • If you want to specify multiple values, use square brackets:

    = header = ["matches"; "toasts"]

    or

    = header = [matches toasts]

  • For fields which can input a fixed number of values (Moderation, Status, Priority, etc.), always use the ~ and !~ operators with square brackets, even when you enter a single value.

If the search term was not correctly formulated, then the icon in the text entry line will turn and an error message will appear.

Requests containing multiple conditions

You can use the operators & (boolean AND) and | (boolean OR) to form combined search terms.

Search term operations are executed strictly from left to right, but the order can be changed by using round brackets. Operations enclosed in brackets take priority over the standard order of operations.

Example 1

= Word ~ matches | Word ~ sugar

This search term will return keywords containing one of the keywords: “matches” or “sugar”.

Example 2

= Word ~ matches | Word ~ sugar & Bid > 1

This search term will return keywords that meet two conditions simultaneously:

  1. They contain either the word “matches” or the word “sugar”.
  2. The bid on search is greater than 1.

Example 3

= Word ~ matches | (Word ~ sugar & Bid > 1)

This search term will return keywords that meet at least one of the two conditions:

  1. They contain the word “matches”.
  2. They contain the word “sugar” and their bid on search is greater than 1.

Query language operators

Depending on the DCQL field, the following types of operators are accepted.

OperatorValueExampleResult
~Contains= geotargeting ~ austrReturns ad groups with either “Australia” or “Austria” entered in the Geotargeting column
= "Image name" ~ [black white]The request picks up ads where the Image name column contains “black” or “white”
= Moderation ~ [Accepted; Draft]The request picks up ads where the Moderation column contains “Accepted” or “Draft”
!~Doesn't contain= geotargeting !~ austrReturns all ad groups other than those with “Australia” or “Austria” entered for geotargeting
= header !~ [matches toasts]The request picks up ads where the Header column contains neither “matches” nor “toasts”
= Moderation !~ [Pending]The request picks up ads where the Moderation column contains any value except “Pending”.
=Equal/match= geotargeting = AustraliaOnly returns groups with “Australia” entered for geotargeting.
= Number = [111111 222222]The request picks up ads with numbers 111111 and 222222.
!=Not equal/don't match= geotargeting != AustraliaReturns all groups other than those with “Australia” entered for geotargeting
= Number != [111111 222222]The request picks up ads with all numbers except 111111 and 222222.
>More= ctr > 0.5Returns keywords with a CTR higher than 0.5
<Less= ctr < 0.5Returns keywords with a CTR less than 0.5
>=More than or equal to= Bid >= 1Returns keywords for which the bid for search is greater than or equal to 1
<=Less than or equal to= Bid <= 1Returns keywords for which the bid for search is less than or equal to 1
&Boolean “AND” in complex search terms= number ~ 123 & status = "campaign in progress"Returns ads that contain the digits 123 in the number AND who have the status “Campaign in progress”
|Boolean “OR” in complex search terms= name ~ matches | name ~ sugarReturns ads that contain either the word “matches” OR the word “sugar” in the name
Attention! 

You can only use the operators >, >=, < and <= for columns with numerical values.