Instagram API get information about a particular post

Is it possible to have access to media (of course public) without having the authorization of the user responsible for it? The idea is to know the number of likes and comments of a given post via API.

One of the alternatives I found in some posts is to load the html of the post example: https://www.instagram.com/p/tsxp1hhQTG / and manually fetch the number of likes and comments. This alternative would even solve my problem, but I'm deploying this solution to a system where multiple users would make this request, which is perhaps somewhat "stressful" for the server and would run the risk of distrusting DDoS.

I have already created a" client application " on Instagram, I own The Client ID, Client Secret and the Access TOKEN.

Author: Leonardo Rocha, 2016-06-09

1 answers

Instagram is now in Safe Mode (SandBox Mode ).

This mode began rolling out to all customers on June 01, 2016.

Before it, you were able to get public images through queries with your access_token, now this is no longer possible.
To obtain this data using access_token, Your application must be submitted to Instagram to exit SandBox mode and go even to online mode.

But then, what is SandBox Mode ?

Each new app created on the Instagram platform starts in Sandbox mode. This is a fully functional environment that allows you to test publicly available API terminals before submitting your application for review. Safe Mode is ideal for developers who are new to the Instagram platform and want to explore the API platform, as well as for teams that need multiple clients for development, testing, and other environments non-living.

To help you develop and test your app with the user, and the means that are available in the Sandbox mode you are real, Instagram (in other words, what is normally visible in the application, Instagram), but subject to the following conditions:

  • Apps in the sandbox are restricted to 10 users
  • data is restricted to users 10 and 20 the most recent from each of these users
  • reduced API rate

What does it interfere with me?

That's simple My dear friend.

While your application is in the SandBox Mode, you will only be able to interact with whoever is set up along with you. That is, you will not have access to the photos and other information of the rest of the users.

Is there another way to get the data?

You can download the HTML, as said from the question. But Instagram can block you with it. But the best way is to actually submit your application for approval.

Explanation in SOen.

 3
Author: Randrade, 2020-06-11 14:45:34