How to Automate Instagram Likes on Several Accounts

KAMELEO.IO > Blog  > Guides  > How to Automate Instagram Likes on Several Accounts

How to Automate Instagram Likes on Several Accounts

Automating Instagram likes on just one account isn’t hard. Several lines of codes and you will be able to automate Instagram likes, even without much coding experience. The issue? When you want to automate Instagram likes on several accounts or when you want to use Instagram automating software.

The problem with all the automating software? That is all connected to one location, a location you most likely don’t live in, nor does every other user trying to use it, meaning that sooner or later, Instagram will see you as suspicious.

How to Automate Instagram Likes on Several Accounts

In this guide, we’ll show you how to automate Instagram likes on several accounts at once, while keeping them safe, with the help of some very very basic coding which we’ll walk you through all of, in this guide.

What’s Needed to Automate Instagram Likes on Several Accounts While Keeping Them Safe

If you already know how to code, you’ll need whatever coding platform you use, and then you also need to install Selenium for it.

You’ll also need Kameleo to change your browser fingerprint. And a VPN/proxy to change your IP, in order to prevent Instagram from detecting you as someone suspicious, which is especially important when you are automating likes on Instagram on several accounts at the same time.

A major flaw of automated tools out there is that a lot them would be based in locations that don’t correspond with your location, making them seem even further suspicious. That is not the case with this guide, as we can manipulate our location as we like so that it can seem that we are close to our location if we wish or to make it seem like a new account we created is, for instance, in the US in New York.

If you have no prior knowledge of coding, a very useful tool for you for this will perhaps be UI.Vision which allows you to create code by simply navigating through the browser. It’s a Chrome/Firefox add-on. That will, of course, also need to be mixed with Kameleo + VPN/proxy

We’ll focus on it in this guide, as if you already have coding experience, you’ll be able to figure out how to automate Instagram liking very quickly. You’ll just need to create a piece of code with Selenium enabled, followed by turning on external Selenium connections on in Kameleo, and running a Kameleo profile with a proxy enabled which will spoof your browser, and thus prevent Instagram from recognizing that you are automating likes on Instagram from one device. If you want to automate many accounts, just create new Kameleo profiles.

How to Automate Instagram Likes on Several Accounts

Of course, you’ll also need to save each profile you use on Kameleo for future use with the same account as if you don’t, Instagram might see you as suspicious in the future.

Here’s a video that goes into automating with the use of Kameleo and coding:

How to Automate Without Coding Experience:

Firstly, sign up for Kameleo and turn it on.

Press on New Profile.

How to Automate Instagram Likes on Several Accounts Kameleo

Customize your settings depending on what kind of device you want to look like to your web browser. We just went for a random location in Europe.

In this step, it’s also very important to use a VPN or a proxy. We went into the server list of our used VPN server and typed in the server name and port, mixed with our password and username.

After you are connected, you should be taken to, which will tell you how anonymous you are.

What you need to do next is to go to your store on Chrome or Firefox and to download UI.Vision.

When you have that done, press on the top-right of the browser where there’s a UI.Vision icon.

From there on, if you press Record, whatever action you take, UI.Vision will record and convert into code.

For this example, we wanted to automate likes on a specific hashtag.

We started by going to Instagram and logging into our profile. We then pressed Record, and that automatically noted what site we are on.

You have two options here.

If you press on Record, you can pretty much automate the process of liking on Instagram yourself, but there’s an even quicker way to do it if you use the commands in UI.Vision, which is what we will walk you through in this post.

We started by pressing on Add and typing in Open in the command box and providing the hashtag site we wanted to automate liking in the target area. In this case, it was:

If you now press on Play Macro, Instagram will open.

In the future, when you want to modify the hashtags you like pictures from, all you’ll need to do is to change the last part of the URL. For instance, from “lovequotes” to “love” just to give an example.

On our web browser, we now scrolled down to the Most Recent posts as that’s ultimately our main goal as far as liking goes.

In UI.Vision, we now added a Click command and pressed on Select. Now in the web browser, we selected the first post image.

How to Automate Instagram Likes on Several Accounts

This allows UI.Vision to identify where a post is.

This is the piece of code we got when we pressed on the first image:


Now, you need to find out what’s the difference between the first and second image. You can do so by pressing on the second image and comparing the two lines of code.

Here’s what we got:
  1. xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[1]/div[1]/a/div[2]/ul
  2. xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[2]/div[1]/a/div[2]/ul

