Through our Advanced Alerts, the Boolean Query enables you to enhance the quality of your results and to monitor more precisely the topics that matter to you.
Advanced Alerts give you the option to associate your keywords the way you want to create the perfect query and reduce potential noise.
3 elements are necessary to build an Advanced Alert query:
Keywords related to your topic.
Parentheses, to differentiate your logical groups.
Boolean Operators, to associate them in the right way.
Keywords & "Quotations"
A keyword can contain letters, digits or underscores. The first character can also be # or @, if you want to search for hashtags or handles. Keywords are not case-sensitive.
➡️If your keyword is made of one plain word, you can write it directly into the query.
➡️If your keyword is a phrase or has a special character, please enclose it in quotations. Your query will return in an error message if you do not properly enclose these search terms.
Here are some example of searches using one term or phrases. Remember, you have the option of adding accent marks and other special characters!
Single Term -> Goodbye
Phrase -> “I’m a phrase”
Special Characters -> “hè||°”
❗Mentions are fetched even if the spaces are longer. For instance, the second example will return mentions containing “I’m a phrase”, but also “I’m a phrase”.
❗When you include a URL as a phrase, your alert will search for mentions that include the URL as a backlink:
"nasa.gov"
👉 Learn more about Mention's keyword search rules.
(Parentheses)
In order to create an organized and clear alert search, you will have to use parentheses to separate groups of keywords. The use of parenthesis will help the Mention system understand your search needs and combinations of keywords.
Multiple searches:
Here is an example of parenthesis creating multiple searches:
(oasis OR NASA) AND rover
This search signifies to Mention that you want to fetch content that includes:
Oasis AND rover
NASA AND rover
Mention will work to fetch both separately.
Enclosing a search:
You can utilize parenthesis to apply operators to your entire search or parts of your search as well. Take this example below with the language operator:
((oasis OR NASA) AND rover)
AND lang: ES
In this example, the main keyword search of Oasis, NASA, and Rover is enclosed with a second set of parenthesis. Outside of that, there is a a language filter operator. This configuration tells the Mention system that you want Mentions for:
Oasis AND rover in Spanish
NASA AND rover in spanish
Enclosing Operators:
Finally, parenthesis will be helpful when using specific operators as well. Here is an example with the country operator:
NASA AND source_country: (US OR FR)
This operator states that your search should bring in Mentions for NASA from sources in the United States or in France.
Boolean Operators
Boolean operators act as tools to provide your keyword configurations with specific filters to fetch accurate results. The full list of boolean operators is listed below:
★ AND
The AND operator will fetch mentions that contain all of the keywords linked together.
The AND operator will also be utilized in conjunction with non-autonomous operators such as the country, language, and source operators to name a few.
Here are some examples:
NASA AND space -> Mentions from the web need to include both terms
NASA AND space AND moon -> All terms need to appear in a mention
NASA AND lang:EN -> NASA is required and the mention must be in English
★ OR
The OR operator will keep your search terms separated in your query. It is useful in separating keywords or full searches.
Here are some examples:
NASA OR "n.a.s.a" OR "Nasa.gov"
->Only one of these needs to appear for Mention to fetch it
(NASA AND Space) OR (Moon AND Astronaut)
-> Due to the parenthesis and OR operator, there are 2 searches happening here
❗️Be careful with using AND and OR in the same group. If the parenthesis are not placed correctly, you will run into an error:
NASA AND Space OR Moon ❌
(NASA AND Space) OR Moon ✅
★ AND NOT
The AND NOT operator will exclude keywords, phrases, or other operators from the search completely.
❗️ Please be careful when using this operator as it will limit data! If a search term in your AND NOT list appears in the web posting, then Mention will not fetch it.
Examples below of the operator in your search:
NASA AND NOT SpaceX
(NASA AND moon)AND NOT SpaceX
★ Proximity: ~#
This operator works with search phrases and will apply a proximity limitation to your phrase.
Your proximity can range from 1 to 6. Mention will fetch your search phrases when they appear between 1 to 6 words of each other. Example:
"NASA rover"~6
This will fetch mentions when the posting states combinations of :
NASA rover
NASA and it's rover
NASA just launched a new rover
❗️This Operator doesn't work with Twitter Historical Data.
★ NEAR/#
The NEAR operator is similar to the proximity operator except it works for keywords and phrases. To use the NEAR operator, you must place it between your keywords or phrases.
You can replace # by numbers between 1 to 6 and Mention will search for content that fits your desired search configuration. See below for examples:
"Graphic Design" NEAR/6 "New York"
"Social Media" NEAR/4 "Chicago"
❗️This Operator doesn't work with Historical Data.
★ URL:
The operator matches mentions that contain the given string in the mention's URL bar. Please make sure you are aware of these specifications:
The URL is non-autonomous and must be paired with AND or AND NOT
The URL must be enclosed in quotations as well
See an example below:
Moon AND url:”nasa.gov”
This example will match mentions from :
- nasa.gov
- nasa.gov/space
- spacex.com/exampleURLwith-nasa.gov
★ lang:
If you add this operator to your query, you will only monitor the quoted languages. To monitor all languages, do not add the language operator.
❗️This operator must be paired with AND or AND NOT
NASA AND lang:(fr OR en)
👉 Here you can find a list with all the Language codes.
★ title:
This operator will only search the title of web mentions.
It does not work for social media sources or Forums. If your search is monitoring these sources, Mention will ignore the title operator. Example:
title: NASA
-> This will fetch mentions when the title of the article has this keyword or phrase
★ body:
With the body: operator you can search for mentions that include the following keyword in the article text.
The operator does not work for social media or Forum sources. If used with these sources activated, the operator will be ignored.
body: NASA
-> This search will attempt to only search the body of an article for your keyword.
★ source:
The Source operator will allow you to define the sources that you want to monitor for specific grouped searches. It is a great way to create specific searches across multiple platforms.
The operator is non-autonomous and can be paired with AND or AND NOT. See below for some examples:
NASA AND source:(web or blogs) -> Mentions from NASA on the web or blogs
NASA AND NOT source:news --> will block NASA mentions from news sites
(NASA AND source: news) OR (SpaceX AND source:web)
-> NASA on the news sites or SpaceX on the web!
❗️Please be aware that the Source operator works in conjunction with the Source drop-down menu in alert creation. If you block a source from the drop-down menu but then try to include it in your query, you will run into an error!
❗️This Operator doesn't work with Historical Data. If you use it, you will see mentions coming from all sources.
★ source_name:
This operator will fetch your keywords on Twitter based on the name of the account, The operator is non-autonomous and needs to be combined with AND or AND NOT. Example below:
concert AND source_name:"Justin Bieber"
--> This will search for the term concert only on Justin Bieber's Twitter if his name is
❗️Please note that the source_name operator relies on the name of the account, not the @handle. For example, Justin Bieber's Twitter handle is @justinbieber but the name of his account is simply Justin Bieber with the spacing in-between.
★ source_username:
This operator will function similarly to the source_name operator except it searches for specific @handles on Twitter and Facebook Business Pages. The operator is non-autonomous and needs to be combined with AND or AND NOT.
iPhone AND source_username:Apple
->This will fetch mentions when Apple tweets the text 'iPhone' or the Apple Facebook page creates a post that includes the text 'iPhone'.
❗️The operator works for Facebook and Twitter. However, please be aware that some Twitter accounts and Facebook pages may use different account names so please attempt to write both! For example, Mention's Twitter handle is @mention and our Facebook handle is @mentionapp.
★ Wildcards (? and *)
These operators will replace unknown characters in text.
? is used to replace 1 unknown character:
bo?t will fetch mentions including "boat", "boot", "bolt", etc.
* will replace multiple unknown characters:
v*d will bring mentions such as "voted" , "void" , "valid", etc.
❗️These wildcards cannot be used within specific operators. For example, this configuration , url: nas?.gov , will not work.
❗️ If the Twitter source is activated, the wildcard cannot stand alone. You must use a regular keyword along with a wildcard keyword. For example, apple AND or?nges will work for Twitter.
★ source_country:
The operator allows you to restrict mentions by Country code.
This Operator works for Web, News, Blogs, Forums, Facebook, Instagram and Twitter.
The operator is non-autonomous and must be combined with AND or AND NOT. Example of the operator below:
SpaceX AND source_country:(US OR FR)
-> Mentions from the United States or France that use the keyword
Here you can find all country codes (ISO 2).
★ AND NOT has:source_country
★ AND -has:source_country
These two operator work in the same ways! You can choose to utilize whichever is easier for you within the query. With these operators, Mention will fetch content that does not have country location. Some mentions from the web or social media do not provide a country code. You can utilize this operator to fetch those mentions!
Please see below for an example of both !
SpaceX AND NOT has:source_country
SpaceX AND -has:source_country
For both of these queries, Mention will search for SpaceX on websites that do not provide a specific country code!
Mention Tip: There are times where content on the web does not have a designated country code. There are some websites online and social posts that may seem like they are from a certain country. However, these posts will not be fetched by Mention if the country code is not embedded. To avoid missing content, you can use the following code:
AND (source_country:(-) OR -has:source_country)
*Replace - with the appropriate country codes
Writing this code will make sure your alert monitors content from the desired countries regardless if a country code is present in the website's configuration. Below is an example of how you can write the code with your keywords:
Example: SpaceX AND (source_country:(FR) OR -has:source_country)
★ twitter_followers:XXX
This operator will match mentions whose Twitter author has at least the given number of followers. It is non-autonomous and must be used with AND or AND NOT
❗️When the operator is in use, it will only match Twitter mentions. To fetch mentions from other sources, please add this code to your search: OR NOT source: Twitter
See the example below:
NASA AND (twitter_followers:8000 OR NOT source:twitter)
In this example, Mention will conduct two searches:
Mention will fetch NASA on Twitter accounts that have 8,000 or more followers.
Mention will also fetch NASA (by itself) on the other list of sources such as Facebook, Forums, News, etc.
❗️This Operator doesn't work with Twitter Historical Data.
★ facebook_page_likes:XXX
This operator matches mentions from Facebook with the number of likes or more. It is non-autonomous and must be used with AND or AND NOT . Example below:
NASA AND facebook_page_likes:1000
❗️Similar to Twitter, please use OR NOT source: facebook to fetch mentions from other sources.
❗️This Operator doesn't work with Twitter Historical Data.
★ tiktok_followers:XXX
This operator will fetch content from TikTok when the post matches your keywords and has a specific number of followers or more. It is non-autonomous and must be used with AND or AND NOT. Example below:
"Harry Styles" AND tiktok_followers:6000
★pinterest_followers:XXX
This operator will fetch content from Pinterest when the post matches your keywords and has a specific number of followers or more. It is non-autonomous and must be used with AND or AND NOT. Example below:
architecture AND pinterest_followers:3000
★youtube_subscribers:XXX
This operator will fetch content from YouTube when the post matches your keywords and has a specific number of followers or more. It is non-autonomous and must be used with AND or AND NOT. Example below:
"travel vlog" AND youtube_subscribers:1000
★ website_reach:XXX
This operator matches mentions with the minimum number of Reach or more. The operator is non-autonomous and must be paired with AND or AND NOT. Example below:
nasa AND website_reach:5000
If a mention does not have reach , then it will be ignored so please be careful! Check here the Sources for which Mention calculates the Reach.
❗️This Operator doesn't work with Twitter Historical Data.
Example of Boolean Query:
👉 Follow our best practices to create Boolean Queries!