I’ve noticed that searching via the REST API for hashtags with and without the # will return different results when the hashtag appears in the extended tweet. This can be problematic when retrieving tweets that use a popular hashtag, since searching with the # can yield significantly less results.
I’ve created a test script that demonstrates the problem. Here’s what it does:
- Creates a tweet that has a length of 137 characters that includes a unique hashtag at the end.
- Retweets the tweet, which will prepend
RT: {screen_name} and pushes the hashtag over the 140 character mark (see extended tweet)
- Sleep for 20 seconds to wait for Twitter to update their search index.
- Print out the number of search results with and without the ‘#’ prefix.
If you don’t want to run the script you can search for #t150324403 and t1503244033 using your preferred Twitter API client, at least while they are in the search window.