extract instagram data with axios and ?__a=1 got blocked after half a day (1 request/minute)

Viewed 570

i wrote a script that retrieves a users profile data in json from [response.data.graphql.user]

I use this:

const response = await axios.get('https://www.instagram.com/'+accountUrl+'?__a=1');

For a list of users i want to loop this script and get all the data. To not getting blocked i set a timer or 1 request per minute, but after a few hours i seem to have been blocked.

request.response_url returned: https://www.instagram.com/accounts/login/ and response.data.graphql does not exists

Even over a VPN line it does not work anymore...

Does anyone have any idea what i can do to make this work?

1 Answers

You need to login to Instagram and then send the request again. The best way would be to use something like puppeteer and log in before hitting the ?__a=1 endpoint.

You may also need to reduce increase the time for requests to something like 1 request / 3 minutes better to do a hit and trial run to find out the limit.

Related