Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there CURRENTLY anyway to fetch Instagram user media without authentication?

Until recently there were several ways to retrieve Instagram user media without the need for API authentication. But apparently, the website stopped all of them.

Some of the old methods:

  • https://api.instagram.com/v1/users/user-id/media/recent/

  • https://www.instagram.com/user-id/media

  • https://www.instagram.com/user-id/?__a=1

And some old related questions are:

  • How can I get a user's media from Instagram without authenticating as a user?

  • Is there still a way to fetch instagram feed without using access token now (06/2016)?

I was able to retrieve the first twenty items by crawling the webpage of the user, but this is not a good or standard method especially when Instagram is not supporting it officially.

I was wondering If you know any method that currently works?

like image 490
Moradnejad Avatar asked Apr 16 '18 07:04

Moradnejad


1 Answers

Unfortunately, Instagram stopped many of its APIs, including the ones that require authentication. It states in https://www.instagram.com/developer/:

To continuously improve Instagram users' privacy and security, we are accelerating the deprecation of Instagram API Platform, making the following changes effective immediately.

Some links explaining the details and causes of these changes:

  • https://www.programmableweb.com/news/instagram-has-effectively-killed-its-public-api/brief/2018/04/04

  • https://techcrunch.com/2018/04/02/instagram-api-limit/

  • https://www.macrumors.com/2018/04/04/instagram-disables-third-party-app-apis/

Some unofficial crawling methods have been proposed in (suggested by @Louis B.) https://stackoverflow.com/a/49906525/278840. You should take into consideration that these methods are being transformed each week. Therefore, I definitely prefer to use the private API.

Update:

The old public API (without auth) is working again. We can access by adding ?__a=1 to the end of a profile url, like this:

https://www.instagram.com/leomessi/?__a=1
like image 93
Moradnejad Avatar answered Oct 09 '22 12:10

Moradnejad