search_fullarchive: Search fullarchive (PREMIUM)

Description Usage Arguments Value Developer Account Search operators Keyword Accounts of interest Tweet attributes Geospatial Examples

View source: R/premium.R

Description

Search Twitter's 'fullarchive' (PREMIUM) API

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
search_fullarchive(
  q,
  n = 100,
  fromDate = NULL,
  toDate = NULL,
  env_name = NULL,
  safedir = NULL,
  parse = TRUE,
  token = NULL
)

Arguments

q

Search query on which to match/filter tweets. See details for information about available search operators.

n

Number of tweets to return; it is best to set this number in intervals of 100 for the '30day' API and either 100 (for sandbox) or 500 (for paid) for the 'fullarchive' API. Default is 100.

fromDate

Oldest date-time (YYYYMMDDHHMM) from which tweets should be searched for.

toDate

Newest date-time (YYYYMMDDHHMM) from which tweets should be searched for.

env_name

Name/label of developer environment to use for the search.

safedir

Name of directory to which each response object should be saved. If the directory doesn't exist, it will be created. If NULL (the default) then a dir will be created in the current working directory. To override/deactivate safedir set this to FALSE.

parse

Logical indicating whether to convert data into data frame.

token

A token associated with a user-created APP (requires a developer account), which is converted to a bearer token in order to make premium API requests

Value

A tibble data frame of Twitter data

Developer Account

Users must have an approved developer account and an active/labeled environment to access Twitter's premium APIs. For more information, to check your current Subscriptions and Dev Environments, or to apply for a developer account visit https://developer.twitter.com.

Search operators

Note: Bolded operators ending with a colon should be immediately followed by a word or quoted phrase (if appropriate)<e2><80><93>e.g., lang:en

Keyword

Accounts of interest

Tweet attributes

Geospatial

Examples

1
2
3
4
5
6
## Not run: 
## search fullarchive for up to 300 rstats tweets sent in Jan 2014
rt <- search_fullarchive("#rstats", n = 300, env_name = "research",
  fromDate = "201401010000", toDate = "201401312359")

## End(Not run)

rtweet documentation built on Jan. 11, 2020, 9:11 a.m.