Is it possible to get JSON data of a public instagram video without requiring API access tokens?

165 Views Asked by At

I am coding up a chrome extension that interacts with instagram.com/reels while the user is logged in to instagram.

The first four or five reels that instagram loads have their metadata (I'm specifically after the video duration [mediaPresentationDuration]) embedded into the DOM as JSON data inside a script tag, which is easy to access. However, any subsequent reels that are fetched are not so easy to get at. Nonetheless, I can easily extract the currently visible video's id from the address bar (e.g. https://www.instagram.com/reel/C192Qr7IPVp/ has id: C192Qr7IPVp).

I have found through some research that it's possible to get the public part of an instagram profile as JSON data via, for example: https://www.instagram.com/metoffice/?__a=1&__d=dis. I am wondering if it is possible to do something similar to obtain JSON data about a particular reel if I know its id (and assuming the user viewing that reel is logged in).

My suspicion is that this won't be possible, but if anyone has any ideas that preferably don't involve have to get an access token from the owner of the video, I would very much appreciate any help. If there is a simple way to do this with the API, that would also be great. Thanks!

0

There are 0 best solutions below