Hi
I am using twarc2 to retrieve a users tweet and I wanted to know is there I can stop it from saving all the data and instead only save select fields
Sure, you can manually specify what fields to get using command line options, see --help for a list:
--no-context-annotations By default twarc gets all available data.
This leaves out context annotations (Twitter
API limits --max-results to 100 if these are
requested). Setting this makes --max-results
500 the default. NOTE: This argument is
mutually exclusive with arguments: [--poll-
fields, --minimal-fields, --place-fields,
--user-fields, --media-fields, --tweet-
fields, --expansions, --counts-only].
--minimal-fields By default twarc gets all available data.
This option requests the minimal retrievable
amount of data - only IDs and object
references are retrieved. Setting this makes
--max-results 500 the default. NOTE: This
argument is mutually exclusive with
arguments: [--no-context-annotations,
--poll-fields, --place-fields, --user-
fields, --media-fields, --tweet-fields,
--expansions, --counts-only].
--expansions TEXT Comma separated list of expansions to
retrieve. Default is all available.
--tweet-fields TEXT Comma separated list of tweet fields to
retrieve. Default is all available.
--user-fields TEXT Comma separated list of user fields to
retrieve. Default is all available.
--media-fields TEXT Comma separated list of media fields to
retrieve. Default is all available.
--place-fields TEXT Comma separated list of place fields to
retrieve. Default is all available.
--poll-fields TEXT Comma separated list of poll fields to
retrieve. Default is all available.
They’re specified as a comma separated list, eg:
twarc2 tweet --expansions "referenced_tweets.id,author.id" --tweet-fields "id,text,author_id,referenced_tweets" 1543083995637747712 result.json