Hi there,

I’m testing the recent search Twitter API v2 with python. If I search for only an hashtag in the query the api doesn’t return what I expect.

I give you an example:

  • Hashtag I want to look for #milano → Query code: query = "\#milano -is:retweet" → It gives me weird results, tweetsnot showing the hashtag at all.

If I insted look for keyword “milano” and hashtag #milano all together it works:

Example query: query = "milano \#milano -is:retweet" → this way I get posts with both the keyword and the hashtag

What am I doing wrong?

Thanks,
Denis

I’m not sure but I think the / back slash is wrong . have you seen this page

Operator Finds Tweets…
watching now containing both “watching” and “now”. This is the default operator.
“happy hour” containing the exact phrase “happy hour”.
love OR hate containing either “love” or “hate” (or both).
beer -root containing “beer” but not “root”.
** #haiku
from:interior sent from Twitter account “interior”.