An Instagram bot template that automates scraping user handles from hashtag pages into a Google sheet. To get this bot up and running, follow the steps below.
You will need to set up a Google Sheet to output Insta handles.
# 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
- 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.
- Name your sheet something like 'Instagram Handles’.
- Set up two tabs titled 'Post' and 'Handles’.
# Get started open the Instagram hashtag bot
On the Axiom dashboard, hover over the text 'How to scrape handles from Instagram hashtag pages' and click.
# Configure the 'Interact with a page's interface' to scrape top posts
This step will grab the links to the top posts, as their selectors will vary from the posts below.
- Go to page, Enter URL - Cut and paste the url of a hashtag page to scrape.
- Get data from a webpage - click 'Select,' change your selector to link type. In the top posts section only click on several image cards to capture repeating links. Set 'max-results' to nine as there are only nine top posts.

# Configure the 'Interact with a page's interface' to scrape posts
This step will grab the post links. Note we removed the 'Go to page ' to stop the page reloading.
- Get data from a webpage - click 'Select,' change your selector to link type. In the posts section only click on several image cards to capture repeating links. Set 'max-results' to 20 for a test run.
# Append or Merge Data
We use this step to merge the links into a single colum of data.
- Data A - Click 'Select data' and 'all-interact-data' with the the top post scrape
- Data B - Click 'Select data' and 'all-interact-data-2' with the the post scrape
- Append mode - Set to vertical

# Set up the 'Write Data to a Google Sheet' step
- Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
- Sheet name - Choose the tab you created for the Posts.
- DATA - Select the '[appended-data]'.
- Clear data before writing | Add to existing data - Set this option to 'Add to existing data'.
# Set up the 'Read data from Google Sheet' step
Now we parse the links to loop through the posts scraping the Instagram handles.
- Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
- Sheet name - Choose the sheet with the Links.
- First cell - If the links are in column a set to 'A1'.
- Last cell - Enter 'A1' the bot will now only pass a single row of data.
- You should now see a preview of the data.
# Configure the 'Interact with a page's interface' to scrape top posts
Now we scrape the users profile link from the post.
- Go to page, Enter URL - Cut and paste the url of a hashtag page to scrape.
- Get data from a webpage - click 'Select,' and change your selector to link type. Choose the username at the top of the post. Set 'max-results' to one to speed the bot up.
# Split by character
Now extract the handle from the url.
- Character - Enter '.com/'.
- Data - Click 'Insert data' and select 'all-interaction-data_2'.

# Split by character
- Character - Enter '/'
- Data - Click 'Insert data' and select 'all-interaction-data_2'
# Append or Merge Data
Lets store the Handle and the Url by combining the Interact and final split step.
- Data A - Click 'Select data' and choose '[all-interact-data-1]'.
- Data B - Click 'Select data' and choose '[split-by-character-1]'.
- Append mode - Set to horizontal.
# Set up the 'Write Data to a Google Sheet' step
Add a new tab in your sheet for this write step. Do no overwrite the post urls.
- Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
- Sheet name - Use a new tab in the sheet to store this data, make one if you have not already. Do not overwrite the links.
- DATA - Select the '[appended-data-1]'.
- 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
In the next step we will loop the bot to scrape all the posts. This step deletes the first row. So when the bot jumps it starts from a new row.
- Spreadsheet - In the field called 'Spreadsheet', you can search for the Google Sheet you created. Once found, click to select.
- Sheet name - Choose the tab you created for links.
- First row - set to 1.
- Last row - set to 1.
# Set up the 'Jump to another step' step
This step loops the bot, making it visit each post. Make sure you jump to the second 'Read data from a Google Sheet' step.
- Jump to step - set the step you want to jump to make the bot loop in this case step six! This can change of you add steps.
- Maximum cycles - set the amount of loops test with five.
# 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 Two.
# Troubleshoot
Try these measures if your bot is not working. We would recommend you watch the video to troubleshoot.
- The bot loops through the same Post. Check the 'Delete' step.
- The bot still loops through the same Post, check the jump step goes to the second 'Read' step.
- The handle is not being scraped, re-select the username for the 'Get data' step.