Now that you have your bearer token, know what endpoints the Twitter API v2 has available and know how to write search queries, it is time to get into the code and actually get the data.
- For Python samples, we will be using the twarc library
- For R samples, we will be using the academicTwitteR package.
If you have access to the academic research product track, click on the button below to go to the labs for the academic research product track in Python
If you do not have access to the academic research product track (e.g. undergraduate students), click on the button below to go to the labs for the standard product track in Python
If you have access to the academic research product track, click on the button below to go to the labs for the academic research product track in R
Note: Currently, the academicTwitteR package only supports certain endpoints in the academic research product track and does not support the standard product track, so if you are a student, please follow the code samples for the standard product track in Python