How to Get Public User All Posts from Instagram, Without Instagram API

How to pull Instagram posts for a public account for certain account?

Sending a GET request to https://www.instagram.com/katyperry/?__a=1 returns a JSON packed with account information including user id, recent media, feed, etc.

user_id = responseAsJSON.graphql.user.id

You can replace katyperry with any public username.

Why can't I get all Instagram posts without using API in NodeJS

Since I needed to get posts from a concrete profile, I opened the profile in chrome browser, opened the console and runned the following code to get all posts:

//LOOPING ALL (credit www.hamzadiaz.com)
let posts = []
setInterval(()=>{
var inputs = document.getElementsByClassName('v1Nh3 kIKUG _bz0w');
for(var i=0; i<inputs.length;i++) {
if(!posts.includes(inputs[i].getElementsByTagName("a")[0].href)){
posts.push(inputs[i].getElementsByTagName("a")[0].href)
}
}
},500);

Instagram API view public user photo without access_token

Because your requested URL is wrong, it will work only after correcting the 'client_id' instead of 'clent_id'.

Retrieve username by userid without instagram api

Just found out that If I use the post code in the following URL it will return a JSON with the owner:username.

https://www.instagram.com/p/BVs_bQtjmov/?__a=1

"owner":{
"id":"-------",
"profile_pic_url":"-",
"username":"neymarjr",

Instagram user page parsing (with proxy, without API)

Instagram made a changes lately. They are most likely have some special AI or use some service which review your IP address, which ISP you use, is it belonging to organization like Digitalocean, OVH, etc or residential, how many requests are you making to which endpoints, how are you making them, how many accounts you use on it, and how quickly you change them etc.

Right now if you hit the limits of scraping instagram you will be redirected to LoginAndSignupPage(you can find it in source code). Be aware that login on this point won't work - instagram will just return 429 error code, meaning too many requests. Also after every such block most likely your IP address is even less reliable, so if you will start scraping again after block it will get blocked even faster.

I guess the easiest way will be just use residential ip with enough high delay between requests - like 3-5 seconds, and even better if you can use somehow real accounts, and don't overuse them, as well try to make any other requests in meantime, like getting some posts, opening single post or something.

You can ignore pretty much any free IP proxy list available on google, 99% of those ips on it are banned, almost same with ips from Digitalocean, OVH etc, many of them are blocked as well.



Related Topics



Leave a reply



Submit