Extracting Tweets Using Twitter Premium Search API and Python

Prathma Rastogi
The Startup
Published in
4 min readMay 1, 2020

--

To start working with Twitter APIs, you need to have a twitter developer account and an app in this account. So, if you guys don’t have one, start with creating one.

You can refer to below article for help,

Now, moving back to our topic…

Twitter provides Standard, Premium and Enterprise edition for its APIs to extract the tweets data. Standard APIs are free and generally slow as compared to Premium and Enterprise.

Once you create Twitter Developer account, Twitter provides limited access of Premium API to you on Sandbox Environment.

There are two Premium Twitter Search APIs available: full-archive and 30-days. 30-days provides the tweets posted in last 30 days and full-archive provides tweets posted from way back in March 2006.

Both APIs have a rate limit of 30 requests per minute on Sandbox Environment. But if you buy a premium which costs around $100 per month, its 60 requests per minute. To access the sandbox environment, you need to set up the Dev environment on your account.

While the Standard API can take days or even weeks to collect the data you need, the Premium API returns up to 5k…

--

--

Prathma Rastogi
The Startup

SU Grad || Sr. SE @Visa || Klokwork Shop Management SE Intern || iOS Dev @Roundglass Curofy || IIITA UnderGrad// Believe in learning and growing..