lookup_users

0th

Percentile

Get Twitter users data for given users (user IDs or screen names).

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.

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

User id or screen name of target user.

parse

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

token

OAuth token. By default token = NULL fetches a non-exhausted token from an environment variable. Find instructions on how to create tokens and setup an environment variable in the tokens vignette (in r, send ?tokens to console).

Value

A tibble of users data.

See Also

https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup

Other users: as_screenname, lists_subscribers, search_users, tweets_with_users, users_data

Aliases
  • lookup_users
Examples
# NOT RUN {
# }
# 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)

# }
# NOT RUN {
# }
Documentation reproduced from package rtweet, version 0.6.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.