X

Interact with X

X (formerly Twitter) is a popular social media platform that enables real-time communication, content sharing, and engagement with audiences worldwide.

The X integration in Sim leverages OAuth authentication to securely connect with the X API, allowing your agents to interact with the platform programmatically. This OAuth implementation ensures secure access to X's features while maintaining user privacy and security.

With the X integration, your agents can:

  • Post content: Create new tweets, reply to existing conversations, or share media directly from your workflows
  • Monitor conversations: Track mentions, keywords, or specific accounts to stay informed about relevant discussions
  • Engage with audiences: Automatically respond to mentions, direct messages, or specific triggers
  • Analyze trends: Gather insights from trending topics, hashtags, or user engagement patterns
  • Research information: Search for specific content, user profiles, or conversations to inform agent decisions

In Sim, the X integration enables sophisticated social media automation scenarios. Your agents can monitor brand mentions and respond appropriately, schedule and publish content based on specific triggers, conduct social listening for market research, or create interactive experiences that span both conversational AI and social media engagement. By connecting Sim with X through OAuth, you can build intelligent agents that maintain a consistent and responsive social media presence while adhering to platform policies and best practices for API usage.

Usage Instructions

Integrate X into the workflow. Search tweets, manage bookmarks, follow/block/mute users, like and retweet, view trends, and more.

Tools

x_create_tweet

Create a new tweet, reply, or quote tweet on X

Input

ParameterTypeRequiredDescription
textstringYesThe text content of the tweet (max 280 characters)
replyToTweetIdstringNoTweet ID to reply to
quoteTweetIdstringNoTweet ID to quote
mediaIdsstringNoComma-separated media IDs to attach (up to 4)
replySettingsstringNoWho can reply: "mentionedUsers", "following", "subscribers", or "verified"

Output

ParameterTypeDescription
idstringThe ID of the created tweet
textstringThe text of the created tweet

x_delete_tweet

Delete a tweet authored by the authenticated user

Input

ParameterTypeRequiredDescription
tweetIdstringYesThe ID of the tweet to delete

Output

ParameterTypeDescription
deletedbooleanWhether the tweet was successfully deleted

x_search_tweets

Search for recent tweets using keywords, hashtags, or advanced query operators

Input

ParameterTypeRequiredDescription
querystringYesSearch query (supports operators like "from:", "to:", "#hashtag", "has:images", "is:retweet", "lang:")
maxResultsnumberNoMaximum number of results (10-100, default 10)
startTimestringNoOldest UTC timestamp in ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
endTimestringNoNewest UTC timestamp in ISO 8601 format
sinceIdstringNoReturns tweets with ID greater than this
untilIdstringNoReturns tweets with ID less than this
sortOrderstringNoSort order: "recency" or "relevancy"
nextTokenstringNoPagination token for next page of results

Output

ParameterTypeDescription
tweetsarrayArray of tweets matching the search query
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectSearch metadata including result count and pagination tokens
resultCountnumberNumber of results returned
newestIdstringID of the newest tweet
oldestIdstringID of the oldest tweet
nextTokenstringPagination token for next page

x_get_tweets_by_ids

Look up multiple tweets by their IDs (up to 100)

Input

ParameterTypeRequiredDescription
idsstringYesComma-separated tweet IDs (up to 100)

Output

ParameterTypeDescription
tweetsarrayArray of tweets matching the provided IDs
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets

x_get_quote_tweets

Get tweets that quote a specific tweet

Input

ParameterTypeRequiredDescription
tweetIdstringYesThe tweet ID to get quote tweets for
maxResultsnumberNoMaximum number of results (10-100, default 10)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
tweetsarrayArray of quote tweets
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_hide_reply

Hide or unhide a reply to a tweet authored by the authenticated user

Input

ParameterTypeRequiredDescription
tweetIdstringYesThe reply tweet ID to hide or unhide
hiddenbooleanYesSet to true to hide the reply, false to unhide

Output

ParameterTypeDescription
hiddenbooleanWhether the reply is now hidden

x_get_user_tweets

Get tweets authored by a specific user

Input

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose tweets to retrieve
maxResultsnumberNoMaximum number of results (5-100, default 10)
paginationTokenstringNoPagination token for next page of results
startTimestringNoOldest UTC timestamp in ISO 8601 format
endTimestringNoNewest UTC timestamp in ISO 8601 format
sinceIdstringNoReturns tweets with ID greater than this
untilIdstringNoReturns tweets with ID less than this
excludestringNoComma-separated types to exclude: "retweets", "replies"

