No API search results for an account name, but OK if I omit the "@"

api

#1

This search works:

https://api.twitter.com/1.1/search/tweets.json?q=Neurotrauma&count=50

This search doesn’t work, yields zero results:

https://api.twitter.com/1.1/search/tweets.json?q=@Neurotrauma&count=50

There is, of course, an account named @Neurotrauma!

Substitute other names for @Neurotrauma and it works fine. Just not for that one account. Any ideas, or am I just being stupid?


#2

Hi @kwoxford, these appear to be working as expected. Please feel free to let me know what you are expecting or are trying to achieve. Keep in mind that the web search does not operate the same as the API search.

When you search for a mention like “@Neurotrauma,” your results will consist of recent Tweets that mention @Neurotrauma (this will not return partial handle matches like @Neurotrauma_Col or return Tweets from @Neurotrauma).

When you search for “Neurotrauma,” your results will consist of recent Tweets that contain that text no matter where it appears in the Tweet.

If you are looking to include Tweets from @Neurotrauma, you will need to use the “from:Neurotrauma” operator in the query. For example, to get Tweets from or mentioning the account, “@Neurotrauma OR from:Neurotrauma”


#3

They certainly don’t seem to me to be working! Searching for neurotrauma gives the expected results, but searching for @Neurotrauma delivers zero results - specifically, this:

{
  "statuses": [],
  "search_metadata": {
    "completed_in": 0.004,
    "max_id": 603693010375716900,
    "max_id_str": "603693010375716865",
    "query": "%40neurotrauma",
    "refresh_url": "?since_id=603693010375716865&q=%40neurotrauma&include_entities=1",
    "count": 15,
    "since_id": 0,
    "since_id_str": "0"
  }
}

You said “When you search for a mention like “@Neurotrauma,” your results will consist of recent Tweets that mention @Neurotrauma - well, I’m afraid that’s not correct, there are no results. But if I try a different account name it works fine, e.g searching for mentions of @BBC gives plenty of results.

There’s not been a lot of activity recently on the @Neurotrauma account, and the most recent post is only just inside the usual 7 day cutoff for API searches. I’ve seen suggestions that accounts that don’t do much get squeezed out of the results list, but when you’re searching for a specific account that seems to be an odd thing to do.


#4

Your query for “@Neurotrauma” returned no results because there were no recent mentions. Again, this query will not include tweets from the screen name in question. Right now I see one recent tweet with a mention from @griz1, which is consistent across the API and web search.