If you want just to get raw data from Instagram profile or post without using any third-party library or API wrapper, here is the trick:
Just add add
?__a=1 to almost any Instagram URL and you will get the raw JSON output with page data. And you don't need to be logged in! Cool huh? Some examples:Profile data:
https://www.instagram.com/danokhlopkov/?__a=1
Post data:
https://www.instagram.com/p/B9l2sxbAK7Q/?__a=1
Happy hacking! Enjoy 🤖 🧙♀️