An Awesome Way To Scrape Data From Instagram

Manpreet Singh
4 min readFeb 22, 2022

Welcome back! Python is an amazing language with a ton of capability, if you’re new to Python, check out the link below to learn more about it:

So, let’s talk about an awesome way to scrape data on Instagram, this specific package is called Instagram-Scraper, luckily for us, it’s hosted on GitHub, here is a link to their repository:

This specific package allows you to easily scrape Instagram user’s photos and videos:

If this sounds fun to you, all you have to do is use the pip command to install this package:

$ pip install instagram-scraper

At this point you can use the following sample commands to scrape data from Instagram, here is a command to scrape a users profile:

$ instagram-scraper <username> -u <your username> -p <your password>

You can use the following command to scrape hashtag media:

$ instagram-scraper <hashtag without #> --tag

There are also tons of options within this tool as well, here are some of the commands you can use:

--help -h               Show help message and exit.

--login-user -u Instagram login user.

--login-pass -p Instagram login password.

--followings-input Use profiles followed by login-user as input

--followings-output Output profiles from --followings-input to file

--filename -f Path to a file containing a list of users to scrape.

--destination -d Specify the download destination. By default, media will
be downloaded to