Web Scraping Instagram

Learn how WebHarvy can be used to scrape images from Instagram, the most popular photo and video sharing website used by hundreds of millions of users.

Web Scraping is the process of automatically extracting data from websites using software tools called web scrapers. This article explores how WebHarvy can be used to scrape images and other data from Instagram.

WebHarvy is a visual web scraping software using which you can easily scrape data from any website. WebHarvy allows you to select the data to be scraped through simple mouse clicks. There are no complex steps involved.

How to scrape Instagram images?

The following video shows how WebHarvy can be used to scrape images from Instagram. Images will be downloaded to a local folder in your computer. The video also shows how image scraping can be performed for multiple search keywords on Instagram.

Steps to follow to scrape images from Instagram

  1. 1. Download and install WebHarvy in your computer
  2. 2. Open WebHarvy and load the Instagram page from which you need to scrape images
  3. Instagram loaded for scraping images
  4. 3. Open WebHarvy Settings and click on Advanced Miner Options button. Select value 1 for 'Number of levels higher in HTML DOM to search for next item'. Apply changes.
  5. 4. Start Configuration
  6. 5. Place the mouse pointer over the blank space between the first and second image, such that only the area between images is highlighted. Click over this position to bring up the Capture window.
  7. 6. Select More Options > Capture HTML
  8. 7. Select More Options > Apply Regular Expression
  9. 8. Select the second option 'Get image URL from HTML' from the RegEx dropdown list and Apply.
  10. Scraping Instagram Images
  11. 9. Click on the main 'Capture Image' button to select all images on page for extraction
  12. 10. To scrape images for multiple search keywords using the same configuration, add keywords to the configuration.

Scraping multiple images (per post) from Instagram

Some Instagram posts may contain multiple images. WebHarvy can be configured to scrape all images displayed within each Instagram post. The following demonstration video explains how multiple images can be automatically scraped using WebHarvy. This video also shows how details like image location, image URL and content/description can be scraped.

The regular expression strings used in the video along with the JavaScript code used for pagination can be found in the video description.

How to scrape Instagram image URLs and number of likes?

The following video shows how image URLs and number of likes can be extracted from Instagram. The JavaScript and RegEx codes used in the video can be found here.

Scrape Instagram Followers of any profile

The following video shows how you can scrape name and handles of all followers of any Instagram profile.

Know More

If you are interested in using WebHarvy to scrape data from Instagram and other websites, we highly recommend that you download and try using the free evaluation version of WebHarvy available in our website. To get started, please follow the link given below.

Getting started with WebHarvy

Need Support or Have Questions?

In you have any questions please contact us at support team (support@webharvy.com) with the details (URL of the webpage + details of the data to be scraped). We are happy to help you get started with your first data extracting project using WebHarvy.