Open the Terminal application (MacOS users), or Command Prompt (Windows users), and navigate into the directory where you want to save your tweet data.
pip install twarc by entering the following command:
pip install twarc
MacOS users may also have the option of installing twarc via homebrew using the command:
brew install twarc
Grant twarc access to your twitter account using your application’s API keys:
twarc configure
Use twarc to search for tweets:
twarc search climatestrike > tweets.jsonl