Skip to main content

Supported Operators and Query Conditions

C
Written by Cary Olson

When creating a listening topic, you can use Advanced Query Mode to flexibly combine Boolean operators and filtering conditions, enabling more precise content filtering and high-quality matching. OneSight supports the following advanced query syntax:

一、Query Operators

Query Operators

Purposes

Examples

OR

Meet any one of multiple query conditions

  • "Tesla" OR "Cybertruck" OR "Model S" Returns content containing "Tesla" or "Cybertruck" or "Model S"

AND

Multiple query conditions must be met at the same time

  • "Cybertruck" AND "Speed" Returns content containing both "Cybertruck" and "Speed".

()

Group query conditions, giving priority to the query logic within the brackets.

  • ("Cybertruck" OR "Model S") AND "Speed" Returns content that contains both "Cybertruck" and "Speed", or content that contains both "Model S" and "Speed".

*

Fuzzy matching of word stems (suffixes).

  • "TeslaModel*" Matches any word starting with "TeslaModel", such as "TeslaModelY", "TeslaModel3", etc.

NOT

Exclude specific keywords.

  • "Tesla" NOT "Cybertruck" Returns content that contains "Tesla" but does not contain "Cybertruck".

NEAR/n

Find the relative proximity between two keywords (no order requirement), which can be no more than n words apart, where n can only be 0 or a positive integer.

  • "Samsung" NEAR/3 "S12" Returns results where "Samsung" and "S12" are within 3 words (or less) of each other in the text.

ONEAR/n

Similar to NEAR, but it requires that the order of words must be consistent and n can only be 0 or a positive integer.

  • "Samsung" ONEAR/3 "S12" In the returned results, "Samsung" must appear first, and then "S12" must appear within the next 3 words.

{n}

Query by the frequency with which keywords appear in a single post.

  • Samsung{3} Only content in which the keyword Samsung appears at least 3 times in a single post is returned.

  • "Samsung"{5} Only content in which the keyword Samsung appears at least 5 times in a single post is returned.

  • "Samsung Galaxy Z Fold8"{3} Only content in which the phrase "Samsung Galaxy Z Fold8" appears at least 3 times in a single post is returned.

二、Query Conditions

Conditions Types

Purposes

Examples

Language

To restrict the language of the content.

  • Language: "en" Only English content is returned.

Country

To restrict the author's country.

  • Country: "cn" Only return content from China.

Sentiment

To restrict content sentiment.

  • Sentiment: "Positive" Return only positive results.

Author

To restrict the author.

  • Author: "xiaomi" Return only content from this author (complete match of author name or handle).

Site

To restrict specific website.

  • Site: "36kr.com" Return only content from this page.

URL

To restrict specific URLs.

  • URL:"https://www.bbc.com/news/articles/*" Only return content from this URL.

Platform

To restrict the platform of the content.

  • platform:"facebook" Only content from the Facebook platform will be returned.

  • platform:"x" Only content from the X (formerly Twitter) platform will be returned.

Media Type

To restrict the language of the content.

  • mediatype:"video" Only the video content is returned

  • mediatype:"photo" Only the photo content is returned

Content Type

To restrict the content type on the platform.

  • contenttype:"comment" Only the content of the comments is returned.

  • contenttype:"posts" Only the content of the posts is returned.

Author Gender

To restrict the gender of the author.

  • authorgender:"female" Only content created by female authors is returned.

  • authorgender:"male" Only content created by male authors is returned.

Author Age Range

To restrict the age group of the author.

  • authorage:"25-34" Only content with authors aged 25-34 is returned.

  • authorage:"35-44" Only content with authors aged 35-44 is returned.

Potential Reach

To restrict the range of the author’s potential reach.

  • potentialreach>10000 Only content with a potential reach of more than 1,000 is returned.

  • potentialreach>=100 AND potentialreach<10000 Only content created by authors whose potential reach falls between 100 (inclusive) and 10,000 (exclusive) is returned.

Engagements

To restrict content by engagement count.

  • engagements>=5000 Only content with more than 5,000 engagements is returned.

  • engagements>=5000 AND videoviews<=10000 Only content with engagement counts between 5,000 and 10,000 (inclusive) is returned.

Video Views

To restrict video content by view count.

  • videoviews>100000 Only video content with more than 100,000 video views is returned.

  • videoviews>50000 AND videoviews<=100000 Only content with video views between 50,000 (exclusive) and 100,000 (inclusive) is returned.

Content Tag

To restrict the tag of the content.

  • contenttag:"XXXXX" Only return content with the content tag XXXXX.

  • contenttag:"Technology" Only content tagged as Technology is returned.

Social Account Tag

To restrict social account tags.

  • socialaccounttag:"XXXXX" Only return content with the social account tag XXXXX.

  • socialaccounttag:"[KOL] Technology" Only content with the social account tag .[KOL] Technology is returned.

Content ID

Precisely find a single piece of content.

  • contentid:"XXXXX"Only return content with the ID XXXXX.

3. Usage Recommendations

  • Operators are case-insensitive, but we recommend using uppercase (e.g., AND, OR) for better readability.

  • Use parentheses () to group complex logic in query statements whenever possible.

  • Query statements can be combined with filtering conditions. For complex scenarios, e.g:

 ("Tesla" OR "Cybertruck") AND Language:"en" AND Sentiment:"Negative"
  • For complex query scenarios (such as competitor comparison, sequential expressions, or multilingual combinations), please feel free to contact the OneSight Customer Success Team for assistance.

Did this answer your question?