How to scrape users from likes on Instagram posts

An Instagram bot template that automates scraping user handles from likes on a post into a Google sheet. To get this bot up and running, follow the steps below.

To get started you will need a sheet with url's to posts. If you need to scrape a list we suggest you adpat this template.

# Install this Instagram bot template

To install this Instagram Axiom click 'Install template'. If you are a new user you will be required to create an account before you can edit the template.

# Set up a Google Sheet

  1. Create a new Google Sheet. You can do this in your Chrome browser by entering the shortcut 'sheet.new', presuming you already have an account.
  2. Name your sheet something like 'Instagram Users’.
  3. Set up two tabs titled 'Post' and 'Users’.
  4. Add post links to colum A in ‘Post’. Each Post link should be added to a new row.

# Set up the 'Read data from Google Sheet' step

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the sheet tab called 'Posts'.
  3. Set 'First cell' and 'Last cell' to A1
  4. You should now see a link in the preview.

# Configure the 'Interact with a page's interface'

We have configured this step for you. We have provided this guide for you to learn more about bot building.

  1. Go to page, Enter URL - click 'Insert data' and pass the Google Sheet token '[google-sheet-data?*&0]'.
  2. Click Element - Select the like link on the post page, below the heart. This will open a pop up with the likes user id.
  3. Get data from a webpage - select the ids and set the selector to link. Change the max-results to 10 for testing. Set only to 'All' when fully tested.
Use Axioms click step to select likes

# Append or Merge Data

  1. Data A - Click 'Insert data' and select '[google-sheet-data]'
  2. Data B - Click 'Insert data' and select '[all-interact-data]'
  3. Append mode - Leave set to Horizontal

# Set up the 'Write Data to a Google Sheet' step

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the tab you created for User data.
  3. DATA - Select the '[appended-data]'.
  4. Clear data before writing | Add to existing data - Set this option to 'Add to existing data'.

# Set up the 'Delete rows from a Google Sheet' step

  1. Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
  2. Sheet name - Choose the tab you created for links.
  3. First row - set to 1.
  4. Last row - set to 1.

# Test run

We always recommed doing a trial run of your bots with lower max-results.

# Ready to Run

When you are satisfied, the bot is ready. Change the max-results in the 'Get data from a webpage' sub-step in the 'Interact with a page's interface' step.

# Troubleshoot

Try these measures if your bot is not working. We would recommend you watch the video to troubleshoot.

  • The bot loops on the same post. Check the 'Delete' step and the 'Jump' step
  • The bot does not click on the 'Likes' link to open the pop up. Try re-selecting the link with the 'Click element' select.

# More Social Media posting templates