I'm trying to run some queries against the Twitter API to collect some tweets. I want to filter out retweets and after some research discovered there seems to be two different tags you can append to the search query to filter them -filter:retweet
and -filter:nativeretweets
.
I've ran sample queries with both options and can seem to tell the difference. List is returned tweets is slightly different but in no real way I can discern. Neither seem to contain retweets. I won't post the output here as it's a fairly length JSON output but I can if need be.
The sample queries are
-filter:retweet
https://api.twitter.com/1.1/search/tweets.json?q=%22Sample+Query%22-filter:retweet&count=100&include_entities=false&result_type=recent&tweet_mode=extended
-filter:nativeretweets
https://api.twitter.com/1.1/search/tweets.json?q=%22Sample+Query%22-filter:nativeretweets&count=100&include_entities=false&result_type=recent&tweet_mode=extended
I believe per TweetDeck documentation (https://support.twitter.com/articles/20170322) this is the difference:
filter:nativeretweets
shows retweets from users who have hit the retweet button.
filter:retweets
shows old style retweets ("RT") + quoted tweets.
Those are filtering FOR those types of results, but as you've done, the - is necessary to filter them out -filter:nativeretweets
or -filter:retweets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With