skip to Main Content

I am currently looking at Instagram feed integration in a web app.
The offical APIs are: Instagram Graph API and Instagram Platform API.

And then I found one endpoint like https://www.instagram.com/instagram/media/ on SO, here and here, which seems an undocumented (at least I haven’t seen it on facebook/instagram document).
It’s publicly accessible and you can get a lot of information about the posts including likes and comments.

So my questions are:

  • Is the https://www.instagram.com/{username}/media/ documented some where?
  • Is it widely used on the internet?

3

Answers


  1. Its not official API, it may stop working anytime, not a good idea to use in a App. Other Instagram undocumented APIs have stopped working in the past, its good to use for one-off projects but I would not use it in a app/website.

    Login or Signup to reply.
  2. This endpoint has stopped working on November 7 2017. But you can use this other endpoint to get the same results:

    GET /users/user-id/media/recent
    https://api.instagram.com/v1/users/{user-id}/media/recent/?access_token=ACCESS-TOKEN
    
    Get the most recent media published by a user.
    The public_content scope is required if the user is not the owner of the access_token.
    
    REQUIREMENTS
    Scope: public_content
    
    PARAMETERS
    ACCESS_TOKEN    A valid access token.
    MAX_ID  Return media earlier than this max_id.
    MIN_ID  Return media later than this min_id.
    COUNT   Count of media to return.
    

    https://www.instagram.com/developer/endpoints/users/#get_users_media_recent

    Login or Signup to reply.
  3. I wrote small library on typescript. It doesn’t require access token or client id.The library uses RegExp under the hood. You can get your photos like this:

    import Nanogram from 'nanogram.js';
    
    const instagramParser = new Nanogram();
    
    instagramParser.getMediaByUsername('instagram').then((media) => {
      console.log(media);
     });
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search