Get the members of a specified Twitter list.

Get the lists a specified user has been added to.

lists_members(list_id = NULL, slug = NULL, owner_user = NULL, n = 5000,
  cursor = "-1", token = NULL, parse = TRUE, ...)

lists_memberships(user, n = 20, cursor = "-1",
  filter_to_owned_lists = FALSE, token = NULL, parse = TRUE)



required The numerical id of the list.


required You can identify a list by its slug instead of its numerical id. If you decide to do so, note that you'll also have to specify the list owner using the owner_id or owner_user parameters.


optional The screen name or user ID of the user who owns the list being requested by a slug.


Specifies the number of results to return per page (see cursor below). The default is 20, with a maximum of 5,000.


optional Breaks the results into pages. Provide a value of -1 to begin paging. Provide values as returned in the response body's next_cursor and previous_cursor attributes to page back and forth in the list.


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).


Logical indicating whether to convert the response object into an R list. Defaults to TRUE.


Other arguments used as parameters in query composition.


The user id or screen_name of the user for whom to return results for.


When set to true . t or 1 , will return just lists the authenticating user owns, and the user represented by user_id or screen_name is a member of.


Either a nested list (if parsed) or an HTTP response object.


Due to deleted or removed lists, the returned number of memberships is often less than the provided n value. This is a reflection of the API and not a unique quirk of rtweet.

See also

Other lists: lists_statuses, lists_subscribers, lists_users


## get list memebers for a list of polling experts using list_id
(pollsters <- lists_members("105140588"))

## get list members of cspan's senators list
sens <- lists_members(slug = "senators", owner_user = "cspan")

## get list members for an rstats list using list topic slug
## list owner's screen name
rstats <- lists_members(slug = "rstats", owner_user = "scultrera")

# }
# NOT RUN { ## get up to 200 list memberships of Nate Silver ns538 <- lists_memberships("NateSilver538", n = 200) ## view data ns538 # }