See the Installation page.
Looking for a more thorough explanation? Then try our Udemy Course.
Open Command Prompt / Terminal in a folder with start.py file or just open Command Prompt and use cd path/to/folder
. Then make sure that Android phone / emulator is connected by running adb devices
(should print one device). Run the script by command
python3 start.py --interact @natgeo
This is a basic command that will start interaction with @natgeo's followers with default parameters. The script will open Instagram app itself and close it when finished. To stop immediately press Ctrl+C (control+C on Mac).
TL;DR python3 -m pip install --upgrade insomniac
Doesn't work for you or want more details? Please check How to update page.
"Core" features means everything you need for basic usage of Insomniac. This is an open source part of the project. If you feel that you need more – welcome to the Extra features section.
Note that you can print the list of features by running python start.py
with no arguments.
"Interaction" is the main job of this bot: we interact with our potential audience to gain its attention.
list of hashtags, usernames, or places. Usernames should start with "@" symbol. Places should start with "P-" symbols. You can specify the way of interaction after a "-" sign: @natgeo-followers, @natgeo-following, amazingtrips-top-likers, amazingtrips-recent-likers, P-Paris-top-likers, P-Paris-recent-likers
number of likes for each interacted user, 2 by default. It can be a number (e.g. 2) or a range (e.g. 2-4)
likes given percentage of interacted users, 100 by default
follow given percentage of interacted users, 0 by default
number of stories to watch for each user, disabled by default. It can be a number (e.g. 2) or a range (e.g. 2-4)
list of comments you wish to comment on posts during interaction
comment given percentage of interacted users, 0 by default
add this argument to select an amount of users from the interact-list (users are randomized). It can be a number (e.g. 4) or a range (e.g. 3-8)
set a time (in hours) to wait before re-interact with an already interacted profile, disabled by default (won't interact again). It can be a number (e.g. 48) or a range (e.g. 50-80)
use this argument in order to interact with profiles from targets.txt
While interaction lets you follow users, "unfollowing" lets you revert it back after a while.
unfollow at most given number of users. Only users followed by this script will be unfollowed. The order is from oldest to newest followings. It can be a number (e.g. 100) or a range (e.g. 100-200)
By default, only profiles that been followed by the bot will be unfollowed. Set this parameter if you want to unfollow any profile (even if not been followed by the bot)
unfollow only profiles that are not following you
you can specify where to take the users to unfollow from. Can be one of the values: profile / list. "profile" means unfollowing your profile's followings. "list" means unfollowing from the "unfollow.txt" file (extra feature). By default "profile" is used
sort the following-list when unfollowing users from the list. Can be one of values: default / latest / earliest. By default sorting by earliest
set a time (in hours) to wait before re-check follow status of a profile, disabled by default (will check every time when needed). It can be a number (e.g. 48) or a range (e.g. 50-80)
"Limits" are our defense against Instagram bots-detection system. Use limits to make your bot behave like a human. There are no strict rules of how to use limits because Instagram can be less or more suspicious depending on your account age, type of network (WiFi/Cellular) and other parameters.
number of successful-interactions per each blogger/hashtag, 70 by default. It can be a number (e.g. 70) or a range (e.g. 60-80)
number of interactions (successful & non-successful) per each blogger/hashtag, 140 by default. It can be a number (e.g. 140) or a range (e.g. 60-80)
number of total successful interactions per session, disabled by default. It can be a number (e.g. 70) or a range (e.g. 60-80)
number of total interactions (successful & unsuccessful) per session, disabled by default. It can be a number (e.g. 70) or a range (e.g. 60-80)
limit on total amount of likes during the session, 300 by default. It can be a number presenting specific limit (e.g. 300) or a range (e.g. 100-120)
limit on amount of follows during interaction with each one user's followers, disabled by default. It can be a number (e.g. 10) or a range (e.g. 6-9)
limit on total amount of follows during the session, disabled by default. It can be a number (e.g. 27) or a range (e.g. 20-30)
limit on total amount of stories watches during the session, disabled by default. It can be a number (e.g. 27) or a range (e.g. 20-30)
limit on total amount of comments during the session, 50 by default. It can be a number presenting specific limit (e.g. 300) or a range (e.g. 100-120)
limit on total amount of get-profile actions during the session, disabled by default. It can be a number (e.g. 600) or a range (e.g. 500-700)
minimum amount of followings, after reaching this amount unfollow stops
maximum amount of followings, after reaching this amount follow stops. disabled by default
limit the session length by time (minutes), disabled by default. It can be a number (e.g. 60) or a range (e.g. 40-70)
You can setup Insomniac to work infinitely: interact > sleep > interact > sleep > unfollow > sleep > ... etc. That's why we call it a "flow". Read more in our blogpost.
Consider using config files even if you don't want an "infinite" work! Config files are the recommended way for regular users!
repeat the same session again after N minutes after completion, disabled by default. It can be a number of minutes (e.g. 180) or a range (e.g. 120-180)
add this argument if you want to load your configuration from a config file. Example can be found in config-examples folder
configuration that will be loaded after session is finished and the bot "sleeps" for time specified by the "--repeat" argument. You can use this argument to run multiple Insomniac sessions one by one with different parameters. E.g. different action (interact and then unfollow), or different "--username". By default uses the same config file as been loaded for the first session. Note that you must use "--repeat" with this argument!
add this flag to send your anonymous statistics to the Telegram bot @your_insomniac_bot. This is useful when insomniac runs infinitely and you want to be able to track progress remotely
Options for savvy users.
add this flag to use an old version of uiautomator. Use it only if you experience problems with the default version
device identifier. Should be used only when multiple devices are connected at once
skip internet speed check at start
skip Instagram version check at start
skip Instagram connection check at start
manually specify the speed setting, from 1 (slowest) to 4 (fastest). There's also 5 (superfast) but it's not recommended
disable "typing" feature (typing symbols one-by-one as a human)
keep waiting for ADB-device to be ready for connection (if no device-id is provided using --device flag, will wait for any available device)
if you have configured multiple Instagram accounts in your app, use this parameter in order to switch into a specific one. Not trying to switch account by default. If the account does not exist – the session won't start
apk package identifier. Should be used only if you are using cloned-app. Using 'com.instagram.android' by default
by default, Insomniac tries to indicate if there is a softban on your acoount. Set this flag in order to ignore those softban indicators
add this flag to fetch profiles from the internet instead of opening each user's profile on a device
add this flag to run insomniac in debug mode (more verbose logs)
Get "extra" features by supporting us via Patreon Tier. You'll receive an email with activation code for your start.py.
Patreon is our way of monetizing the project. It gives us motivation to constantly improve both "core" and "extra" features.
You can skip profiles that don't match your needs. E.g. ignore mass-followers (more than 1000 followings) or ignore too popular accounts (more than 5000 followers). You can do this and more by using filter.json file. List of available parameters:
Parameter | Value | Description |
---|---|---|
skip_business |
true/false |
skip business accounts if true |
skip_non_business |
true/false |
skip non-business accounts if true |
min_followers |
100 | skip accounts with less followers than given value |
max_followers |
5000 | skip accounts with more followers than given value |
min_followings |
10 | skip accounts with less followings than given value |
max_followings |
1000 | skip accounts with more followings than given value |
min_potency_ratio |
1 | skip accounts with ratio (followers/followings) less than given value (decimal values can be used too) |
max_potency_ratio |
1 | skip accounts with ratio (followers/followings) higher than given value (decimal values can be used too) |
privacy_relation ` |
"only_public" / "only_private" / "private_and_public" |
choose with accounts of which type you want to interact, "only_public" by default |
min_posts |
7 | minimum posts in profile in order to interact |
max_digits_in_profile_name |
4 | maximum amount of digits in profile name (more than that - won't be interacted) |
skip_profiles_without_stories |
true/false |
skip accounts that doesnt have updated story (from last 24 hours) |
blacklist_words |
["word1", "word2", "word3", ...] |
skip accounts that contains one of the words in the list in the profile biography |
mandatory_words |
["word1", "word2", "word3", ...] |
skip accounts that doesn't have one of the words in the list in the profile biography |
specific_alphabet |
["LATIN", "ARABIC", "GREEK", "HEBREW", ...] |
skip accounts that contains text in their biography/username which different than the provided alphabet list |
skip_already_following_profiles |
true/false |
skip accounts that your profile already followed, even if not followed by the bot |
only_profiles_with_faces |
"male"/"female"/"any" |
analyze profile picture and leave only profiles with male/female/any face on the avatar |
Read how to use filters in our blogpost.
set a time (in hours) to wait before re-filter an already filtered profile, disabled by default (will drop the profile and won't filter again). It can be a number (e.g. 48) or a range (e.g. 50-80)
add this argument if you want to pass filters as an argument and not from filters.json file
"Scraping" is a technique that lets you interact with much more users per session without being detected by Instagram as "suspiciously active" user. The idea is to use another IG account to filter users and your main IG account to actually interact. Read more about scraping in our blogpost.
list of hashtags, usernames, or places. Usernames should start with "@" symbol. Places should start with "P-" symbols. You can specify the way of interaction after a "-" sign: @natgeo-followers, @natgeo- following, amazingtrips-top-likers, amazingtrips- recent-likers, P-Paris-top-likers, P-Paris-recent- likers
add this argument in order to just scrape targeted profiles for an account. The scraped profiles names will be added to database at target account directory
add this argument to select an amount of sources from the scraping-list (sources are randomized). It can be a number (e.g. 4) or a range (e.g. 3-8)
Other features that are unblocked by joining Patreon Tier:
Set warmup length in minutes, disabled by default. It can be a number (e.g. 2) or a range (e.g. 1-3).
Remove given number of mass followers from the list of your followers. "Mass followers" are those who has more than N followings, where N can be set via --max- following. It can be a number (e.g. 4) or a range (e.g. 3-8)
Should be used together with --remove-mass-followers. Specifies max number of followings for any your follower, 1000 by default
Limits that come together with extra features.
number of profiles-scrapping per each blogger/hashtag, disabled by default. It can be a number (e.g. 70) or a range (e.g. 50-80)
limit on total amount of profiles-scrapping during the session, disabled by default. It can be a number (e.g. 100) or a range (e.g. 90-120)
set working hours to the script, disabled by default. It can be a number presenting specific hour (e.g. 13) or a range (e.g. 9-21). Notice that right value must be higher than the left value.
if you use flow, you maybe don't want to wait for working-hours on a specific session, because the following session in the flow might be in the working hours and you don't want to stop the flow. If that's the case, use this parameter
limit on total amount of DMs-actions during the current session, disabled by default. It can be a number (e.g. 10) or a range (e.g. 9-12)
More unfollowing options will be unblocked.
you can specify where to take the users to unfollow from. Can be one of the values: profile / list / database. "profile" means unfollowing your profile's followings. "list" means unfollowing from the "unfollow.txt" file. "database" means unfollowing from the database sorted by date of following (older go first). "database-global-search" is the same as "database", but searches in global search. By default "profile" is used
if using "--unfollow-source database", you can specify how long ago an account has to be followed, to unfollow it now. Specify number of days. 7 days by default
Sending direct messages.
List of messages to pick a random one to send. Spintax supported
Send direct messages to the given amount of new followers
If true, messages will be sent only to users whom we are following
Stop looking for new followers if seeing this amount of old followers in a row
More options for savvy users!
use this parameter if you want to run a predefined script when session starts
use this parameter if you want to run a predefined script when session ends