This function accepts a username, without the "@" symbol and finds matching user profiles. This is helpful when you do not know a user's name exactly and need to get their user_id. If you know the username exactly then you can use ig_get_user_profile to pull the profile information without searching.

ig_search_users(username, max_id = NULL, return_df = TRUE,
  paginate = TRUE, max_pages = 10, verbose = FALSE)

Arguments

username

character; the username of the Instagram user. Omit the "@" symbol that is typically used when referencing another user

max_id

integer; the unique id identifying the oldest post that you would want to retrieve in this function call

return_df

logical; do you want to return the results as a tbl_df with one row per entity or as a list with one element per entity?

paginate

logical; do you want to paginate through results or just return the first page?

max_pages

integer; a limit to the number of pages to retrieve from paginated endpoints. Instagram feeds have the potential to paginate forever, so by default we stop after pulling 10 pages. If you would like more or less pages returned, then modify this argument.

verbose

logical; do you want informative messages?

Examples

# search for usernames like Justin Bieber bieber_users <- ig_search_users("justinbieb")
#> Error: Status: fail #> Message: login_required