How to Exclude Words From Twitter Search

To exclude a word from Twitter search, put a minus sign directly before it, with no space: jaguar -car returns posts about jaguars that don't mention cars.

Cover card reading 'How to Exclude Words From Twitter Search'

To exclude a word from Twitter search, put a minus sign directly before it, with no space: jaguar -car returns posts about jaguars that don’t mention cars. The minus works on phrases, hashtags, accounts and filters too, for example -"for sale", -#ad and -filter:retweets.

Exclusions remove noise faster than any other operator. They are listed with the other word operators in the Twitter advanced search operators reference. This guide is one of the techniques in how to search tweets by keyword.

How Do You Exclude a Word on X?

You exclude a word by typing a minus sign immediately before it in the search bar, or by entering it in the None of these words field of the Advanced search form. X’s advanced search supports posts excluding specific words (X Help Center). Listed below are the 3 steps.

  1. Type your keyword, then the word to remove with a minus sign: python -snake.
  2. Press Enter.
  3. Add more exclusions, each with its own minus sign, until the results are clean.

There must be no space between the minus sign and the word. A hyphen inside a word, as in state-of-the-art, is read as a space, not as an exclusion (twitter-advanced-search reference).

You can exclude words, exact phrases, hashtags, accounts, links and most filters. Listed below are the 8 kinds of exclusion (twitter-advanced-search reference).

Exclude Query Example
A word -word apple -fruit
An exact phrase -"phrase" laptop -"for sale"
A hashtag -#hashtag giveaway -#ad
An account’s own posts -from:username @brand -from:brand
Replies -filter:replies topic -filter:replies
Reposts and quotes -filter:retweets topic -filter:retweets
Posts with links -filter:links topic -filter:links
Posts linking to a domain -url:domain news -url:example.com

Two filters can’t be negated: filter:follows and list: (twitter-advanced-search reference).

Exclusion Search Examples

These exclusion searches clean up the topics that attract the most noise. Replace the words.

Task Query
An ambiguous word jaguar -car -football
Real opinions, no ads "best headphones" -#ad -#sponsored -giveaway
Brand mentions by others ("brand" OR @brand) -from:brand
Original posts only topic -filter:retweets -filter:replies
Discussion without link spam topic -filter:links
Job posts removed developer -hiring -"we're hiring" -job

Why Does an Exclusion Not Work?

An exclusion fails when there is a space after the minus sign, when the unwanted word is a variant you didn’t exclude, or when the word appears only in the author’s name. Keyword operators match names and handles as well as post text (twitter-advanced-search reference). Listed below are the 3 fixes.

  1. Remove the space: -car, not - car.
  2. Exclude the plural and the variant: -car -cars.
  3. Exclude the account with -from:username when its name is the problem.

How Many Words Can You Exclude?

Keep the whole query under about 22 operators, exclusions included; beyond that X stops applying some of them. For longer exclusion lists, filter the exported results instead, as below.

How to Filter Out Noise at Scale With apidojo

apidojo’s Tweet Scraper V2 on Apify accepts the same minus-sign exclusions in searchTerms, so the export is already cleaned. The actor’s documentation shows -filter:retweets as a standard example (Apify).

{
  "searchTerms": ["\"best headphones\" -#ad -#sponsored -giveaway -filter:retweets"],
  "sort": "Latest"
}

It costs $0.40 per 1,000 tweets. See how to scrape tweets by keyword and the apidojo Twitter Scraper.

Questions people ask

Can you exclude several words at once?

Yes, put a minus sign before each word: topic -word1 -word2 -word3.

Can you exclude a user from search?

Yes, add -from:username to remove that account's posts.

Can you exclude words on the X app?

Yes, type the minus sign before the word in the app's search bar; check that autocorrect hasn't added a space.

How do you exclude both replies and reposts?

Add -filter:replies -filter:retweets to the query.