twittertwitter-search

Is there any way to exclude any accounts mentioning specific terms from twitter search results


I'm trying to build some advanced twitter searches to monitor certain items. At present, they get thrown off by people using one of the keywords in the username.

I can't just mute / block all those users, as some of them are ones I follow.

At the moment, the only way I can see to completely exclude an account from results is:

    -(@username) -from:username

This works, but the approach rapidly gets lengthy if there are quite a few names to exclude. It also doesn't allow me to exclude all accounts containing username - i.e. @username1 @username2

One thought would be to create a list of accounts to exclude and then filter the list. That doesn't seem to work though as it won't help in excluding replies to these people.


Solution

  • I was confronting a similar problem and the way I ended up solving it is exactly as you suggested with a tiny addition:

    Like you, I created a list for accounts with usernames similar to my keywords, then used the list: operator with my list's ID, in minus - to exclude tweets from the list members.

    I also ended up getting lots of replies to accounts on my list, so i used the exclude:replies operator and it worked quite good.

    [keyword(s)] -list:[list_id] exclude:replies

    The only false positives I kept on getting were tweets which quoted members of my list but adding exclude:quote did more damage than help as it filtered also legitimate tweets with benign quotes.