Instagram-php-scraper: Cannot get account with ID?

Created on 22 Aug 2019  Â·  69Comments  Â·  Source: postaddictme/instagram-php-scraper

I got this error where trying to use the getAccountById method, it happens around 4 hours ago. I am not logged in while calling this method. And I've checked that the account is exists.

Fatal error: Uncaught exception 'InstagramScraperExceptionInstagramNotFoundException' with message 'Account with this username does not exist'

wontfix

Most helpful comment

@fsjdg as i already wrote, there is no fixed value, they are analyzing pretty much anything i think

All 69 comments

Hi.
I get the same error. I think instagram has changed something

Same issue... any news?

Same error on my all sites

confirm, have same error. Please comment when issue will fix

the same issue for me... I tried using proxy and worked for a while and then return the same issue...
seems IG is blocking the IP

After some tests I also think that is something related with the IP, Instagram return the login page after a few requests.
Trying to find a fix for the issue or a workaround to get the user Ids...

same problem with the redirect to login page

Instagram apperantely started redirecting to Login And Signup page is there is too many requests, i guess it's some kind of aggressive rate limiting.

Instagram apperantely started redirecting to Login And Signup page is there is too many requests, i guess it's some kind of aggressive rate limiting.

But it seems that this just happens with the user account pages, right?
The #hashtag search still works for me.

When you try to login with some ip there is error 429 returned from instagram so i guess it's for sure some kind of aggresive rate limiting.

It looks like some sophisiticated rating of ip which is making request, for example in our office we have many instagram accounts logged in, i tried to do 1000 requests in loop for some random profile - no issue here. Then i did the same thing on vultr ipv6 vps - 570 requests and limited.

I'm guessing it can be also about owner of ip, try proxies which offer residential ips.

Same issue here, i tried with a new IPV4 proxies, it's working

@sagitaire123 it won't work long if they are hosted on ips owned by some server providers.

I made this to actually catch this problem in code #530

@Jurigag Ok thanks, do you have please any proxy provider to advice ?

I don't know, try to use those which provide residential ip https://luminati.io/residential_ips or https://www.geosurf.com/products/residential-ips https://smartproxy.com but i didn't try them.

Or if your service is really based on instagram scraping try to build your own infrastracture with mobile network maybe.

@Jurigag Ok thank you very much

After getting unbanned on vultr, i made like 20-30 requests in short amount of time and issue occured again.

We have removed the VIA HEADER from the proxy requests and at the moment it seems that is working better. We will see if they ban us again in a while...

Some of you have tested by setting custom headers in the requests? (simulating a real user changing the user-agent, the accept-languages, etc)

We have user-agent set, they still cutoff any request made from ips owned by digitalocean/ovh very quick @jordipolo87

@Jurigag i think the only way it's to make requests from a lot of rotating proxies

@sagitaire123 a lot will do nothing - if they are hosted on ips owned by server providers etc, they will get blocked fastly, usage of residental ips is required in my opinion, at least we switched to those and it somehow fixed an issue.

But still PR above needs to be merged because currently it's throwing wrong exception.

Tried with my home IP, it became blocked in a few requests.

Are you sure that your ip is home? Mine wasn't blocked after 1000

Well, I tunneled the connection to a machine physically located in my
home...

Il giorno ven 23 ago 2019 alle ore 17:41 Wojciech Åšlawski <
[email protected]> ha scritto:

Are you sure that your ip is home? Mine wasn't blocked after 1000

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/postaddictme/instagram-php-scraper/issues/529?email_source=notifications&email_token=AAE2XN7W6VSOJPYDO5N7NQTQGAAK3A5CNFSM4IOPLUZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ASNGQ#issuecomment-524363418,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAE2XN7DBHXBKZVL3AQXPK3QGAAK3ANCNFSM4IOPLUZQ
.

--
Lorenzo Breda

Then weird, I run 1000 wget requests and it's working fine.

someone knows the new limit applied by instagram, how many requests per hour allowed ?

It looks there is no fixed limit.

I'm going VERY slow (one request every 5-10 seconds for ten minutes every
half an hour) and it blocks me in a few hours.

And for example from our IP in office i made already a few hundered requests(one very 1-3 seconds) and still it works fine. I guess it's about how many accounts use this IP normally, how many different requests are made to it(like maybe you did 100 get accounts but didn't even check a wall), from where is this IP, is it blacklisted anywhere, what ISP, etc

As i wrote, our company if pretty much influencer marketing based - everyone in our company have instagram and is logged and and it's pretty much using it, and i made just 1000 requests without any delay - and there was no problem, no block etc. On the other hand, did the same thing on VPS - blockd after 570 requests

I'm trying with my home IP. It is a fixed residential IP address, and only
me and my wife use it.

Then i guess this is a problem - you have only two accounts maximum using it, that's why your limits are low i guess.

Mmm... So probably they are doing some advanced rate limiting. E.g., Each IP has a rate of non-logged requests proportional to the number of accounts that are using it.

I guess the same. And i guess they are taking into account much more. Like to which endpoints you are making requests, how many, how quickly etc. I'm guessing if you for example do 500 requests to some random accounts without ever hitting a wall with posts or checking their posts it already looks suspicious.

Hi, does anyone have any official Instagram solutions or answers related to this? I have the same problem

