Instagram Hashtag Posts Scraper

Download Instagram API Hashtag Posts Data to Excel & CSV Files

Instagram Hashtag Posts Scraping

Instagram hashtags can be very helpful for finding content or tracking branded content for hashtags that you or your clients promote. While it’s great to mindlessly scroll through these Instagram posts for hashtags of interest, it can be difficult to make any actual decisions without the raw data behind the hashtag posts. For example, how many people are posting with the hashtag daily, weekly, or monthly? What’s the engagement for the posts - is it increasing or decreasing?

Regardless of how useful this raw data for Instagram hashtag posts can be for influencers, marketers & researchers, Instagram prohibits the automated scraping of their data, making collecting the raw hashtag post data tricky (and we wonder why some people call it a dying platform).

While there are automated browser extensions that promise to scrape Instagram data for you, these nearly all violate the Instagram Terms of Service, which prohibit automated access to Instagram or the scraping of its data through the website. Using these unofficial tools will often leave footprints behind that Instagram can detect and then ban and block your account.

HAR File Web Scraping

In this article, we’ll discuss how to use a completely safe approach that uses a recording of your network traffic to Instagram for collecting Instagram posts by hashtag. Check out the video or read on to learn more:

Go to the Instagram Hashtag Page

Open up Instagram in your web browser, then navigate to the hashtag page you want to scrape the data of the posts for. You can use a search engine to find this page, or simply find a post on Instagram with the hashtag you’re interested in, then click through that hashtag to access the Instagram Hashtag Posts page.

Instagram Hashtag Posts Page

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 hashtag posts). 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 posts loaded into your browser. This will also load the “Top Posts” of the page into your browser so you’ll be able to extract this data later on.

Scroll Through Posts

Now with developer tools open, simply scroll through the posts (just keep scrolling down the page) and your web browser will record the raw data that Instagram is sending back to you browser about the posts.

Scroll Down Through All Hashtag Posts

You should be able to scroll through at least a few thousand or so… just try to take a break or don’t scroll too quickly so Instagram doesn’t think you’re a bot (even though you’re not since you’re just using the website normally).

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:

Click Export HAR File

Upload to HAR File Web Scraper

Now that we have the data inside this large file, the trick is to get the 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 hashtag posts in it:

HAR File with Instagram Posts

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 hashtag posts in it (note this is a paid feature):

Download Combined Hashtag Posts as CSV File

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.