X (Twitter)
Description: Enable agents to interact with X (formerly Twitter).
Author: Arcade
Code: GitHub
Auth: User authorization via the X auth provider
The Arcade X (Twitter) toolkit provides a pre-built set of tools for interacting with X (formerly Twitter). These tools make it easy to build agents and AI apps that can:
- Post tweets
- Delete tweets
- Search for tweets by username
- Search for tweets by keywords
- Look up a user by username
Install
pip install arcade_x
pip installing the toolkit is only needed if you are self-hosting Arcade. You do not need to install the toolkit if you’re using Arcade Cloud.
Available Tools
These tools are currently available in the Arcade X toolkit.
Tool Name | Description |
---|---|
PostTweet | Post a tweet to X (Twitter). |
DeleteTweetById | Delete a tweet on X (Twitter). |
SearchRecentTweetsByUsername | Search recent tweets by username. |
SearchRecentTweetsByKeywords | Search recent tweets by keywords or phrases. |
LookupSingleUserByUsername | Look up a user on X (Twitter) by username. |
If you need to perform an action that’s not listed here, you can get in touch with us to request a new tool, or create your own tools with the X auth provider.
PostTweet
Post a tweet to X (Twitter).
Parameters
tweet_text
(string, required) The text content of the tweet you want to post.
DeleteTweetById
Delete a tweet on X (Twitter).
Parameters
tweet_id
(string, required) The ID of the tweet you want to delete.
SearchRecentTweetsByUsername
Search for recent tweets (last 7 days) on X (Twitter) by username. Includes replies and reposts.
Parameters
username
(string, required) The username of the X (Twitter) user to look up.max_results
(integer, optional, Defaults to 10) The maximum number of results to return. Cannot be less than 10.next_token
(string, optional) The pagination token starting from which to return results.
SearchRecentTweetsByKeywords
Search for recent tweets (last 7 days) on X (Twitter) by required keywords and phrases. Includes replies and reposts.
At least one of the following parameters must be provided: keywords
, phrases
.
Parameters
keywords
(array of strings, optional) List of keywords that must be present in the tweet.phrases
(array of strings, optional) List of phrases that must be present in the tweet.max_results
(integer, optional, Defaults to 10) The maximum number of results to return. Cannot be less than 10.
LookupTweetById
Look up a tweet on X (Twitter) by its ID.
Parameters
tweet_id
(string, required) The ID of the tweet to look up.
LookupSingleUserByUsername
Look up a user on X (Twitter) by their username.
Parameters
username
(string, required) The username of the X (Twitter) user to look up.
Auth
The Arcade X (Twitter) toolkit uses the X auth provider to connect to users’ X (formerly Twitter) accounts.
With the hosted Arcade Engine, there’s nothing to configure. Your users will see Arcade
as the name of the application that’s requesting permission.
With a self-hosted installation of Arcade, you need to configure the X auth provider with your own X (formerly Twitter) app credentials.