How to search Twitter for other people's retweets

Asked 2 years ago, Updated 2 years ago, 433 views

from:username filter:nativeweets

If you search with this search command, you will see a tweet retweeted by the user, but if you submit the URL, the information that the user retweeted will be added.(RT@ (username) will be the first one)
What should I add to the search command to display only tweets that the user retweeted in the URL?

python twitter webapi

2022-09-30 21:50

2 Answers

If you use the Standard search API, an array of TweetObject is returned.

from:usernamefilter:nativeetweets only searches for retweets, so it is returned as a Tweet Object with username but contains retweeted_status.This is the user retweeted tweet, so I think you can build the URL from here by referring to id_str and user.id_str.

The Standard search API returns since_id (since_id_str), so you can continue with the search results.(I don't think it's possible to get only 7 days back…)


2022-09-30 21:50

The REST API status/user_timeline endpoints allow you to retrieve the latest 3,200 user tweets.If you look at JSON's retweeted key in each tweet that comes back as an API response, you can determine if the tweet is a retweet or not

The search/tweets endpoint may also be able to select only retweets with the Simple filter but the search is limited to tweets within 7 days.

Note: Use Twitter API in Python


2022-09-30 21:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.