How do you scrape instagram likes and comments?

Do you rather get them with the official API

https://api.instagram.com/v1/media/{media-id}/comments?access_token=ACCESS-TOKEN

or go with user generated stuff like

https://github.com/Andreyco/Instagram-for-PHP

The goal is to get a list of likes and comments on a specific post.

1 Like

We don’t scrape Instagram here sir.

5 Likes

The ‘official’ api is not used on any major bots that f/u. Private api is used to emulate a mobile device.

4 Likes

Thanks for the comment. Do you know which APIs are the most popular? I want to code a XPLOR-like group. Everything is set up just the scrape is missing :wink:

Get a HTTP debugger and see what is sent from a POST, put that in code. Each GET has different ones for the specific item you want( Posts, comments…etc.) there is no one popular method as each scrape requires different set of POST codes.

1 Like

So I’m currently using a headless browser to get the likes and comments. Stills struggelin. Anyone wants to share how to do it? I don’t get likes above the 1010 likes threshold. Seems like instagram does not load them in the browser.

1 Like

Came across similar issues when trying to pull a list of all followers of an account. I know it can be done, tools like Instagram Helper tools in the Google Chrome extension have the functionality. I would just like to do it custom to what I need done.

Using Octoparse, currently.

No need for the API if you use PHP. I’ve built a web app with PHP that requires similar information from Instagram. You can achieve this by calling the publicly available JSON data using PHP. A tip that will save you a lot of frustration and loading time, use PHP cURL to call the data.