So I have a question what would be the method to just grab the instagram follower count for a said user?
I have looked at two possible options the official instagram AP
The link from the accepted answer (https://www.instagram.com/
) no longer seems to work, but we can still get followers count from parsing the html from the normal profile url https://www.instagram.com/
If you do a GET
request, you'll get the plain HTML and you can search an html tag that looks like
You can try it out in your browser by going to an Instagram profile, then right click and viewing the page source. Then it's just a matter of parsing the text to get the info you want.
Here's an example to get the number of followers in javascript:
var url = "https://www.instagram.com/username";
request.get(url, function(err, response, body){
if(response.body.indexOf(("meta property=\"og:description\" content=\"")) != -1){
console.log("followers:", response.body.split("meta property=\"og:description\" content=\"")[1].split("Followers")[0])
}
});
This is probably not a reliable, future-proof approach, but it does seem to work for now.