DEV Community

How do you scrape Instagram?

Manan Gouhari on March 21, 2020

Recently, there have been talks of Instagram closing down its API and leaving access to only corporate partners. Data scraping becomes even more i...
Collapse
 
chrisgreening profile image
Chris Greening

Hello!!! I've been working on an open source library for scraping Instagram data you might find interesting at this repo. It scrapes the same JSON data you explored in your blog post with steps as easy as

from instascrape import Profile
manan = Profile.from_username('manan.code')
manan.load()
Enter fullscreen mode Exit fullscreen mode

and that's it!! It scraped almost all the data points you can get from the data_json you were exploring. It has similar functionality for hashtags and posts as well, check it out :)

Collapse
 
manangouhari profile image
Manan Gouhari

Oh that is great! I'll look into it for sure. Thanks for commenting about it.

Collapse
 
restyler profile image
restyler

Great writeup, thank you! I've just published a simple tutorial on Instagram scraping and discovering micro-influencers via SQL.


I will appreciate your feedback and comments.
Cheers!
Collapse
 
nityagudi18 profile image
nityagudi18

Hi,
Thanks for sharing this video.
I see that some accounts have the data we need at script tag 4, not 5. I am trying to scrape data for a list of users. How to extract search tag index and make this work for all users?

Collapse
 
electronlab profile image
Harsh Vardhan Goswami

Great boi

Collapse
 
bobbymoure profile image
BobbyMoure

How to understand scratching? Can I scratch Instagram?)

Collapse
 
manangouhari profile image
Manan Gouhari

WUT EVEN DUDE ?