TwexAPI REST API
TwexAPI exposes a REST API at https://api.twexapi.io for X/Twitter search, profiles, followers, posting, DMs, and agent integrations.
Capabilities include:
- Search — Advanced search, hashtags, cashtags
- Tweets — Post, like, retweet, quote, bookmark, delete
- Users — Batch user information retrieval
- Influencers — Get tweets from top influencers
All endpoints return a consistent envelope with code, msg, and data fields. See Error Handling for status codes and recovery.
Authentication
Send your API key on every request:
Authorization: Bearer YOUR_API_KEY
Write actions also require a Twitter cookie or auth_token. See Authentication for setup examples.
Version 1.0.0
Base URL
https://api.twexapi.ioCookie Endpoints
- GETGet cookie by auth token
/twitter/{auth_token}/cookie - GETGet user info by auth token
/twitter/{auth_token}/user_info
Search Endpoints
- POSTAdvanced Twitter Search by Page (Twitter Scraper API)
/twitter/advanced_search/page - POSTSearch Cashtags
/twitter/cashtags - POSTSearch Hashtags
/twitter/hashtags - POSTSearch Paid Partnership Tweets
/twitter/search/paid_partnerships - POSTCheck Shadowban and Reply Visibility
/twitter/shadowban/check
Tweet Actions Endpoints
- POSTLike a Tweet
/twitter/tweets/{tweet_id}/like - DELETEUnlike a Tweet
/twitter/tweets/{tweet_id}/like - POSTRetweet a Tweet
/twitter/tweets/{tweet_id}/retweet - DELETEDelete Retweet
/twitter/tweets/{tweet_id}/retweet - POSTCreate a Tweet Thread
/v3/twitter/tweets/create-thread - POSTCreate a Tweet or Reply
/twitter/tweets/create - POSTCreate a Quote Tweet
/twitter/tweets/quote - POSTBookmark a Tweet
/twitter/tweets/{tweet_id}/bookmark - DELETEDelete Bookmark
/twitter/tweets/{tweet_id}/bookmark - POSTDelete One or More Tweets
/twitter/tweets/delete-batch
Users Endpoints
- POSTGet Multiple Users by Usernames
/twitter/users - POSTBlock a User
/twitter/user/block - DELETEUnblock User
/twitter/user/block - POSTUsers Details by ID
/twitter/users/by_ids - POSTVerify Account Status
/x/account/verify - POSTBatch Get User account status
/twitter/users/status - GETSearch User
/twitter/search-user/{keyword}/{target_count} - POSTFollow User
/twitter/user/follow - DELETEUnfollow User
/twitter/user/follow
Followers & Following Endpoints
- GETGet Followers
/twitter/followers/{screen_name}/{count} - GETGet Followers Task Status
/twitter/followers/task/{task_id}/status - GETConsume Next Page of Followers Task
/twitter/followers/task/{task_id}/next - POSTGet Followers by Page
/twitter/followers/page - POSTGet Following by Page
/twitter/following/page - GETGet Following
/twitter/following/{screen_name}/{count} - GETGet Following Task Status
/twitter/following/task/{task_id}/status - GETConsume Next Page of Following Task
/twitter/following/task/{task_id}/next - POSTGet Following (v3)
/v3/twitter/users/following - POSTGet Followers (v3 Cursor-Based Scraping)
/v3/twitter/users/followers - POSTGet Verified Followers
/v3/twitter/users/verified-followers
Tweet Replies Endpoints
- POSTGet Replies by Page (Recommended)
/twitter/tweets/{tweet_id}/replies/page - GETGet Replies by Tweet ID (Legacy)
/twitter/tweets/{tweet_id}/replies/{count}
DM Endpoints
- POSTCheck DM Permissions (V2)
/v2/dm/status - POSTSend DM (XChat v3)
/v3/twitter/send-dm - POSTGet DM History (XChat v3)
/v3/twitter/dm-history - POSTGet DM Media (XChat v3)
/v3/twitter/dm-media - POSTGet Conversations (XChat v3)
/v3/twitter/conversations
Article Endpoints
- POSTBatch Fetch X Articles
/x/article - GETFetch X (Twitter) Article as Clean Markdown
/x/article/{tweet_id}/markdown - POST[Step 1/5] Create a new article draft
/x/articles/draft - PUT[Step 2/5] Upload and set article cover image (optional)
/x/articles/{article_id}/cover - PUT[Step 3/5] Set article title
/x/articles/{article_id}/title - PUT[Step 4/5] Set article content from Markdown
/x/articles/{article_id}/content - POST[Step 5/5] Publish an article draft
/x/articles/{article_id}/publish - POST[Quick] One-step article publish
/x/articles/publish - POSTGet User Articles by Page
/twitter/{screen_name}/articles/page
Tweets Endpoints
- POSTGet Tweet Detail (v2)
/v2/tweet/detail - POSTGet Tweet Thread by ID
/twitter/tweets/thread_by_id - POSTBatch Get Tweets by ID
/twitter/tweets/lookup - GETGet Similar Tweets
/twitter/tweets/{tweet_id}/similar
Grok Endpoints
- POSTAsk Grok
/v3/twitter/grok/ask - POSTGet Grok History
/v3/twitter/grok/history - POSTGet Grok Conversation
/v3/twitter/grok/conversation
Tweet Engagement Endpoints
- POSTGet Retweeters by Page
/twitter/tweets/retweeters/page - POSTGet Favoriters
/twitter/tweets-favoriters - POSTGet Quote Tweets by Page
/twitter/tweets/quotes/page
Lists Endpoints
- POSTCreate List
/twitter/list/create - POSTGet List Tweets by Page
/twitter/list/tweets/page - GETGet List Subscribers
/twitter/list/{list_id}/subscribers/{target_count} - POSTGet List Members by Page
/twitter/list/members/page - POSTSearch List
/twitter/list/search
Communities Endpoints
- POSTGet Community Members by Page
/twitter/community/members/page - POSTGet Community Tweets by Page
/twitter/community/tweets/page - POSTSearch Community
/twitter/community/search - GETGet Community
/twitter/community/{community_id} - POSTSearch Community Tweets
/twitter/community/search-tweets
Twitter Profile Actions Endpoints
Trending Endpoints
- GETList Global Trend Countries
/twitter/global-trending/countries - GETList Global Trend Topics
/twitter/global-trending/topics - GETList Global Trend Content Tags
/twitter/global-trending/contents - GETGet Global Trending Tweets
/twitter/global-trending/tweets - GETGet Trending Topics
/twitter/{country}/trending