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

10,889

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
Share:
10,889

Related videos on Youtube

Vano
Author by

Vano

Updated on June 04, 2022

Comments

  • Vano
    Vano about 2 years

    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

    • whatamidoingwithmylife
      whatamidoingwithmylife about 6 years
      You don't have authorization to view this page. HTTP ERROR 403 and access denied, it's not public.
    • Vano
      Vano about 6 years
      what is not public? sorry don't get it. What I am trying to do it to get public user all posts without backend or instagram API. Instagram have changed protocol and I don't know if there is still chance to get this data.
    • whatamidoingwithmylife
      whatamidoingwithmylife about 6 years
      Access is denied, it may be "public" only for registered users, ANYHOW, if you want to access posts without using API, you could make a scrapper.
    • Vano
      Vano about 6 years
      sorry but can you be more specific what does 'make a scrapper' means? thanks.
    • Vano
      Vano about 6 years
      I made scrapper and have got first 12 posts but is it possible to get all pages? any suggestions ? thank you.
  • Vano
    Vano about 6 years
    I've tried to do same, I put cookie into my request header but it was same result, maybe I was doing sth wrong. Please if you have time can you give me working example? thank you in advenced.
  • Farshad
    Farshad over 3 years
    why i cant call it from postman any idea ?