Scrape Instagram Comments
Scraping Instagram comments can be helpful for better understanding how an audience is engagement with your content - or content from clients, competitors, or any other Instagram account you may be interested in.
Despite how useful these comments can be for influencers, marketers & researchers, Instagram prohibits the automated scraping of their data, making collecting the raw comment data tricky, even from the best Instagram scrapers.
While there are automated browser extensions that promise to scrape Instagram data for you, these nearly all violate the Instagram Terms of Service, and using these unofficial tools while logged in to Instagram will often leave footprints behind that can result in your Instagram profile being blocked and/or banned.
There are other Instagram comment scrapers and web scrapers that do not run in your browser (safer since your account is not on the line), but they can be prohibitively expensive, relying on residential proxies and other web scraping “hacks” involved to avoid being detected and blocked. Furthermore, if you only need a few thousand or so comments, these data scraping tools are often overkill and not worth the effort needed to set up.
HAR File Web Scraping
In this article, we’ll discuss how to use a completely safe scraping tool that uses a recording of your network traffic to Instagram for collecting comments from Instagram posts. This allows you to download Instagram comments without Instagram even being aware of any scraping activity, as our process uses an “after-it-happened” recording of the data, complying with the Instagram Terms of Service. Check out the video or read on to learn more:
Go to the Instagram Posts Comments
Open up Instagram in your web browser, then navigate to the post you want to scrape the comments of. Click on the post and you’ll see the comments to the right of the post.
Open Developer Tools
On your web browser (we’ll assume you’re using Google Chrome, but these instructions should be similar for any browser), right click anywhere on the page and hit Inspect
to open up developer tools (this will allow you to record your web traffic as Instagram serves back the comments). You can then click on the “Network” tab to see your web traffic with the data in it.
You may now want to refresh the page (now that you’re recording your web traffic), so you get the initial set of comments.
Scroll Through Comments
Move your mouse over the first few comments (these should be the most recent, or “top” comments depending on what scandal Instagram is trying to suppress at the moment), then scroll down to load more and more comments. Your browser will be recording the raw data as you do this, so keep scrolling until you get to the end or you get tired of seeing spambot comments.
Export HAR File
Once you’re done scrolling, look for a download arrow in your browser’s developer tools (Network Tab) that’s labeled something along the lines of “Export HAR…” Click this and save the HAR file somewhere you can access quickly, like your Desktop:
Upload to HAR File Web Scraper
Now that we have the data inside this large file, the trick is to extract data out of this file. For this, we suggest using our HAR File Web Scraper where you can upload the file here, and the software will parse everything out for you and group together all the different requests with the comments in it:
Export Instagram Comments to Excel
You can click the disk icon next to each of the requests to download the data for free, or scroll up and click the “Parse Group” button (above all the individual responses) to download a combined CSV file with the comments in it (note this is a paid feature):
You can see that the HAR File Scraper combined all of the individual requests into a combined list that you can now download as a single CSV file.
Check out the CSV file to see exactly what it contains, but you should get the full comment text, the name of the author, link to their profile pictures, and within the comment you’ll see Instagram hashtags used in the bodies, which can be fun to analyze! You can repeat this process as much as you’d like to export comments from several Instagram users.
Scrape Commenters & Posts
Once you collect the comments, you may be wondering how to scrape Instagram posts of the commenters, so you can perhaps understand them a little bit better. You can use the exact same HAR File Scraper to do this using our Instagram User Posts Scraping Tutorial, where you’ll need to visit each commenter’s profile.