As you can see, the second div differs on the second image.

That will be the key to automate Instagram likes on several accounts.

What you’ll need to do is to modify the number that varies into: ${!LOOP}

That way, the code reads: xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[${!LOOP}]/div[1]/a/div[2]/ul

Be aware of any spaces or missing brackets when doing this. If you forget something, your Instagram automation won’t work.

Instagram on the web browser works in 3 columns going downwards. That’s why you now need to press on + beside your modified piece on code. Do that twice.

Now, on the second Click command, modify the 3rd div into: [2] and then modify the same into [3] on the 3rd Click command.

Those lines should now read:

  • xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[${!LOOP}]/div[1]/a/div[2]/ul
  • xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[${!LOOP}]/div[2]/a/div[2]/ul
  • xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[${!LOOP}]/div[3]/a/div[2]/ul

Why do we do that? As the third div is responsible for the side, and it’s the easiest way around the fact that you need to like pictures to the side and going downwards, and since there are only 3 rows going to the side, this is the fastest way to make sure every picture is liked. As far as the ${!LOOP} command goes, when you choose to loop your code, if you put in a loop 15 times, 15 rows of pictures will be liked.

To automate likes on Instagram, you obviously need to like them, and for that, now we need to automate the process of liking a picture.

For that, firstly click on the first image, and now add another Click command and press on Select. This time you need to press on the love heart.

Instagram automation

Now, press + around that command, and input it after the 2 other Click commands that are responsible for you click on image 2 and image 3.

Your code should now look something like this:
How to Automate Instagram Likes on Several Accounts

The barrier now? The fact that you won’t be able to click on a second or third image if an image is opened, which is why we now need to add a Click command that clicks on the outer page of the website to exit out of the image so that it becomes possible for you to click on the next image.

Instagram automation

Add that as the third thing for every image so that the code per every image clicked reads something like:

  1. xpath=//*[@id=”react-root”]/section/main/article/div[2]/div/div[${!LOOP}]/div[1]/a/div[2]/ul
  2. xpath=/html/body/div[4]/div[2]/div/article/div[2]/section[1]/span[1]/button/span
  3. xpath=/html/body/div[6]

Now press on the small icon facing down beside Play Macro to Play Loop as many times as you wish, and just like that, you have learned how to automate Instagram likes.

Naturally, the more likes you want, the more safety precautions you should perhaps take.

You should, for instance, acknowledge Instagram’s liking limit per hour and so on. While also inputting breaks between likes in the code so that Instagram doesn’t flag you as suspicious.

You can do so with simple commands such as Pause. In the target put in how many milliseconds you want to pause for. For instance, 5000 would = 5 seconds. You can, for instance, put in this pause after every Click command.

If you are going to be executing this code a lot, it’s useful to eliminate the need of Instagram opening every single time when a loop happens. Here’s how you can do that:

  1. Add a verifyText to the top of the commands.
  2. Press on Select and click on the hashtag you are meant to be on.
  3. Put in #lovequotes or your desired hashtags in the value section.
  4. Add a new command called: if_v2 with ${!LastCommandOK} in the target area.
  5. Now move our Open command about opening Instagram to the very bottom.
  6. Now add an Else command over that just mentioned Click command.
  7. Press on Source View and copy everything over the if_v2 command to until just before else, and paste it in after the Open command.
  8. Now, at an End command.

That will result in Instagram being opened if you aren’t on the right page, or otherwise, you remaining on the quotes page and liking all the pictures there.

That’s How to Automate Instagram Likes on Several Accounts

If you want to automate several Instagram accounts, just save the code and run it on several different Kameleo profiles. Once a profile is running, turn on another one and so on, until you have as many as you need.

And after you are finished, just save them.

There are many ways to go about the automation of Instagram likes on several accounts, though.

For one, you could technically just turn copy this code and use it with a coding platform that connects with Selenium while connecting with Kamaleo through coding which will be a great option in the future as you’ll be able to automate Kameleo itself in the future, but most will find that UI.Vision on a Kameleo profile is the simplest way to do it.

Found this useful? Make sure to check out UI.Vision’s forums and YouTube videos and make sure to click on info about commands in UI.Vision where you’ll be able to build even more advanced tasks as you learn the platform.

Kameleo Team
Kameleo Team

Our team consists of IT security experts, professional developers, and privacy enthusiasts who always searching better ways for browser fingerprint protection and developing innovative tools for browser automation and web scraping.