rtweet package - extract specific tweets from specific user

Hi, I've only been using R for the past couple of years at University, and have only recently come across the rtweet package. I have decided to use it for a Migration Project at Uni.

I was wondering if anyone knows how to extract tweets with a specific word from a specific user on R?
I want to create a data frame with all (or n = 100) of Trump's tweets that mention the word "immigration".

I can create a data frame of all of Trump's tweets, or find any Twitter user that use the word "immigration" but cannot seem to find a way to do both. Thank you!

Unfortunately, that's a limitation of the Twitter API, not of rtweet. They now have a tiered Search API, and searching a term from a specific user is one of the "premium operators".

They did a blog post when they rolled out the new tiered format, but I'm not sure how current it is:

It looks like the pricing starts at $149 per month.

For the specific case of Trump, there is actually an archive of all of his tweets, which you can export:
http://www.trumptwitterarchive.com/archive

2 Likes

Ah thank you for letting me know!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.