0

I'm trying to retrieve viral tweets for an academic project using the Twitter API v2. There is a Topic on Twitter called "viral tweets" which is perfect for what I want.

viral tweet example

It has id 1284234742661963776 so my thoughts was to query using context annotations. However there is no entity related to viral tweets on the API. I've tried to input this entity id using context id 131 which corresponds to the Twitter Unified Taxonomy, but got nothing. Did someone manage to retrieve them? Are not all topics on Twitter available on the API?

Here is an example of the code I used

retrieve viral tweet using tweepy

d34n
  • 52
  • 1
  • 7

1 Answers1

1

Not all topics available on Twitter are part of the context annotations provided via the Twitter API. You can read more about this and see an example in this answer.

Andy Piper
  • 11,422
  • 2
  • 26
  • 49
  • I see thanks. Is this something that could be added to the API in the forseeable future? For example if I open a pull request or an issue on the github repo where all the context annotations are saved https://github.com/twitterdev/twitter-context-annotations? – d34n Oct 19 '22 at 12:59
  • that is one possible approach to request that such an option is added (although https://github.com/twitterdev/open-evolution might be a better repository to use). There's no guarantee that this will be added, but it is a possibility. – Andy Piper Oct 19 '22 at 13:19