Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get public user all posts from instagram, without instagram API

I was trying to get posts from a public user's account on Instagram, I've tried almost every possible method but they are all returning 403 errors (access denied).

  1. https://www.instagram.com/graphql/query/?query_hash=ded47faa9a1aaded10161a2ff32abb6b&variables={"tag_name":"{user-name}","first":25,"after":""}

  2. https://www.instagram.com/{user-name}/?__a=1

  3. https://www.instagram.com/{user-name}/media

$.ajax({
    url: URL,
    type: "GET",
    success: function(data) {
        console.log('Success!' ,data);
    },
    error: function (response) {
        console.log('ERROR!', response);
    }
});

Above are the links from where I was trying to get data. As I've read Instagram are changing their protocols, is there any remaining way to get a list of posts from any public user without using Instagram API and without using backend code?

Thank You

like image 254
Vano Avatar asked May 30 '18 22:05

Vano


1 Answers

Your second solution should work. Try access this url:

https://www.instagram.com/{username}/?__a=1

It contains all the information for a user that is available from their page, including the 12 most recent posts, in a range of different sizes. As a side note, it does not contain followers or following lists

I have made a jquery plugin that uses this method:

https://github.com/kasperlegarth/instastory.js
like image 162
Legarndary Avatar answered Nov 15 '22 06:11

Legarndary