Skip to navigation

X

Connect your AI agents to X.
Ready to connect

Connects with credentials the end user enters, such as an API key, so you don’t need to register an OAuth app.

Authentication: OAuth or bearer token. See Magic Link for the runtime auth flow, or Application credentials to bring your own OAuth app.

Sample use cases

  • Pull the engagement on our last 10 tweets and rank by impressions.
  • Search for mentions of our brand in the last 24 hours not yet replied to.
  • Post the launch announcement and pin it to the company profile.

Available Tools

like_post

Like a post/tweet by its ID. Requires like.write scope.

unlike_post

Unlike a post/tweet by its ID. Removes your like from the post.

retweet

Retweet a post by its ID. Shares the post with your followers.

unretweet

Undo a retweet by its original tweet ID. Removes the retweet from your profile.

add_bookmark

Bookmark a post/tweet for later. Private bookmarks are only visible to you.

remove_bookmark

Remove a post from your bookmarks by its tweet ID.

get_bookmarks

Get your bookmarked posts. Returns up to 100 posts per page with pagination.

get_liking_users

Get users who liked a tweet. Returns up to 100 users with pagination.

get_liked_tweets

Get tweets a user has liked. Use get_me first to get your own user ID.

get_retweeters

Get users who retweeted a post. Returns up to 100 users.

get_quote_tweets

Get quote tweets of a post. Returns tweets that quote the specified tweet.

create_post

Create a new post/tweet. Max 280 chars. Supports replies (reply_to_tweet_id), quotes (quote_tweet_id), and polls (2-4 options).

delete_post

Delete a post/tweet by its ID. You can only delete your own posts.

get_post

Get a single post/tweet by its ID. Returns text, author, metrics, and referenced tweets.

search_recent_posts

Search posts from the last 7 days. Supports operators: from:user, to:user, -is:retweet, has:media, lang:en. Max 100 results per page.

follow_user

Follow a user by their user ID. Use get_user_by_username first if you only have the @handle.

unfollow_user

Unfollow a user by their user ID. Also cancels pending follow requests.

mute_user

Mute a user by their user ID. Their posts won’t appear in your timeline but they can still follow you.

unmute_user

Unmute a user by their user ID. Their posts will appear in your timeline again.

get_muted_users

Get your list of muted users. Muted users’ posts don’t appear in your timeline.

get_user_tweets

Get a user’s recent tweets by user ID. Can exclude retweets/replies. Use get_me first to get your own user ID.

get_user_mentions

Get tweets that mention a user by their user ID. Use get_me first to get mentions of yourself.

get_me

Get the authenticated user’s profile including ID, username, name, bio, and metrics. Use this first to get your user ID for other operations.

get_user_by_id

Get a user’s profile by their unique ID. Returns username, name, bio, follower counts, and verification status.

get_user_by_username

Get a user’s profile by @username (without the @ symbol). Returns ID, name, bio, metrics, and verification status.

get_followers

Get a list of users who follow the specified user. Returns up to 1000 followers per request with pagination.

get_following

Get a list of users that the specified user follows. Returns up to 1000 accounts per request with pagination.