Output

ParameterTypeDescription
tweetsarrayArray of tweets by the user
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
newestIdstringID of the newest tweet
oldestIdstringID of the oldest tweet
nextTokenstringToken for next page
previousTokenstringToken for previous page

x_get_user_mentions

Get tweets that mention a specific user

Input

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose mentions to retrieve
maxResultsnumberNoMaximum number of results (5-100, default 10)
paginationTokenstringNoPagination token for next page of results
startTimestringNoOldest UTC timestamp in ISO 8601 format
endTimestringNoNewest UTC timestamp in ISO 8601 format
sinceIdstringNoReturns tweets with ID greater than this
untilIdstringNoReturns tweets with ID less than this

Output

ParameterTypeDescription
tweetsarrayArray of tweets mentioning the user
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
newestIdstringID of the newest tweet
oldestIdstringID of the oldest tweet
nextTokenstringToken for next page
previousTokenstringToken for previous page

x_get_user_timeline

Get the reverse chronological home timeline for the authenticated user

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
maxResultsnumberNoMaximum number of results (1-100, default 10)
paginationTokenstringNoPagination token for next page of results
startTimestringNoOldest UTC timestamp in ISO 8601 format
endTimestringNoNewest UTC timestamp in ISO 8601 format
sinceIdstringNoReturns tweets with ID greater than this
untilIdstringNoReturns tweets with ID less than this
excludestringNoComma-separated types to exclude: "retweets", "replies"

Output

ParameterTypeDescription
tweetsarrayArray of timeline tweets
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
newestIdstringID of the newest tweet
oldestIdstringID of the oldest tweet
nextTokenstringToken for next page
previousTokenstringToken for previous page

x_manage_like

Like or unlike a tweet on X

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
tweetIdstringYesThe tweet ID to like or unlike
actionstringYesAction to perform: "like" or "unlike"

Output

ParameterTypeDescription
likedbooleanWhether the tweet is now liked

x_manage_retweet

Retweet or unretweet a tweet on X

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
tweetIdstringYesThe tweet ID to retweet or unretweet
actionstringYesAction to perform: "retweet" or "unretweet"

Output

ParameterTypeDescription
retweetedbooleanWhether the tweet is now retweeted

x_get_liked_tweets

Get tweets liked by a specific user

Input

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose liked tweets to retrieve
maxResultsnumberNoMaximum number of results (5-100)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
tweetsarrayArray of liked tweets
idstringTweet ID
textstringTweet content
createdAtstringCreation timestamp
authorIdstringAuthor user ID
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_get_liking_users

Get the list of users who liked a specific tweet

Input

ParameterTypeRequiredDescription
tweetIdstringYesThe tweet ID to get liking users for
maxResultsnumberNoMaximum number of results (1-100, default 100)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of users who liked the tweet
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_get_retweeted_by

Get the list of users who retweeted a specific tweet

Input

ParameterTypeRequiredDescription
tweetIdstringYesThe tweet ID to get retweeters for
maxResultsnumberNoMaximum number of results (1-100, default 100)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of users who retweeted the tweet
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectMetadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_get_bookmarks

Get bookmarked tweets for the authenticated user

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
maxResultsnumberNoMaximum number of results (1-100)
paginationTokenstringNoPagination token for next page of results

Output

ParameterTypeDescription
tweetsarrayArray of bookmarked tweets
idstringTweet ID
textstringTweet text content
createdAtstringTweet creation timestamp
authorIdstringAuthor user ID
conversationIdstringConversation thread ID
inReplyToUserIdstringUser ID being replied to
publicMetricsobjectEngagement metrics
retweetCountnumberNumber of retweets
replyCountnumberNumber of replies
likeCountnumberNumber of likes
quoteCountnumberNumber of quotes
includesobjectAdditional data including user profiles
usersarrayArray of user objects referenced in tweets
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
newestIdstringID of the newest tweet
oldestIdstringID of the oldest tweet
nextTokenstringToken for next page
previousTokenstringToken for previous page

x_create_bookmark

Bookmark a tweet for the authenticated user

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
tweetIdstringYesThe tweet ID to bookmark

Output

