An Instagram automation bot that automatically likes posts, reels, and stories from a target account.
Built for educational purposes to demonstrate Instagram API automation and Python programming concepts.
THIS TOOL VIOLATES INSTAGRAM'S TERMS OF SERVICE
Instagram explicitly prohibits automated actions and use of unofficial APIs. By using this bot, you are:
- Breaking Instagram's Terms of Service
- Using reverse-engineered private APIs
- Engaging in activity Instagram considers inauthentic
⚠️ Temporary action blocks (hours to days)⚠️ Account restrictions or temporary bans⚠️ Permanent account suspension⚠️ IP-based blocking
✅ Sharing this code is legal - Similar tools exist on GitHub
❌ Not recommended for your main account - Use at your own risk
For educational purposes only. The author is not responsible for any consequences of using this software.
- 🔐 Automatic authentication with session persistence
- ❤️ Likes posts from target account (filtered by date)
- 🎬 Likes reels from target account (filtered by date)
- 📸 Likes stories from target account
- 📅 Smart time filtering - Only likes content from TODAY
- ⏭️ Skip already-liked content automatically
- 🕐 Human-like delays (randomized 3-8 seconds)
- 🛡️ Rate limiting protection
- 🔄 Session management (no repeated logins)
- 📊 Comprehensive logging with clickable Instagram URLs
- ⚡ Modular architecture - Separate handlers for posts/reels/stories
- 🎯 Error handling with graceful recovery
- 📈 Detailed statistics by content type
- 🔗 Clickable Instagram links in logs
- 📝 Clean console output (no HTML/JSON spam)
- 📄 File logging (
bot.log) for debugging
- Python 3.7+ (tested on 3.7-3.13)
- Instagram account credentials
- Stable internet connection
- Modern operating system (macOS, Linux, Windows)
git clone https://github.com/KamilSupera/AdoreBot.git
cd AdoreBot# macOS/Linux
python3 -m venv venv
source venv/bin/activate
# Windows
python -m venv venv
venv\Scripts\activatepip install -r requirements.txt# Copy the example file
cp .env.example .env
# Edit with your credentials
nano .env # or use any text editor# Instagram Account Credentials
INSTAGRAM_USERNAME=your_username
INSTAGRAM_PASSWORD=your_password
# Target Account Settings
TARGET_USERNAME=account_to_like
# Bot Settings
MIN_DELAY=3
MAX_DELAY=8
MAX_POSTS=20
MAX_CLIPS=20
# Like Stories (true/false)
LIKE_STORIES=truepython bot.py- ✅ Loads configuration from
.env - 🔐 Logs into your Instagram account
- 📸 Fetches stories from target account (if enabled)
- 📄 Fetches posts from target account
- 🎬 Fetches reels from target account
- ❤️ Likes content posted TODAY only
- ⏭️ Skips already-liked or old content
- 📊 Displays summary statistics
==================================================
Instagram Bot Started
==================================================
Your account: @your_username
Target account: @target_account
Today's date: 2025-11-10
Max to check: 20 posts, 20 reels
Stories: enabled
==================================================
Fetching user info for @target_account...
Stories summary: 3 liked, 2 already liked
Posts summary: 1 liked, 2 already liked, 17 skipped (old)
Reels summary: 0 liked, 1 already liked, 19 skipped (old)
==================================================
SUMMARY
==================================================
Total items found: 46
- Stories: 6
- Posts: 20
- Reels: 20
Successfully liked: 4
- Stories: 3
- Posts: 1
- Reels: 0
Already liked: 5
- Stories: 2
- Posts: 2
- Reels: 1
Not from today: 36
- Posts: 17
- Reels: 19
==================================================
Bot finished!
| Variable | Description | Default | Required |
|---|---|---|---|
INSTAGRAM_USERNAME |
Your Instagram username | - | ✅ Yes |
INSTAGRAM_PASSWORD |
Your Instagram password | - | ✅ Yes |
TARGET_USERNAME |
Account to like content from | - | ✅ Yes |
MIN_DELAY |
Minimum delay between actions (seconds) | 3 |
❌ No |
MAX_DELAY |
Maximum delay between actions (seconds) | 8 |
❌ No |
MAX_POSTS |
Maximum number of posts to check | 20 |
❌ No |
MAX_CLIPS |
Maximum number of reels to check | 20 |
❌ No |
LIKE_STORIES |
Like user's stories (true/false) |
true |
❌ No |
The bot only likes content from TODAY (current UTC date):
- ✅ Posts published today
- ✅ Reels published today
- ✅ Active stories (always current)
- ❌ Older content is skipped
This creates realistic, natural engagement patterns!
bot.py
├── login() # Authenticate with Instagram
├── process_stories() # Fetch and like stories
├── process_posts() # Fetch and like posts (with date filter)
├── process_reels() # Fetch and like reels (with date filter)
├── like_content() # Unified method for liking any content
└── print_summary() # Display comprehensive statistics
Each content type has its own handler for clean, modular code.
- ❌ NEVER commit your
.envfile to version control - ✅
.gitignoreis pre-configured to exclude sensitive files - ✅ Session files (
.json) are also gitignored - 💡 Consider using an app-specific password if you have 2FA enabled
- 🔐 Use a secondary account - Don't risk your main account
- ⏰ Run sparingly - Once per day maximum
- 📉 Start with low numbers - Test with
MAX_POSTS=5first - 🎭 Mix with manual use - Also use Instagram normally
ERROR - Challenge required! Instagram needs verification.
Solution:
- Login to Instagram manually through the app/website
- Complete any security checks (CAPTCHA, email verification)
- Wait 2-4 hours before running the bot again
ERROR - Rate limited! Please wait a few minutes...
Solution:
- Stop the bot immediately
- Wait at least 6-12 hours before trying again
- Increase delays:
MIN_DELAY=5,MAX_DELAY=15 - Reduce volume:
MAX_POSTS=10,MAX_CLIPS=10
ERROR - Login failed: Bad credentials
Solution:
- Double-check username and password in
.env - If you have 2FA, generate an app-specific password
- Try logging in manually first to verify credentials
- Check if your account has been temporarily locked
WARNING - Session expired, logging in again...
Solution:
- This is normal behavior
- The bot will automatically re-authenticate
- If it persists, delete
*_session.jsonfiles and restart
- 🐢 Start slow - Use the bot sparingly at first (once per day max)
- ⏱️ Increase delays - Higher delays = less suspicious (
MIN_DELAY=5,MAX_DELAY=15) - 📉 Limit interactions - Don't like 100s of posts (
MAX_POSTS=10-20) - 🔀 Mix manual activity - Use Instagram normally between bot runs
- 👁️ Monitor logs - Check
bot.logfor warnings or issues - 🏠 Use residential IP - Avoid VPNs or datacenter IPs
- ⏰ Vary timing - Don't run at the exact same time daily
MIN_DELAY=5 # Higher than default
MAX_DELAY=15 # Much higher delays
MAX_POSTS=10 # Fewer posts
MAX_CLIPS=10 # Fewer reels
LIKE_STORIES=true # Stories are saferMIN_DELAY=3 # Default
MAX_DELAY=8 # Default
MAX_POSTS=50 # More posts
MAX_CLIPS=50 # More reels
LIKE_STORIES=trueThe bot creates two types of logs:
- Real-time progress updates
- Clean, formatted output
- No HTML/JSON spam
- Clickable Instagram URLs
- Complete operation history
- Detailed error messages
- Timestamps for all actions
- Useful for debugging
Check the log file if something goes wrong!
AdoreBot/
├── bot.py # Main bot script
├── requirements.txt # Python dependencies
├── .env # Configuration (create from .env.example)
├── .env.example # Configuration template
├── .gitignore # Git ignore rules
├── LICENSE # MIT License
├── README.md # This file
└── bot.log # Generated log file (gitignored)
Contributions are welcome! Here's how:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Additional safety features
- Support for more content types
- Better error handling
- UI improvements
- Configuration presets
This project is licensed under the MIT License - see the LICENSE file for details.
- ✅ Free to use, modify, and distribute
- ✅ Commercial use allowed
- ✅ Private use allowed
⚠️ No warranty provided⚠️ Author not liable for damages
Important: While the code is MIT licensed, using it violates Instagram's Terms of Service. The license protects the code itself, not your Instagram account.
This software is provided for educational purposes only.
The author:
- ❌ Does NOT encourage violating Instagram's Terms of Service
- ❌ Is NOT responsible for any account bans or restrictions
- ❌ Is NOT responsible for any misuse of this software
- ✅ Provides this as a learning resource for API automation
Users are solely responsible for their own actions and any consequences.
This tool demonstrates:
- API interaction and authentication
- Rate limiting and safety mechanisms
- Clean Python architecture
- Error handling best practices
Use responsibly and ethically.
- instagrapi - Instagram Private API library
- python-dotenv - Environment variable management
- Python 3.7+ - Programming language
- Various Instagram automation tools on GitHub
- Community research on Instagram's private API
- Best practices for ethical automation
Kamil Supera
- GitHub: @KamilSupera
- Project: AdoreBot
- Instagram Terms of Service
- instagrapi Documentation
- Instagram Graph API (Official)
- Python Best Practices
If you find this project useful for learning, please consider giving it a star! ⭐
It helps others discover the project and motivates continued development.
Remember: Use responsibly, ethically, and at your own risk! 🎯