I’m using tweepy in order to extract data from tweets in Python. Now I’d like to search up the popularity of certain hashtags which should be returned in form of an integer. I’m thinking of a command like:
api.get_hashtagpopularity(hashtagname)
I couldn’t really find anything online, so I’d be very grateful for any hints on that!
Advertisement
Answer
No, there’s no built in function to return this as an integer, and you also cannot just request arbitrary popularity against all other possible hashtags. You could use the search counts API to get counts for specific searches, and then compare them, for example, get the count of Tweets with #red and #blue over the past 7 days and compare the popularity. You’d have to implement this yourself, but it’s a possible approach.