X (Twitter)
Description: Enable agents to interact with X (formerly Twitter).
Author: Arcade AI
Code: GitHub
Auth: OAuth2
The Arcade AI 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
Available Tools
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.
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.
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 AI X (Twitter) toolkit uses the X auth provider to connect to users' X (formerly Twitter) accounts.
With the hosted Arcade AI Engine, there's nothing to configure. Your users will see Arcade AI (demo)
as the name of the application that's requesting permission.
The hosted Arcade Engine is intended for demo and testing purposes only, not for production use. To use Arcade AI and X (formerly Twitter) in production, you must use a self-hosted instance of the Arcade Engine.
With a self-hosted installation of Arcade AI, you need to configure the X auth provider with your own X (formerly Twitter) app credentials.