Can i get tweets and retweets for a particular keyword


I want to get both tweets and retweets of a particular hashtag. What’s the CSDL for this?

How do I differentiate between tweets and retweets in the output? Do we need to search for “RT” text at the beginning or does it flag it as a Twitter UI retweet?


The simplest approach would be to write:

interaction.content contains "#myhashtag" and
interaction.type == "twitter"

This will search both twitter.text and twitter.retweet.text fields. 

Regarding the "RT" text in retweets, Twitter only recognises a retweet as a 'true retweet' if it was sent by clicking one the the official retweet buttons, and the Tweet itself is unmodified by the user. If you edit the Tweet yourself to say "RT @user .....", this will be treated as a new Tweet.


Great thanks Jason


I am very impressed with the knowledge you are posting here. Thanks for sharing and let us know more about new releases. Thank you for taking the time to share this valuable research with everyone.