ParameterTypeDescription
bookmarkedbooleanWhether the tweet was successfully bookmarked

x_delete_bookmark

Remove a tweet from the authenticated user

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
tweetIdstringYesThe tweet ID to remove from bookmarks

Output

ParameterTypeDescription
bookmarkedbooleanWhether the tweet is still bookmarked (should be false after deletion)

x_get_me

Get the authenticated user

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
userobjectAuthenticated user profile
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets

x_search_users

Search for X users by name, username, or bio

Input

ParameterTypeRequiredDescription
querystringYesSearch keyword (1-50 chars, matches name, username, or bio)
maxResultsnumberNoMaximum number of results (1-1000, default 100)
nextTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of users matching the search query
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectSearch metadata
resultCountnumberNumber of results returned
nextTokenstringPagination token for next page

x_get_followers

Get the list of followers for a user

Input

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose followers to retrieve
maxResultsnumberNoMaximum number of results (1-1000, default 100)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of follower user profiles
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_get_following

Get the list of users that a user is following

Input

ParameterTypeRequiredDescription
userIdstringYesThe user ID whose following list to retrieve
maxResultsnumberNoMaximum number of results (1-1000, default 100)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of users being followed
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_manage_follow

Follow or unfollow a user on X

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
targetUserIdstringYesThe user ID to follow or unfollow
actionstringYesAction to perform: "follow" or "unfollow"

Output

ParameterTypeDescription
followingbooleanWhether you are now following the user
pendingFollowbooleanWhether the follow request is pending (for protected accounts)

x_manage_block

Block or unblock a user on X

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
targetUserIdstringYesThe user ID to block or unblock
actionstringYesAction to perform: "block" or "unblock"

Output

ParameterTypeDescription
blockingbooleanWhether you are now blocking the user

x_get_blocking

Get the list of users blocked by the authenticated user

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
maxResultsnumberNoMaximum number of results (1-1000)
paginationTokenstringNoPagination token for next page

Output

ParameterTypeDescription
usersarrayArray of blocked user profiles
idstringUser ID
usernamestringUsername without @ symbol
namestringDisplay name
descriptionstringUser bio
profileImageUrlstringProfile image URL
verifiedbooleanWhether the user is verified
metricsobjectUser statistics
followersCountnumberNumber of followers
followingCountnumberNumber of users following
tweetCountnumberTotal number of tweets
metaobjectPagination metadata
resultCountnumberNumber of results returned
nextTokenstringToken for next page

x_manage_mute

Mute or unmute a user on X

Input

ParameterTypeRequiredDescription
userIdstringYesThe authenticated user ID
targetUserIdstringYesThe user ID to mute or unmute
actionstringYesAction to perform: "mute" or "unmute"

Output

ParameterTypeDescription
mutingbooleanWhether you are now muting the user

Get trending topics for a specific location by WOEID (e.g., 1 for worldwide, 23424977 for US)

Input

ParameterTypeRequiredDescription
woeidstringYesYahoo Where On Earth ID (e.g., "1" for worldwide, "23424977" for US, "23424975" for UK)
maxTrendsnumberNoMaximum number of trends to return (1-50, default 20)

Output

ParameterTypeDescription
trendsarrayArray of trending topics
trendNamestringName of the trending topic
tweetCountnumberNumber of tweets for this trend

Get personalized trending topics for the authenticated user

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
trendsarrayArray of personalized trending topics
trendNamestringName of the trending topic
postCountnumberNumber of posts for this trend
categorystringCategory of the trend
trendingSincestringISO 8601 timestamp of when the topic started trending

x_get_usage

Get the API usage data for your X project

Input

ParameterTypeRequiredDescription
daysnumberNoNumber of days of usage data to return (1-90, default 7)

Output

ParameterTypeDescription
capResetDaynumberDay of month when usage cap resets
projectIdstringThe project ID
projectCapnumberThe project tweet consumption cap
projectUsagenumberTotal tweets consumed in current period
dailyProjectUsagearrayDaily project usage breakdown
datestringUsage date in ISO 8601 format
usagenumberNumber of tweets consumed
dailyClientAppUsagearrayDaily per-app usage breakdown
clientAppIdstringClient application ID
usagearrayDaily usage entries for this app
datestringUsage date in ISO 8601 format
usagenumberNumber of tweets consumed

On this page

Start building today
Trusted by over 70,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started