Using Instamancer to collect Instagram data

Nicholas Carah
Image Machines
Published in
4 min readNov 29, 2020

Kiah Hawker, Nicholas Carah and Daniel Angus

In this post we will walk you through how to use Instamancer to do a basic scrape of Instagram posts and their metadata.

If you haven’t installed Instamancer check out this post here.

Once Instamancer has been installed you will begin by opening ‘Command Prompt’ in administrator mode. For Windows users this will look like this:

Begin by typing ‘cd\’ and hitting enter and you’ll see this:

You then type in the word ‘instamancer’ with no spacing:

After you type this a list of command information should appear:

From here you can begin your first scrape. Start at the bottom of this list where the ‘c:\>’ is located and type in ‘instamancer’ (this is always included at the start of your command line). The first selection you need to make is whether you are scraping via a ‘hashtag’ or specific ‘user’ — this is the first thing you type into the command line:

Or:

You then enter the hashtag or user you want to scrape. This tutorial will use the hashtag ‘skate’ as an example.

From here the next step is to specify how you want this hashtag or user to be scraped. The three major commands are ‘-f’ ‘-d’ and ‘-v’. -f stands for full and means the scrape will include full meta data on the images including comments and geotags . -d saves the images from the posts (this is usually on). The final command ‘-v’ means videos will also be included in the scrape. You can include these commands by typing — and then the amount of commands you wish to include:

Once you have entered in your commands you can successfully run a scrape by hitting enter:

For broad hashtags like ‘skate’ ‘instagood’ or ‘fashion’ it is useful to include a ‘count’ on your scrapes. You can include a count by typing in ‘ — count=100’ at the end of your command line. The number after = can be whatever you choose. However we recommend not doing scrapes over 100,000. 10,000–30,000 provides a good ‘goldilocks’ sized dataset for the software.

You will now be able to run basic scrapes through instamancer. For Windows users your scraped images can be located by opening file explorer and selecting Local disk (C:).

Click on the folder which says ‘downloads’. Within this folder you should see:

Your scraps will automatically be sorted into either ‘hashtag’ or ‘user’. Select the right folder and you will see your scraped posts:

Open the folder with your scrape name and all your scraped images will be accessible.

The directory you executed the instamancer commands from will also contain a .json file named after the hashtag or user scraped. This .json file contains the scraped metadata from posts, such as date, like count, comments (if optioned), accessibility captions, and more.

--

--