In 2020, the official Instagram API allow you to access only your own posts and not even public comments and posts on Instagram because of the rising privacy concerns from the users and frequent accusations of data-breach at many big companies including Facebook.
So, how to crawl public posts?
There’s still a workaround. It does provide an API which is publicly accessible.
Let’s try to hit this URL.
Eureka, it’s a JSON response:
URL & JSON response
Here, travel is the hashtag, as we can also see in the JSON response. And JSON response consist of all the posts containing hashtag travel. Now JSON response is easy to understand. Edges is the list that contains posts’ data. So, now all we need is to parse this JSON to get the data.
Programmatically parsing response using Python
To read more..
Visit: Only Code