Hello, when searching using the search API 1.1 the query is matched against usernames as well as status updates. Is there a way to restrict to status updates only?
2 Likes
episod
#2
No, there is not. However, you can omit results authored by specific users with operators like:
-from:username -from:username2
Not exactly what I was looking for as I don’t know the username in advance, but thanks anyway
I am also facing the same problem and this is happening on my production server. This is a huge change on Twitter’s part to include username in searching. Its a huge blunder, for example
Search Query = "nokia"
For this query it is fetching data matching the usernames also. Tweets from user “nokia_mania” is also being fetched irrespective of that tweet contain “nokia” as the keyword or not.
Please provide us the solution of this asap. Thanks in advance.
episod
#5
Search is constantly evolving. It’s not a steady state interpreter of queries. Post-filter what’s not useful for you or consider using a Streaming API instead.
1 Like
Thanks for your reply sir.
I am using Streaming also on another server. Is it that inclusion of “username” in search like REST API v1.1 is not included in Streaming API ? Please confirm if scenario i mentioned above wont exist in Streaming API, if it is so then will then discard REST API because i am facing huge problem of username match in search 
Is there any way out except restricting few username like you mentioned
(-from:username1) because while searching we cant predict which username can match the query?
Any update on this topic? There need to be a way to exclude usernames when searching.
You can either use the “-from:username” syntax, or you can post-filter the results of the search yourself.
I’m frequently searching tweets about some anime titles and got too many non relevants tweets from users whose name contains ANIME ttile they are watching current season or favors. Is there any options to exclude name and username as a target for searching?
There’s no option in the API to enable you to do that - you’d need to manually filter them out from the result set.
1 Like
Thank you for reply. Many Japanese users felt this feature is very annoying and complain. Please conside add excluding option.
2 Likes
I’m mainting search options to include many “-from:username” terms. But adding many options on tweetdeck, search fails (returns wrong results/too old tweets only returns). Is there any alternative options?
Any updates on this? It’s a thread from 2013 and it’s still very relevant.
as far as i know, the new v2 API is the same, eg, nokia in a query will match @Nokia_Cricket for example. Unfortunately the solution is still the same, either filtering these on your end, or specifying more exact operators to narrow down the search: Search Tweets - How to build a query | Docs | Twitter Developer Platform
1 Like