G
G
glebst942020-06-21 17:44:31
RESTful API
glebst94, 2020-06-21 17:44:31

How to get JSON and not a 301 redirect when making a GET request to instagram?

I want to download the latest posts from Insta.
Sending a Get request to https://www.instagram.com/{{user}}/?__a=1 expecting JSON.
Everything works from the local machine, but if I make a request from the server, I get a 301 redirect to https://www.instagram.com/accounts/login/?next=/{{... I
sent requests via Python requests and via curl.
Headers changed, tried through a proxy.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
alekssamos, 2020-06-21
@alekssamos

No way. It is forbidden. Large black list of IP hosting and proxies. And if you log in, your account can be banned.

S
Sergey Komlev, 2020-07-21
@SerjAir

Use private mobile API with authorization. Write to me on Telegram , I will answer in more detail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question