Description Usage Arguments Value
Retrieves all tweets of a keyword provided by the user through the Twitter API. Alternatively the user can directly read from a structured Json response based on the Twitter API. If the user plans to access to the Twitter API they must have a personal bearer token and store it as an environment variable to access it.
1 2 3 4 5 6 7 8 9 10 11 |
bearer_token |
The user's personal twitter API dev bearer token. It is recommended to add the token from an environment variable. |
keyword |
The keyword to search Twitter and retrieve tweets. |
start_date |
Starting date to collect tweets from. Dates should be entered in string format: YYYY-MM-DD |
end_date |
Ending date (Included) to collect tweets from. Dates should be entered in string format: YYYY-MM-DD |
max_results |
The maximum number of tweets to return. Default is 25.Must be between 10 and 100. |
store_path |
The string path to store the retrieved tweets in Json format. Default is working directory. |
store_csv |
Create .csv file with response data or not. Default is False. |
include_public_metrics |
Should public metrics regarding each tweet such as impression_count, like_count, reply_count, retweet_count, url_link_clicks and user_profile_clicks be downloaded and stored. Default is True. |
api_access_lvl |
The twitter API access level of the user's bearer token. Options are 'essential' or 'academic'. Default is 'essential' |
dataframe A dataframe of retrieved tweets based on user's selected parameters. (Data will be stored as a Json file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.