Returns data on up to 90,000 Twitter users. To return data on more than 90,000 users, code must be written to iterate through user IDs whilst avoiding rate limits, which reset every 15 minutes.

lookup_users(users, parse = TRUE, token = NULL)



User id or screen name of target user.


Logical, indicating whether or not to parse return object into data frame(s).


Every user should have their own Oauth (Twitter API) token. By default token = NULL this function looks for the path to a saved Twitter token via environment variables (which is what `create_token()` sets up by default during initial token creation). For instruction on how to create a Twitter token see the tokens vignette, i.e., `vignettes("auth", "rtweet")` or see ?tokens.


A tibble of users data.

See also


# NOT RUN { ## select one or more twitter users to lookup users <- c( "potus", "hillaryclinton", "realdonaldtrump", "fivethirtyeight", "cnn", "espn", "twitter" ) ## get users data usr_df <- lookup_users(users) ## view users data usr_df ## view tweet data for these users via tweets_data() tweets_data(usr_df) # }