v1.9.0
Premium Search API
v1.9.0 adds new functionality that allows you to use the Twitter Premium Search API endpoints. To use the Premium Search you will need to visit the Twitter Developer Dashboard and set up an environment that is attached to one of your apps. Then you should be able to use the label for your environment in your twarc search command.
For example to use the docnowdev environment to search the 30 day endpoint you can:
twarc search blacklivesmatter --30day docnowdev > tweets.jsonl
or to search the full archive endpoint:
twarc search blacklivesmatter --fullarchive docnowdev > tweets.jsonl
Warning: Depending on your query this could quickly use up your budget! So you will likely also want to use --from_date and/or --to_date to limit the time range that you are searching. You can also use --limit to limit the total number of tweets that are retrieved.
twarc search blacklivesmatter --30day docnowdev --to_date 2013-08-01 > tweets.jsonl
If your app is only authorized for the sandbox you must use the --sandbox parameter which will alter the maximum number of tweets you will can retrieve in a request down to 100.
This functionality is also made available through the new Twarc.premium_search method.
Twitter Labs
v1.9.0 also includes some initial support for the Twitter Labs endpoints. At the moment only the sample stream is supported, but we anticipate adding more as they are requested.
twarc --app_auth labs_v1_sample > sample.jsonl