Maybe because of data abuse for instagram program.
https://www.businessinsider.com/instagram-announces-data-abuse-bounty-program-hyp3r-2019-8

пн, 26 авг. 2019 г. в 17:33, Raabe notifications@github.com:

Hi, does anyone have any official Instagram solutions or answers related
to this? I have the same problem

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/postaddictme/instagram-php-scraper/issues/529?email_source=notifications&email_token=AAI7E5KKMINXPNIFCCR63KLQGPSSXA5CNFSM4IOPLUZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5ERUUQ#issuecomment-524884562,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAI7E5JZ2Z5MQZUZD3DR3K3QGPSSXANCNFSM4IOPLUZQ
.

Offical instagram solutions? Don't scrape them because it violates terms of use. Use official api of instagram.

You need to give the IP a "rest" and if you have had a lot of operations, then enter a proxy mechanism. You can't do much on one IP. I'm just talking about downloading profile data from the address, e.g. https: //in.....com/instagram.
In addition, the limit is not fixed, it varies depending on the IP.

I did some tests, some IPs are banned after 5 attempts, some after a dozen others after hundreds. The mechanism of rotation and rest after the block improves the situation. I was downloading only without login from addresses like https: //ins.......com/some_account_username

https://github.com/jakim/ig-monitoring/issues/121

Offical instagram solutions? Don't scrape them because it violates terms of use. Use official api of instagram.

There is no such a thing as a official api for non-business accounts

I use proxy list and it works only 1 time from nearly 40-50 attempts. Seems that IG is on the "warpath"... (((

@zaivst don't use any free list, use services offering residential ip.

Mobile or resident give better results, but they are incomparably more expensive than DC.
A large proxy list + cool down after IP ban, it works.

NOTE: I scrape only without login from addresses like https: //ins.......com/some_account_username

So, finally, what is easiest solution?

Thank you @jakim, I also scrape only without login, i will try a large proxy list and make a rotating system.
Do you have any proxy provider that you can advice me ?

@mflash123 use residential ip proxies

@sagitaire123
I am looking for the cheapest, dedicated or shared for 2-3 people. A large number, plus my own rotation mechanism. I'm testing, we'll see.

@mflash123
Residential or mobile proxy, I think.

Use proxy. Good proxy. My script making ~2000 request per day, we use 10 proxy with rotation (also proxy with bad success rate temporary shut down for 2-3 hours).

So we have 80-90% of success requests.

I tested the problem. It seems that the limits are dynamic and depend on many factors. But there is good news - the limit is valid specifically for the address/32 and not for the subnet.

I'm sure instagram stuff are reading this topic, so the system will improve :-)

I try to use proxies from "payed" list but after some requests IG blocked it....

@zavist what ip you have? There are payed proxies which are hosted just on digitalocean/vultr/ovh etc and they are banned pretty fast.

@Jurigag can you suggest any service which will not be banned so fast? ))

Just interesting thing happened - seems so that there are really other limits for logged in users and not logged in - for example right now our office ip is banned for anonymous fetching but it works fine when logged in.

Another case - even when logged in you will obviously hit limit - but then you don't get redirect page - just request will return error 429.

Another case - even when logged in you will obviously hit limit - but then you don't get redirect page - just request will return error 429.

Indeed. Almost yesterday i can scrape just add "fake" sessionid and ds_user_id in cookie, today its not working. IG well done

Anyone have a solution for this issue?
the only solution is to buy a proxy?

I notice that if you download other pages (e.g., posts or comments) rather than instagram.com/username, it works better.

You mean you include some normal requests despite getAccount() ?

yes

Any news? Is it a working method?

@filippodicostanzo there is nothing more to add. Everything was already mentioned.

@jurigag can you suggest me a working proxy for this service? I tried some free proxy but does’t work

@filippodicostanzo
Free will always be banned, not worth it. Take some paid ones as mentioned earlier.

It's also not only about proxy as already wrote - adding other requests between(like getting feed when logged in or medias of user) makes it much more bullet-proof, at least from my experience.

Also i hit on other case - on some point instagram will load without any problem some account page, but ProfilePage in source code will actually be empty array, so we can't parse it. I fixed it in my fork, will try to push it later.

[Edit: After I post this update, the error appears again, IG must monitoring this post]

Looks like the problem is gone for me. I did not get this error for about 2 days.

I did nothing, just pause my script when got banned, restart after some hours to see if the error stills here. If the error occurs, try again some hours later...

Just use proxy ips, make sure to have dedicated or residential. Use proxies in a way so each of IP takes some rest, means you can loop the ips in a row and each ip should send max 500 calls then it switch to next. Loop 10 ips, for a medium level traffic.

I tried using residential IP's by luminati.io and it works fine. The bad thing is that you don't pay for IP's but for traffic. Then if you need to scrap a large list of accounts, this could be expensive.

Have anyone tested how many request you can send before get blocked?

@fsjdg as i already wrote, there is no fixed value, they are analyzing pretty much anything i think

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kiskaserver picture kiskaserver  Â·  4Comments

luengwaiban picture luengwaiban  Â·  5Comments

iFrez picture iFrez  Â·  5Comments

absfarah picture absfarah  Â·  5Comments

phoenixh picture phoenixh  Â·  5Comments