Skip to contents

Updates of API

rtweet-deprecated
Deprecated functions in rtweet

API functions

direct_messages()
Get direct messages sent to and received by the authenticating user from the past 30 days
get_favorites()
Get tweets liked/favorited by one or more users
get_followers()
Get user IDs for accounts following target user.
get_friends()
Get user IDs of accounts followed by target user(s).
get_mentions()
Get mentions for the authenticating user.
get_retweets() get_retweeters()
Get the most recent retweets/retweeters
get_timeline() get_my_timeline()
Get one or more user timelines
get_token() get_tokens()
Fetch Twitter OAuth token
get_trends()
Get Twitter trends data.
lookup_coords()
Get coordinates of specified location.
lookup_friendships()
Lookup friendship information between two specified users.
lookup_tweets()
Get tweets data for given statuses (status IDs).
lookup_users()
Get Twitter users data for given users (user IDs or screen names).
my_friendships()
Lookup friendship information between users.
post_destroy()
Delete status of user's Twitter account [Deprecated]
post_favorite()
Favorites target status id.
post_follow() post_unfollow_user() post_mute()
Follows target Twitter user.
post_friendship()
Updates friendship notifications and retweet abilities.
post_list()
Manage Twitter lists
post_message()
Posts direct message from user's Twitter account
post_tweet()
Posts status update to user's Twitter account
stream_tweets()
Collect a live stream of Twitter data
trends_available()
Available Twitter trends along with associated WOEID.
set_expansions() tweet_expansions() user_expansions() list_expansions()
Expansions
media_fields place_fields poll_fields list_fields tweet_fields user_fields metrics_fields
Fields
tweet_counts_recent() tweet_counts_all()
Count tweets
tweet_delete()
Delete tweet
tweet_embed()
Create a Tweet Embed
tweet_get()
Get tweet information
tweet_liking_users()
Liking users
tweet_post()
Post a tweet
tweet_quoted()
Get quoted tweet information
tweet_retweeted_by()
Tweet retweeted by
tweet_search_all()
Search in the Twitter archive
tweet_search_recent()
Search recent tweets
tweet_shot()
Capture an image of a tweet/thread
tweet_threading()
Collect statuses contained in a thread
tweets_with_users() users_with_tweets()
Parsing data into tweets/users data tibbles
users_data() tweets_data()
Get tweets from users, or users from tweets
user_block() user_unblock()
Blocking or unblocking twitter users

Lists

Manage lists.

lists_members()
Get Twitter list members (users on a given list).
lists_memberships()
Get Twitter list memberships (lists containing a given user)
lists_statuses()
Get a timeline of tweets authored by members of a specified list.
lists_subscribers()
Get subscribers of a specified list.
lists_subscriptions()
Get list subscriptions of a given user but does not include the user's own lists.
lists_users()
Get all lists a specified user subscribes to, including their own.

Look for some tweet or user.

search_fullarchive() search_30day()
Premium Twitter searches
search_tweets() search_tweets2()
Get tweets data on statuses identified via search query.
search_users()
Search for users

API limits

Find which are the rate limits set by Twitter.

Authentication

Manage your authentications.

rtweet_user() rtweet_bot() rtweet_app() rtweet_bearer() rtweet_oauth2()
Authentication options
auth_as()
Set default authentication for the current session
auth_clean()
Remove tokens
auth_get()
Get the current authentication mechanism
auth_save() auth_list()
Save an authentication mechanism for use in a future session
auth_setup_default() auth_has_default()
Set up default authentication
auth_sitrep()
Twitter Tokens sitrep

Client

Manage your clients.

client_as()
Set default client for the current session
client_clean()
Clean clients
client_get()
Get the current client
client_save() client_list()
Save an authentication mechanism for use in a future session
client_has_default() client_setup_default()
Set up default client
rtweet_client()
Client

Data

emojis
Defunct: Emojis codes and descriptions data.
langs
Defunct: Language codes recognized by Twitter data.
stopwordslangs
Defunct: Twitter stop words in multiple languages data.

Data manipulation

users_data() tweets_data()
Get tweets from users, or users from tweets
entity()
Extract methods
ids()
Extract the ids
parse_stream()
Parser of stream
clean_tweets()
Clean text of tweets
as_screenname()
Mark a user id as a screen name
network_data() network_graph()
Network data
ts_plot()
Plots tweets data as a time series-like data object.
ts_data()
Converts tweets data into time series-like data object.
do_call_rbind()
Binds list of data frames while preserving attribute (tweets or users) data.
lat_lng()
Adds single-point latitude and longitude variables to tweets data.
flatten() unflatten()
flatten/unflatten data frame
round_time()
A generic function for rounding date and time values
plain_tweets()
Clean up character vector (tweets) to more of a plain text.
read_twitter_csv()
Read comma separated value Twitter data.
write_as_csv() save_as_csv()
Save Twitter data as a comma separated value file.

Retrieve tweets

Use API v2

set_expansions() tweet_expansions() user_expansions() list_expansions()
Expansions
media_fields place_fields poll_fields list_fields tweet_fields user_fields metrics_fields
Fields
tweet_counts_recent() tweet_counts_all()
Count tweets
tweet_delete()
Delete tweet
tweet_embed()
Create a Tweet Embed
tweet_get()
Get tweet information
tweet_liking_users()
Liking users
tweet_post()
Post a tweet
tweet_quoted()
Get quoted tweet information
tweet_retweeted_by()
Tweet retweeted by
tweet_search_all()
Search in the Twitter archive
tweet_search_recent()
Search recent tweets
tweet_shot()
Capture an image of a tweet/thread
tweet_threading()
Collect statuses contained in a thread
filtered_stream() stream_add_rule() stream_rm_rule() sample_stream()
Streaming

Retrieve users

Use API v2

set_expansions() tweet_expansions() user_expansions() list_expansions()
Expansions
media_fields place_fields poll_fields list_fields tweet_fields user_fields metrics_fields
Fields
user_block() user_unblock()
Blocking or unblocking twitter users
user_blocked()
Find users blocked.
user_bookmarks()
Retrieve user bookmarks
user_by_username()
Search users by username
user_followers()
Find followers.
user_following()
Find which users are being followed.
user_liked_tweets()
Liked tweets from a user
user_list_follows()
Lists a specified user follows
user_lists()
Search users by username
user_mentions()
Tweets mentioning a user
user_muted()
List muted users
user_search()
Search users
user_self()
Tweets from a user
user_timeline()
User timeline
user_tweets()
Tweets from a user

Retrieve lists

Use API v2

set_expansions() tweet_expansions() user_expansions() list_expansions()
Expansions
media_fields place_fields poll_fields list_fields tweet_fields user_fields metrics_fields
Fields
list_followers()
List followers of a specified list
list_get()
List information
list_members()
List of members from a specified List
list_membership()
Lists a specified user is a member of.
list_tweets()
Lists tweets of a specified list

Helpers for the API v2

set_expansions() tweet_expansions() user_expansions() list_expansions()
Expansions
set_fields()
Create fields
set_scopes()
Scopes of the OAuth2 token
retrieve_errors()
Expose errors of the response
links()
Create the links
rules()
Extract the streaming rules
ids()
Extract the ids