X.com (Twitter) API Hub avatar
X.com (Twitter) API Hub
Under maintenance

Pricing

Pay per event

Go to Apify Store
X.com (Twitter) API Hub

X.com (Twitter) API Hub

Under maintenance

This Actor is a robust, production-ready wrapper for the X API v2, now powered by Tweepy for maximum reliability. It is designed to act as a central hub for automation workflows (Make.com, Zapier, n8n) or data pipelines. Comprehensive API Coverage: supports a wide range of v1.1 and v2 endpoints.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Visita AI & Automation

Visita AI & Automation

Maintained by Community

Actor stats

1

Bookmarked

3

Total users

1

Monthly active users

2 days ago

Last modified

Share

X.com (Twitter) API Hub ๐Ÿš€

This Actor is a robust, production-ready wrapper for the X API v2, now powered by Tweepy for maximum reliability. It is designed to act as a central hub for your automation workflows (Make.com, Zapier, n8n) or data pipelines.

Instead of managing complex OAuth, media uploads, and error parsing, simply select an action, provide your keys, and let the Actor handle the rest.

๐ŸŒŸ Key Features

  • Comprehensive API Coverage: Now supports a wide range of v1.1 and v2 endpoints:
    • Tweets: Post (with media), Delete, Like, Retweet
    • Users & Graphs: Follow, Block, Mute, User Lookups, Get "Me"
    • Direct Messages (DMs): Send, Create Conversation
    • Tweet Search: Recent Search and Full-Archive Search
    • Spaces: Search Spaces, Get Space by ID, Get Spaces by Creator IDs
    • Communities: Search Communities, Get Community by ID
    • Trends: Get by Location (WOEID) and Personalized Trends (for Premium users)
    • Community Notes: Create notes and search for eligible posts (requires AI Writer role)
    • API Usage: Programmatically check your project's Tweet usage
  • Powered by Tweepy: Uses the industry-standard tweepy library for robust, reliable connections and authentication.
  • Smart Authentication: Automatically switches between User Context (OAuth 1.0a) and App-Only Context (OAuth 2.0) based on the action you select.
  • Media Uploads: Built-in support for uploading images, videos, and GIFs from public URLs.
  • Human-Readable Errors: Translates cryptic X API error codes into clear, actionable advice.

โš ๏ธ A Note on Community Notes Actions

This Hub includes actions to notes_create_note and notes_search_eligible_posts. Please be aware that these specific endpoints require the authenticating user's X account to be enrolled in the Community Notes program as an AI Note Writer.

The actions are included for all users who have this role. If you attempt to use them without this role, the API will return a "Forbidden" error, which the actor will log.


๐Ÿ› ๏ธ Prerequisites: How to get your X.com API Keys

To use this Actor, you must have your own keys from the X Developer Portal. This Actor acts as a secure and convenient tool for using your keys.

Here is a step-by-step guide to getting your credentials:

  1. Go to the X Developer Portal: Navigate to developer.x.com and sign in with your X.com account.
  2. Sign up for a Developer Account: You will need to answer a few questions about your intended use.
  3. Create a Project and an App: During the onboarding process, you will be prompted to create a Project and an App within that project. Give your App a name (e.g., "Apify-Automation-Hub").
  4. Configure App Settings: This is the most critical step.
    • Go to your App's settings and find the User authentication settings.
    • Enable OAuth 1.0a.
    • Set "App permissions" to Read and Write (or Read, Write, and Direct Messages if you plan to use DMs).
  5. Generate Your Keys: Navigate to the "Keys and tokens" tab for your App. You will need to generate and copy all three sets of credentials:
    • API Key and Secret: (Also called Consumer Keys)
    • Bearer Token: (Used for App-Only requests like Search, Spaces, Trends)
    • Access Token and Secret: (Used for User Context actions like posting, DMs, and Community Notes)

Note: Save these keys in a secure location. You will not be able to see them again after the initial generation. You will paste these keys into the "Authentication" section of this Actor's input.


๐Ÿ’ธ X.com API Tiers and Pricing

This Actor's price (your Apify usage) does not include the cost of the X.com API. You are responsible for subscribing to the correct X.com API tier and staying within its limits.

The X.com API has several access levels. Here are the most common ones:

TierPrice (USD/month)Write Limit (Posts/month)Key Features
Free$0500For testing only. 1 App.
Basic$20050,000For hobbyists and prototypes. 2 Apps.
Pro$5,000300,000For startups. 3 Apps. Includes full-archive search.
EnterpriseCustomCustomFor large-scale business needs.

This Actor is built to work with all tiers, but the actions you can perform (like full_archive_search) depend on the tier you've subscribed to.


๐Ÿ“š How to Use

Simply select your API Tier and the Action you wish to perform from the dropdowns. Then, fill in the Action Parameters (like text for a post or searchQuery for a search) and provide your keys in the Authentication section.

Input

See the Input tab for the full schema of all available actions and parameters.

Output

The Actor stores a log of each action in the Apify Dataset. Each item represents the result of a single action.

Example Output (Success):

{
"action": "post_tweet",
"timestamp": "2025-11-16T10:03:43.930Z",
"status": "success",
"data": {
"id": "1933207126262096118",
"text": "hello",
"edit_history_tweet_ids": ["1933207126262096118"]
},
"error": null
}

Example Output (Failure):

{
"action": "post_tweet",
"timestamp": "2025-11-16T10:00:54.324Z",
"status": "failed",
"data": null,
"error": "Invalid Request: One or more parameters to your request was invalid. --- **ADVICE:** The actor sent invalid data. One or more parameters to your request was invalid."
}

โ„น๏ธ For More Information

For complete details on API tiers, rate limits, and what you can do with the X.com API, please refer to the official: