Rodion Chachura

Half-Automated Instagram Marketing: What I learned after writing 1000 DMs


Messaging to strangers on Instagram

The first days it was a fun thing to do, and messages like this were quite encouraging.

After a few days yet I faced a problem. After scrolling the feed, opening the author profile, clicking on the message button, appears that I already tried to reach him. So I started thinking about how this manual process can be automated.


The first thing that came to mind was the Instagram API or Instagram Graph API. But after some investigation, it has become clear that there is no way to use APIs. The first one is deprecated and to use the second one you need to apply with real application.

The only way left is scraping. After some research, I found a python library for making all kinds of things with a browser version of Instagram. After some playing with the library I came to the algorithm that has such steps:

  1. Login Instagram.
  2. Shuffle array of tags.
  3. Go to the search page and try different tags, for each profile on the feed check if a user not reached or ignored, add to the list and like the post.
  4. Subscribe to each profile since it will be easier to find in subscribers rather than in global people search.
  5. For each profile prompt me to move it to one of the two categories — reached or ignored.
  6. Unsubscribe from peoples in the list.

Information about users saved to .json file after execution. Since I already wrote to 200-something peoples, it took me two hours to fill the initial state.

The state keeps in reached array both username and tags of the liked post. This information allows me to write the script that will go over users that answered my message and count the number of occurrences for each tag. It allows me to find new tags for the search process.


I received some useful feedback, and it gives me an idea of what features I should implement. But I doubt that this way of getting feedback can be effective. Maybe I will optimize this script a little bit in the future before running a new session of reaching out.

If you have some suggestions or feedback leave a comment:) All the code you can find in the repository.

Reach the next level of focus and productivity with


Indie hacker behind More at