Enhanced Twitter (X) Bot avatar
Enhanced Twitter (X) Bot

Pricing

Pay per event

Go to Apify Store
Enhanced Twitter (X) Bot

Enhanced Twitter (X) Bot

Developed by

Emmanuel Uchenna

Emmanuel Uchenna

Maintained by Community

A versatile Twitter bot for powerful social media automation. This tool uses the Twitter API to auto-like, auto-follow, and manage your followers. Configure keywords, schedules, and safety limits for effective Twitter engagement and account growth.

5.0 (1)

Pricing

Pay per event

2

2

2

Last modified

8 days ago

Overview

The Enhanced Twitter (X) Bot is a powerful and customizable automation tool designed to manage and grow your Twitter (X) account. With built-in anti-detection and safety features, this bot can perform a variety of actions to increase your account's visibility and engagement while minimizing the risk of suspension.

Key Features

  • Engagement Automation: Automatically likes and follows accounts based on user-defined keywords and probability settings.
  • Follower Management: Efficiently follows back new followers and can periodically clean up non-followers.
  • Scheduled Tweets: Posts "boost" or promotional tweets at set intervals.
  • Robust Anti-Detection: Includes configurable delays, random activity patterns, and rate limit compliance to mimic human behavior.
  • Comprehensive Logging: Tracks all bot actions, API responses, and performance statistics for easy monitoring.

Prerequisites and Installation

To use this actor, you will need a Twitter (X) Developer Account and a set of API credentials.

Getting Twitter API Credentials

  1. Apply for a Twitter Developer Account: Navigate to the Twitter Developer Portal and apply for a Developer account. You will need to explain your intended use of the API, so be sure to describe the functionality of this bot (e.g., automating engagement, scheduled tweets).

  2. Create a New Project and App: Once your developer account is approved, create a new Project and a new App within the developer portal. Name your app and project descriptively (e.g., "Twitter Automation Bot").

  3. Generate Your Credentials: Under the "Keys and tokens" section of your app, you will find four essential keys and tokens. These are your secrets and should be handled with care.

    • Consumer Key (consumer_key) and Consumer Secret (consumer_secret): These are your unique API keys.
    • Access Token (access_token) and Access Token Secret (access_token_secret): These grant you access to your specific Twitter account.
    • Bearer Token (bearer_token): This is a special key for read-only access to the Twitter API v2. It is optional for the bot's core functionality but can be used for more advanced features.

    You will be prompted to generate these keys. Make sure to copy them immediately as they will not be shown again.

Twitter-dev.png


Input Parameters

The bot's behavior is controlled by the following input parameters, which you can configure in the Apify console:

Twitter API Credentials

  • consumer_key (string, required): The API key for your Twitter developer account.
  • consumer_secret (string, required): The API secret for your Twitter developer account.
  • access_token (string, required): The access token for your Twitter user account.
  • access_token_secret (string, required): The access token secret for your Twitter user account.
  • bearer_token (string, optional): The bearer token for Twitter API v2 requests.

Bot Intervals

  • tweet_interval (integer): The time in seconds between each promotional tweet.
  • search_interval (integer): The time in seconds between each keyword search.
  • follow_check_interval (integer): The time in seconds between checks for new followers to follow back.
  • cleanup_interval (integer): The time in seconds between cleanup runs (unfollowing non-followers).

Action Delays

  • min_action_delay (integer): The minimum random delay in seconds between actions like liking or following.
  • max_action_delay (integer): The maximum random delay in seconds between actions.
  • min_follow_delay (integer): The minimum random delay in seconds between consecutive follow actions.
  • max_follow_delay (integer): The maximum random delay in seconds between consecutive follow actions.

Engagement Settings

  • keywords (array of strings): A list of keywords to search for tweets.
  • like_probability (string, e.g., "0.3"): The probability (from 0.0 to 1.0) of liking a found tweet.
  • follow_probability (string, e.g., "0.1"): The probability (from 0.0 to 1.0) of following the author of a found tweet.
  • enable_engagement (boolean): Enables or disables keyword-based liking and following.

Tweet Automation

  • enable_boost_tweets (boolean): Enables or disables periodic "boost" tweets.
  • boost_message (string): The message to be used for the periodic "boost" tweets.

Follower Management

  • enable_follow_back (boolean): Enables or disables automatically following back new followers.
  • enable_cleanup (boolean): Enables or disables unfollowing users who do not follow you back.
  • enable_unfollow (boolean): A safety feature to prevent accidental mass unfollowing.

Daily Limits

  • max_follows_per_day (integer): The maximum number of users the bot will follow in a single day.
  • max_likes_per_day (integer): The maximum number of tweets the bot will like in a single day.
  • max_tweets_per_day (integer): The maximum number of tweets the bot will post in a single day.

General Settings

  • woeid (integer): The "Where On Earth" Identifier for Twitter trends. 1 is for worldwide.
  • language (string): The language code for searches and interactions (e.g., 'en').
  • report_file (string): The name of the file to save bot analytics to.
  • performance_threshold (string): The minimum engagement rate to consider the bot's performance successful.

Input GIF


Output Structure

The bot's output is primarily delivered through logs and is not a JSON dataset. During the run, the bot prints real-time updates to the console and also saves detailed logs to a file named twitter_bot.log.

Console and Log Output The logs provide a clear history of all bot actions, including:

  • Authentication status and session management.
  • Searches performed and the number of tweets found.
  • Follow, like, and tweet actions taken.
  • Information on unfollows during a cleanup run.
  • API responses and error messages (e.g., rate limit notices).
  • Hourly statistics on follower count, following count, and other engagement metrics.

Example Tweet

https://x.com/Eunit99Designs/status/1967893851890233634


Miscellaneous

Please be mindful of Twitter's developer policy and terms of service. Excessive or aggressive automation can lead to account suspension. This bot includes safety features to help mitigate this risk, but it is ultimately the user's responsibility to use it within the platform's guidelines.

Your feedback

We are always working on improving the performance of our Actors. So if you’ve got any technical feedback for the Enhanced Twitter (X) Bot Actor or simply found a bug, please create an issue on the Actor’s Issues tab in Apify Console.

Download

📄 Download this guide in PDF format 👉 Download PDF