How to scrape Instagram search for post links

This template automates Instagram search scraping: it takes search terms from a Google Sheet, appends them to Instagram's search URL, loads the search pages in Chrome, scrapes post links, saves them to a Sheet, deletes processed rows, and repeats with new search terms.

# Get started: Set up your Google Sheet

Create a new Google Sheet. You can do this in your Chrome browser by entering the shortcut 'sheet.new', assuming you already have an account. Name your sheet something like 'Instagram search scraper’. Set up two tabs in Google Sheets: one for search terms and another for scraped data.

# Install the Instagram search scraper bot

To install this Instagram search scraper entry bot click 'Install template'. If you’re a new user, you’ll have to click 'Install Chrome extension' and create a free Axiom.ai account before you can edit the template.

Once installed, click 'Start'.

Axiom.ai will guide you through the steps you need to configure in the app.

# Configure your Instagram search scraper in five easy steps

  • Step 1.0 - Read data from Google Sheet
    • Spreadsheet - Search for the Google Sheet you created. Once found, click to select
    • Sheet name - Choose the tab with the posts in it
  • Step 2.0 - Loop through data
    • Step 2.1 - Go to page
      • Enter URL - Click 'Insert data' select [google-sheet-data] append to the end of the url 'https://www.instagram.com/explore/search/keyword/?q='
    • Step 2.2 - Get data from bot's current page
    • Step 2.3 - Append or Merge Data
      • Data A - Click 'Insert data' select post url in '[current-url]'
      • Data B - Click 'Insert data' select '[scrape-data]'
    • Step 2.4 - Write data to a Google Sheet:
      • Spreadsheet - Search for the Google Sheet you created. Once found, click to select
      • Sheet name - Choose the tab with the posts in it
    • Step 2.5 - Delete rows from a Google Sheet
      • Spreadsheet - Search for the Google Sheet you created. Once found, click to select
      • Sheet name - Choose the tab with the posts in it

# Run your Instagram search scraper

To test this Instagram scraper, initiate the bot with the desktop runner and let it run a few loops. Then, stop the bot and review the data in the linked Google Sheet for accuracy and completeness. If you wish to schedule the bot add steps to login.

# Customize your template

Like all Axiom templates, you can use our no-code bot builder to customize any bot according to your requirements.

# Tips

We recommend you watch the video to troubleshoot. If you wish to schedule the bot you will need to share the Cookie in settings or add steps to login.

  • Step 2.0 - Loop through data
    • Step 2.1 - Go to page
      • Page not loading? Check if the token is inserted. The url should look like this 'https://www.instagram.com/explore/search/keyword/?q=[google-sheet-data]'
    • Step 2.2 - Get data from bot's current page
    • Step 2.4 - Write data to a Google Sheet:
      • No data being written? Ensure [appened-data] is selected under 'Data'

We offer excellent customer support. If you need help, get in touch.

# More Templates