Scrape Instagram post likes into a Google Sheet


How to scrape Instagram post likes into a Google Sheet: install the Chrome extension, click Build with Browser agent, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To scrape Instagram post likes, read the post links from a Google Sheet, open each post in a loop, click like with Click element, and scrape the handle and profile link of each user who liked it with Get data from bot's current page. Each user is written to the sheet beside the post link, and the post's row is deleted once done. Instagram shows up to 100 likes per post.

Author
Alex Barlow
Published

Build the Instagram likes scraper from a description


Describe it and click the button: the agent builds and tests the likes scraper in your Chrome extension. Be logged in to Instagram in the browser that runs it, which is the desktop app for your own Chrome.

  1. Open each Instagram post link in my sheet
  2. Like the post and scrape the users who liked it
  3. Add them to the data tab with the post link
  4. Delete the post link once it is done
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

You need a Google Sheet, named something like Instagram likes, with two tabs: links, one post URL per row, and data, empty. Leave the sheet alone while the run adds users to data and deletes post links.

The video shows the agent building the Instagram likes scraper from the lines above, in a few minutes.

Build the Instagram likes scraper step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Read data from a Google Sheet
    • Spreadsheet: your sheet
    • Sheet name: links
  • 2.0 Loop through data
    • repeats for every row in [google-sheet-data]
    • 2.1 Go to page
      • URL: the post link column of [google-sheet-data]
    • 2.2 Click element
      • Select: the post's like button
    • 2.3 Get data from bot's current page
      • Select: the custom selectors [role="dialog"] span div for the handle and [role="dialog"] [role="link"] for the profile link
    • 2.4 Append or merge data
      • Data A: the post URL column of [google-sheet-data]
      • Data B: [scrape-data]
    • 2.5 Write data to a Google Sheet
      • Spreadsheet: your sheet
      • Sheet name: data
      • DATA: [appended-data]
    • 2.6 Delete rows from a Google Sheet
      • Spreadsheet URL: your sheet
      • Sheet name: links
      • First row to delete: 1
      • Last row to delete: 1

Common questions about scraping Instagram post likes


Why is the like button not clicked?

Instagram's layout has changed or the selection missed. In Click element, reselect the like button on a post. When a run fails, hand it to the agent and it repairs the step.

Why are no Instagram likes scraped?

The selectors no longer match the page. In Get data from bot's current page, check the custom selectors are [role="dialog"] span div and [role="dialog"] [role="link"]. The video above walks through the setup.

Why is no data written to the Google Sheet?

DATA points at the wrong token. In Write data to a Google Sheet, set DATA to [appended-data].

How many likes can I scrape from an Instagram post?

Up to 100 per post. Instagram shows no more than that, so the scraper cannot collect more.

Can I scrape Instagram post likes without code?

Yes. Every step is a no-code step in the Chrome extension; the two selectors above are the only thing to paste, and the agent sets them for you.

Can I schedule the Instagram likes scraper?

Yes, once the automation can log in by itself. Share the cookie in the automation's settings, or add steps to log in.

How do I scrape Instagram users from a hashtag instead?

See scrape Instagram hashtag pages for handles and post links. To collect the post links for this guide first, see scrape Instagram post links for every search term, and to post to Instagram, see automate Instagram posts.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides