Hey All,

My understanding is that when you use curl or twurl to search the full twitter archive for X tweets matching a particular query between a pair of dates, you get X of the most recent tweets within the date range. A few test searches I’ve done have yielded only results from the end of the search period. Is there anyway to instead randomly sample X tweets from the date range matching the query, while still getting all the data that you’d get from a standard search? I know I could do stratified searches and randomly subsample from there, but I’m worried I’d then run into problems with the search limits.

I’m fairly new to working with the twitter api and analyzing tweets, so my apologies if I missed some really basic solution to this or if it’s well known to not be possible or something along those lines.

Thanks for your help!

Do you have examples of the twurl or curl commands you ran to get that result?

There’s GitHub - twitterdev/search-tweets-python: Python client for the Twitter 'search Tweets' and 'count Tweets' endpoints (v2/Labs/premium/enterprise). Now supports Twitter API v2 /recent and /all search endpoints. this which might be a lot better to use.

There is a sample: operator but it’s not available for the Premium Endpoints, only Enterprise Operators by product | Docs | Twitter Developer Platform