Avoid sending too many requests
Sending too many requests in a short period is one of the most common triggers for account suspension. Twitter monitors request patterns and flags suspicious behavior.Rate limit compliance
Respect Twitter’s rate limits to avoid getting stuck or suspended. Twikit includes built-in rate limit tracking - check the rate limits documentation for details. Do not:- Send consecutive requests without delays
- Max out rate limits repeatedly
- Use tight loops for continuous scraping
- Add delays between requests
- Implement exponential backoff for retries
- Monitor rate limit headers
- Spread requests over longer time periods
Implement cooldown periods
Allow time for cooldown between batches of requests:Reuse login information
Repeated logins are closely monitored by Twitter and can quickly trigger security alerts. The act of calling thelogin() method repeatedly should be avoided at all costs.
Save and load cookies
Use thesave_cookies and load_cookies methods to persist sessions:
First time - Login and save:
See the Cookies Management guide for detailed information on session persistence.
Automatic cookie handling
Use thecookies_file parameter for automatic cookie management:
Do not send too many messages
Twitter monitors direct messages carefully, and excessive messaging is a major red flag for automated behavior.Message sending guidelines
Avoid:- Mass messaging multiple users in quick succession
- Sending identical or very similar messages
- Messaging users who haven’t interacted with you
- Automated message campaigns
- Limit daily message volume (e.g., max 50 messages per day)
- Personalize each message
- Only message users who have engaged with you
- Add significant delays between messages (5-10 minutes)
- Respond to incoming messages naturally
Don’t tweet sensitive content
Avoid tweeting content that violates Twitter’s terms of service, as this can lead to immediate suspension.Content to avoid
- Sexual content: Explicit or adult content
- Violence: Graphic violence, threats, or violent content
- Political extremism: Extreme political views or misinformation
- Discrimination: Content targeting protected groups
- Hate speech: Hateful or abusive content
- Spam: Repetitive, low-quality, or promotional content
- Impersonation: Pretending to be someone else
- Copyright violations: Using others’ content without permission
Safe tweeting practices
What triggers Twitter’s anti-bot detection
Understanding what triggers Twitter’s security systems helps you avoid suspicious behavior.Common triggers
Excessive request rates
Making requests too quickly or hitting rate limits repeatedly signals automated behavior.Solution: Add delays, implement rate limiting, spread requests over time.
Repeated logins
Logging in multiple times per day, especially from different IPs.Solution: Save and reuse cookies, avoid calling
login() repeatedly.Suspicious patterns
Robotic behavior like identical actions at exact intervals.Solution: Randomize delays, vary your actions, mimic human behavior.
Multiple accounts from same IP
Running many accounts from a single IP address.Solution: Use proxies, limit accounts per IP, rotate IPs.
Mass actions
Bulk following, unfollowing, liking, or retweeting.Solution: Limit daily actions, add delays, behave naturally.
Automation guidelines
Follow these guidelines when automating Twitter actions:Daily limits
Stay well below these approximate daily limits:- Tweets: Max 50 tweets per day (including retweets)
- Follows: Max 400 follows per day
- Unfollows: Max 400 unfollows per day
- Likes: Max 1,000 likes per day
- Direct messages: Max 50 messages per day
- API requests: Respect rate limits (see rate limits documentation)
These are conservative estimates. Your actual safe limits may be lower, especially for new accounts.
Randomization
Add randomness to avoid robotic patterns:Account warm-up
For new accounts, gradually increase activity:Use residential proxies
When using proxies, prefer residential proxies over datacenter proxies:Monitoring and safety checks
Implement monitoring to detect potential issues early:Summary checklist
Use this checklist to ensure you’re following best practices:- Add delays between all requests (minimum 5-10 seconds)
- Save cookies and avoid repeated logins
- Stay well below daily action limits
- Randomize delays and behavior patterns
- Use residential proxies when possible
- Avoid sensitive or controversial content
- Limit direct messages (max 50/day)
- Warm up new accounts gradually
- Monitor for rate limits and errors
- Implement proper error handling
- Test with a disposable account first
- Never run multiple accounts from same IP without proxies
